Compare commits
23 Commits
master
...
BR_Dev_For
Author | SHA1 | Date | |
---|---|---|---|
|
79adc9e2e5 | ||
|
012c6f9f64 | ||
|
72eb8d80bf | ||
|
6315d74a7b | ||
|
1016800cfe | ||
|
296540576c | ||
|
94e5bd9233 | ||
|
577a14ea2a | ||
|
01732a44e5 | ||
|
507c2fc601 | ||
|
c56ccf2136 | ||
|
e085934a8b | ||
|
ce5b064500 | ||
|
022e2014eb | ||
|
ec771163a9 | ||
|
12cdbbdbc5 | ||
|
493f933497 | ||
|
7493430a76 | ||
|
ee0caf7948 | ||
|
b7ca47a69a | ||
|
e5dc843e81 | ||
|
a32024e0bc | ||
|
90e60e9d4a |
340
COPYING
Normal file
340
COPYING
Normal file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
@ -17,44 +17,24 @@
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
# source path
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:$(srcdir)/adm_local
|
||||
# -* Makefile *-
|
||||
#
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 28/06/2001
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
all: resources
|
||||
SUBDIRS = idl adm_local resources src bin
|
||||
|
||||
install:
|
||||
cp -rf @top_srcdir@/adm_local @prefix@
|
||||
DIST_SUBDIRS = idl adm_local resources src bin
|
||||
|
||||
bin:
|
||||
DISTCLEANFILES = a.out aclocal.m4 configure
|
||||
|
||||
resources :
|
||||
cp -rf @top_srcdir@/adm_local $(top_builddir)
|
||||
|
||||
inc:
|
||||
|
||||
lib:
|
||||
|
||||
depend:
|
||||
|
||||
depend_idl:
|
||||
|
||||
install-end:
|
||||
|
||||
install-include:
|
||||
|
||||
install-bin:
|
||||
|
||||
uninstall:
|
||||
|
||||
uninstall-idl:
|
||||
|
||||
distclean:
|
||||
|
||||
clean:
|
||||
|
||||
distclean-other:
|
||||
salomeinclude_DATA=NETGENPLUGIN_version.h
|
||||
|
||||
EXTRA_DIST+= \
|
||||
build_configure \
|
||||
clean_configure \
|
||||
LICENCE
|
116
Makefile.in
116
Makefile.in
@ -1,116 +0,0 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
# -* Makefile *-
|
||||
#
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 28/06/2001
|
||||
# $Header$
|
||||
#
|
||||
|
||||
# source path
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=.
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top_srcdir@/idl
|
||||
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
SUBDIRS = idl src adm_local
|
||||
|
||||
RESOURCES_FILES = \
|
||||
NETGENPlugin.xml \
|
||||
mesh_hypo_netgen.png \
|
||||
mesh_hypo_netgen_2d.png \
|
||||
mesh_algo_netgen_2d3d.png \
|
||||
mesh_algo_netgen_2d.png \
|
||||
mesh_tree_hypo_netgen.png \
|
||||
mesh_tree_hypo_netgen_2d.png \
|
||||
mesh_tree_algo_netgen_2d3d.png \
|
||||
mesh_tree_algo_netgen_2d.png
|
||||
|
||||
BIN_SCRIPT = VERSION
|
||||
|
||||
# copy header files in common directory ------------
|
||||
|
||||
include_list = include/salome/SALOMEconfig.h \
|
||||
include/salome/NETGENPLUGIN_version.h
|
||||
|
||||
ifneq ($(HAVE_SSTREAM),yes)
|
||||
include_list += include/salome/sstream
|
||||
endif
|
||||
|
||||
inc: idl $(include_list)
|
||||
|
||||
bin: bin/salome/VERSION
|
||||
|
||||
bin/salome/VERSION : bin/VERSION
|
||||
-$(RM) $@
|
||||
$(LN_S) ../../$< $@
|
||||
|
||||
include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
|
||||
-$(RM) $@
|
||||
$(LN_S) ../../$< $@
|
||||
|
||||
# test if SALOMEconfig.h has changed (contents)
|
||||
salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
|
||||
@if ! [ -a $@ ]; then \
|
||||
cp -p -f $< $@; \
|
||||
fi; \
|
||||
if ! cmp $< $@; then \
|
||||
cp -p -f $< $@; \
|
||||
fi; \
|
||||
|
||||
include/salome/sstream: salome_adm/unix/sstream
|
||||
-$(RM) $@
|
||||
$(LN_S) ../../$< $@
|
||||
|
||||
include/salome/NETGENPLUGIN_version.h: NETGENPLUGIN_version.h
|
||||
-$(RM) $@
|
||||
$(LN_S) ../../$< $@
|
||||
|
||||
install-include: $(include_list)
|
||||
$(INSTALL) -d $(includedir)
|
||||
@for f in X $(include_list); do \
|
||||
if test $$f != X; then \
|
||||
($(INSTALL_DATA) -p $$f $(includedir)/. || exit 1); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
# install script in $(bindir) :
|
||||
install-bin: $(BIN_SCRIPT)
|
||||
$(INSTALL) -d $(bindir)
|
||||
if test $(BIN_SCRIPT)X != X; then \
|
||||
$(INSTALL_PROGRAM) $^ $(bindir); \
|
||||
fi
|
||||
|
||||
# CLEAN --------------------
|
||||
|
||||
distclean: distclean-other
|
||||
|
||||
distclean-other:
|
||||
-$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old
|
||||
-$(RM) salome_adm/unix/make_*
|
||||
-$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h
|
||||
-$(RM) config.cache config.log config.status
|
||||
|
||||
@MODULE@
|
||||
|
||||
install: install-bin install-include
|
19
adm_local/Makefile.am
Normal file
19
adm_local/Makefile.am
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
|
||||
# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
SUBDIRS = unix
|
22
adm_local/unix/Makefile.am
Normal file
22
adm_local/unix/Makefile.am
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
|
||||
# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
SUBDIRS = config_files
|
23
adm_local/unix/config_files/Makefile.am
Normal file
23
adm_local/unix/config_files/Makefile.am
Normal file
@ -0,0 +1,23 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
|
||||
# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
dist_admlocalm4_DATA= \
|
||||
check_NETGEN.m4 \
|
||||
check_NETGENPLUGIN.m4
|
145
adm_local/unix/config_files/check_NETGEN.m4
Normal file
145
adm_local/unix/config_files/check_NETGEN.m4
Normal file
@ -0,0 +1,145 @@
|
||||
AC_DEFUN([CHECK_NETGEN],[
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])dnl
|
||||
|
||||
AC_CHECKING(for Netgen 4.5 and higher Libraries)
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_ARG_WITH(netgen,
|
||||
[ --with-netgen=DIR root directory path of NETGEN installation],
|
||||
NETGEN_HOME=$withval,NETGEN_HOME="")
|
||||
|
||||
NETGEN_INCLUDES=""
|
||||
NETGEN_LIBS_DIR=""
|
||||
|
||||
Netgen_ok=no
|
||||
|
||||
if test "x$NETGEN_HOME" == "x" ; then
|
||||
|
||||
# no --with-netgen option used
|
||||
if test "x$NETGENHOME" != "x" ; then
|
||||
|
||||
# NETGENHOME environment variable defined
|
||||
NETGEN_HOME=$NETGENHOME
|
||||
|
||||
fi
|
||||
#
|
||||
fi
|
||||
|
||||
if test "x$NETGEN_HOME" != "x"; then
|
||||
|
||||
echo
|
||||
echo
|
||||
echo -------------------------------------------------
|
||||
echo You are about to choose to use somehow the
|
||||
echo Netgen Library to generate Tetrahedric mesh.
|
||||
echo
|
||||
echo WARNING
|
||||
echo ----------------------------------------------------------
|
||||
echo ----------------------------------------------------------
|
||||
echo You are strongly advised to consult the file
|
||||
echo NETGENPLUGIN_SRC/src/NETGEN/ReadMeForNgUsers, particularly about
|
||||
echo assumptions made on the installation of the Netgen
|
||||
echo application and libraries.
|
||||
echo Ask your system administrator for those details.
|
||||
echo ----------------------------------------------------------
|
||||
echo ----------------------------------------------------------
|
||||
echo
|
||||
echo
|
||||
|
||||
|
||||
|
||||
NETGEN_INCLUDES="-I${NETGEN_HOME}/include"
|
||||
|
||||
# check ${NETGEN_HOME}/lib/LINUX directory for libraries
|
||||
if test -f ${NETGEN_HOME}/lib/LINUX/libcsg.a ; then
|
||||
NETGEN_LIBS_DIR="${NETGEN_HOME}/lib/LINUX"
|
||||
else
|
||||
# check ${NETGEN_HOME}/lib/LINUX64 directory for libraries
|
||||
if test -f ${NETGEN_HOME}/lib/LINUX64/libcsg.a ; then
|
||||
NETGEN_LIBS_DIR="${NETGEN_HOME}/lib/LINUX64"
|
||||
else
|
||||
NETGEN_LIBS_DIR="${NETGEN_HOME}/lib"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "NETGEN_LIBS_DIR = $NETGEN_LIBS_DIR"
|
||||
|
||||
CPPFLAGS_old="$CPPFLAGS"
|
||||
CXXFLAGS_old="$CXXFLAGS"
|
||||
CPPFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $CPPFLAGS"
|
||||
CXXFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $CXXFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for Netgen header file)
|
||||
|
||||
AC_CHECK_HEADER(nglib.h,Netgen_ok=yes,Netgen_ok=no)
|
||||
if test "x$Netgen_ok" == "xyes"; then
|
||||
|
||||
AC_MSG_CHECKING(for Netgen libraries)
|
||||
|
||||
LDFLAGS_old="$LDFLAGS"
|
||||
LDFLAGS="-L. -lNETGEN $CAS_LDPATH -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo $LDFLAGS"
|
||||
|
||||
AC_TRY_COMPILE(#include <iostream.h>
|
||||
#include <fstream.h>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
,nglib::Ng_Init();
|
||||
netgen::OCCGeometry occgeo;
|
||||
nglib::Ng_Exit();,Netgen_ok=yes;ar x "$NETGEN_LIBS_DIR/libnginterface.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libocc.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libcsg.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgprim.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libmesh.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libopti.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgen.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libla.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libstlgeom.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgeom2d.a";
|
||||
$CXX -shared linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o genmesh2d.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o -o libNETGEN.so;
|
||||
rm -rf linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o genmesh2d.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o csgparser.o dynamicmem.o extrusion.o occconstruction.o parthreads.o readuser.o writeabaqus.o writediffpack.o writeelmer.o writefeap.o writefluent.o writegmsh.o writejcm.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o,
|
||||
Netgen_ok=no)
|
||||
|
||||
AC_CACHE_VAL(salome_netgen_lib,[
|
||||
AC_TRY_LINK(
|
||||
#include <iostream.h>
|
||||
#include <fstream.h>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
,nglib::Ng_Init();
|
||||
netgen::OCCGeometry occgeo;
|
||||
nglib::Ng_Exit();,
|
||||
eval "salome_netgen_lib=yes";rm -rf libNETGEN.so,eval "salome_netgen_lib=no";rm -rf libNETGEN.so)
|
||||
])
|
||||
Netgen_ok="$salome_netgen_lib"
|
||||
|
||||
|
||||
LDFLAGS="$LDFLAGS_old"
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_old"
|
||||
CXXFLAGS="$CXXFLAGS_old"
|
||||
|
||||
if test "x$Netgen_ok" == xno ; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN(Netgen libraries not found or not properly installed)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(NETGEN_INCLUDES)
|
||||
AC_SUBST(NETGEN_LIBS_DIR)
|
||||
|
||||
AC_LANG_RESTORE
|
||||
|
||||
])dnl
|
@ -1,132 +1,53 @@
|
||||
AC_DEFUN([CHECK_NETGEN],[
|
||||
#------------------------------------------------------------
|
||||
# Check availability of Salome NETGEN mesh plugin module
|
||||
# distribution
|
||||
#------------------------------------------------------------
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
AC_REQUIRE([AC_PROG_CXXCPP])dnl
|
||||
AC_DEFUN([CHECK_NETGENPLUGIN],[
|
||||
|
||||
AC_CHECKING(for Netgen 4.5 and higher Libraries)
|
||||
AC_CHECKING(for NETGEN mesh plugin)
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
NGplugin_ok=no
|
||||
|
||||
AC_ARG_WITH(netgen,
|
||||
[ --with-netgen=DIR root directory path of NETGEN installation],
|
||||
NETGEN_HOME=$withval,NETGEN_HOME="")
|
||||
NETGENPLUGIN_LDLAGS=""
|
||||
NETGENPLUGIN_CXXFLAGS=""
|
||||
|
||||
NETGEN_INCLUDES=""
|
||||
NETGEN_LIBS_DIR=""
|
||||
AC_ARG_WITH(netgenplugin,
|
||||
[ --with-netgenplugin=DIR root directory path of NETGEN mesh plugin installation ],
|
||||
NETGENPLUGIN_DIR="$withval",NETGENPLUGIN_DIR="")
|
||||
|
||||
Netgen_ok=no
|
||||
if test "x$NETGENPLUGIN_DIR" == "x" ; then
|
||||
|
||||
if test "x$NETGEN_HOME" == "x" ; then
|
||||
# no --with-netgenplugin-dir option used
|
||||
|
||||
# no --with-netgen option used
|
||||
if test "x$NETGENHOME" != "x" ; then
|
||||
if test "x$NETGENPLUGIN_ROOT_DIR" != "x" ; then
|
||||
|
||||
# NETGENHOME environment variable defined
|
||||
NETGEN_HOME=$NETGENHOME
|
||||
# NETGENPLUGIN_ROOT_DIR environment variable defined
|
||||
NETGENPLUGIN_DIR=$NETGENPLUGIN_ROOT_DIR
|
||||
|
||||
fi
|
||||
#
|
||||
fi
|
||||
|
||||
if test "x$NETGEN_HOME" != "x"; then
|
||||
if test -f ${NETGENPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libNETGENEngine.so ; then
|
||||
NGplugin_ok=yes
|
||||
AC_MSG_RESULT(Using NETGEN mesh plugin distribution in ${NETGENPLUGIN_DIR})
|
||||
|
||||
echo
|
||||
echo
|
||||
echo -------------------------------------------------
|
||||
echo You are about to choose to use somehow the
|
||||
echo Netgen Library to generate Tetrahedric mesh.
|
||||
echo
|
||||
echo WARNING
|
||||
echo ----------------------------------------------------------
|
||||
echo ----------------------------------------------------------
|
||||
echo You are strongly advised to consult the file
|
||||
echo NETGENPLUGIN_SRC/src/ReadMeForNgUsers, particularly about
|
||||
echo assumptions made on the installation of the Netgen
|
||||
echo application and libraries.
|
||||
echo Ask your system administrator for those details.
|
||||
echo ----------------------------------------------------------
|
||||
echo ----------------------------------------------------------
|
||||
echo
|
||||
echo
|
||||
if test "x$NETGENPLUGIN_ROOT_DIR" == "x" ; then
|
||||
NETGENPLUGIN_ROOT_DIR=${NETGENPLUGIN_DIR}
|
||||
fi
|
||||
AC_SUBST(NETGENPLUGIN_ROOT_DIR)
|
||||
|
||||
|
||||
NETGENPLUGIN_LDFLAGS=-L${NETGENPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
|
||||
NETGENPLUGIN_CXXFLAGS=-I${NETGENPLUGIN_DIR}/include/salome
|
||||
|
||||
NETGEN_INCLUDES="-I$NETGEN_HOME/include"
|
||||
NETGEN_LIBS_DIR="$NETGEN_HOME/lib/LINUX"
|
||||
AC_SUBST(NETGENPLUGIN_LDFLAGS)
|
||||
AC_SUBST(NETGENPLUGIN_CXXFLAGS)
|
||||
|
||||
CPPFLAGS_old="$CPPFLAGS"
|
||||
CXXFLAGS_old="$CXXFLAGS"
|
||||
CPPFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $CPPFLAGS"
|
||||
CXXFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $CXXFLAGS"
|
||||
|
||||
AC_MSG_CHECKING(for Netgen header file)
|
||||
|
||||
AC_CHECK_HEADER(nglib.h,Netgen_ok=yes,Netgen_ok=no)
|
||||
if test "x$Netgen_ok" == "xyes"; then
|
||||
|
||||
AC_MSG_CHECKING(for Netgen libraries)
|
||||
|
||||
LDFLAGS_old="$LDFLAGS"
|
||||
LDFLAGS="-L. -lNETGEN $CAS_LDPATH -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo $LDFLAGS"
|
||||
|
||||
AC_TRY_COMPILE(#include <iostream.h>
|
||||
#include <fstream.h>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
,nglib::Ng_Init();
|
||||
netgen::OCCGeometry occgeo;
|
||||
nglib::Ng_Exit();,Netgen_ok=yes;ar x "$NETGEN_LIBS_DIR/libnginterface.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libocc.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libcsg.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgprim.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libmesh.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libopti.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgen.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libla.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libstlgeom.a";
|
||||
ar x "$NETGEN_LIBS_DIR/libgeom2d.a";
|
||||
$CXX -shared linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o genmesh2d.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o -o libNETGEN.so;
|
||||
rm -rf linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o genmesh2d.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o csgparser.o dynamicmem.o extrusion.o occconstruction.o parthreads.o readuser.o writeabaqus.o writediffpack.o writeelmer.o writefeap.o writefluent.o writegmsh.o writejcm.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o,
|
||||
Netgen_ok=no)
|
||||
|
||||
AC_CACHE_VAL(salome_netgen_lib,[
|
||||
AC_TRY_LINK(
|
||||
#include <iostream.h>
|
||||
#include <fstream.h>
|
||||
namespace nglib {
|
||||
#include "nglib.h"
|
||||
}
|
||||
#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
,nglib::Ng_Init();
|
||||
netgen::OCCGeometry occgeo;
|
||||
nglib::Ng_Exit();,
|
||||
eval "salome_netgen_lib=yes";rm -rf libNETGEN.so,eval "salome_netgen_lib=no";rm -rf libNETGEN.so)
|
||||
])
|
||||
Netgen_ok="$salome_netgen_lib"
|
||||
|
||||
|
||||
LDFLAGS="$LDFLAGS_old"
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_old"
|
||||
CXXFLAGS="$CXXFLAGS_old"
|
||||
|
||||
if test "x$Netgen_ok" == xno ; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN(Netgen libraries not found or not properly installed)
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
else
|
||||
AC_MSG_WARN("Cannot find compiled NETGEN mesh plugin distribution")
|
||||
fi
|
||||
|
||||
AC_SUBST(NETGEN_INCLUDES)
|
||||
AC_SUBST(NETGEN_LIBS_DIR)
|
||||
|
||||
AC_LANG_RESTORE
|
||||
|
||||
AC_MSG_RESULT(for NETGEN mesh plugin: $NGplugin_ok)
|
||||
|
||||
])dnl
|
||||
|
@ -1,288 +0,0 @@
|
||||
# common directories to put headerfiles
|
||||
inc_builddir=$(top_builddir)/include/salome
|
||||
|
||||
@SET_MAKE@
|
||||
SHELL=/bin/sh
|
||||
|
||||
# header missing
|
||||
|
||||
HAVE_SSTREAM=@HAVE_SSTREAM@
|
||||
|
||||
|
||||
LIBS=@LIBS@
|
||||
LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker $(top_builddir)/lib/salome
|
||||
# add libstdc++ to link c++ library with libtool !
|
||||
LDFLAGS+= -lstdc++
|
||||
|
||||
CP=@CP@
|
||||
|
||||
# CPP
|
||||
|
||||
CPP=@CPP@
|
||||
CXXCPP=@CXXCPP@
|
||||
CPPFLAGS=@CPPFLAGS@ -I$(inc_builddir) -I$(srcdir) -I.
|
||||
|
||||
# C
|
||||
|
||||
CC = @CC@
|
||||
CFLAGS = @CFLAGS@
|
||||
C_DEPEND_FLAG = @C_DEPEND_FLAG@
|
||||
|
||||
# C++
|
||||
|
||||
CXX = @CXX@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@
|
||||
|
||||
# BOOST Library
|
||||
|
||||
BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
|
||||
|
||||
# JAVA
|
||||
|
||||
JAVA_INCLUDES = @JAVA_INCLUDES@
|
||||
JAVA_LIBS = @JAVA_LIBS@
|
||||
JAVA_LDPATH = @JAVA_LDPATH@
|
||||
|
||||
# PYTHON
|
||||
|
||||
PYTHON = @PYTHON@
|
||||
PYTHONHOME = @PYTHONHOME@
|
||||
PYTHON_INCLUDES = @PYTHON_INCLUDES@
|
||||
PYTHON_LIBS = @PYTHON_LIBS@
|
||||
PYTHON_VERSION = @PYTHON_VERSION@
|
||||
PYTHON_SITE = @PYTHON_SITE@
|
||||
PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@
|
||||
|
||||
# QT
|
||||
|
||||
QT_ROOT = @QT_ROOT@
|
||||
QT_INCLUDES = @QT_INCLUDES@
|
||||
QT_MT_INCLUDES = @QT_INCLUDES@ -DQT_THREAD_SUPPORT
|
||||
QT_LIBS = @QT_LIBS@
|
||||
QT_MT_LIBS = @QT_MT_LIBS@
|
||||
|
||||
MOC = @MOC@
|
||||
UIC = @UIC@
|
||||
MSG2QM = @MSG2QM@
|
||||
|
||||
#QWT
|
||||
|
||||
QWT_INCLUDES=@QWT_INCLUDES@
|
||||
QWT_LIBS=@QWT_LIBS@
|
||||
|
||||
# SIP
|
||||
SIP = @SIP@
|
||||
SIP_INCLUDES = @SIP_INCLUDES@
|
||||
SIP_LIBS = @SIP_LIBS@
|
||||
|
||||
# PYQT
|
||||
PYQT_SIPS = @PYQT_SIPS@
|
||||
PYQT_LIBS = @PYQT_LIBS@
|
||||
|
||||
# openGL
|
||||
OGL_INCLUDES=@OGL_INCLUDES@
|
||||
OGL_LIBS=@OGL_LIBS@
|
||||
|
||||
# VTK
|
||||
VTK_INCLUDES=@VTK_INCLUDES@
|
||||
VTK_LIBS=@VTK_LIBS@
|
||||
|
||||
# HDF5
|
||||
|
||||
HDF5_INCLUDES=@HDF5_INCLUDES@
|
||||
HDF5_LIBS=@HDF5_LIBS@
|
||||
HDF5_MT_LIBS=@HDF5_MT_LIBS@
|
||||
|
||||
# OpenCasCade
|
||||
|
||||
OCC_INCLUDES=@CAS_CPPFLAGS@
|
||||
OCC_CXXFLAGS=@CAS_CXXFLAGS@
|
||||
|
||||
OCC_KERNEL_LIBS=@CAS_KERNEL@
|
||||
OCC_OCAF_LIBS=@CAS_OCAF@
|
||||
OCC_VIEWER_LIBS=@CAS_VIEWER@
|
||||
OCC_MODELER_LIBS=@CAS_MODELER@
|
||||
OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@
|
||||
OCC_LIBS=@CAS_LDFLAGS@
|
||||
OCC_LDPATH=@CAS_LDPATH@
|
||||
|
||||
# MPICH
|
||||
|
||||
MPICH_INCLUDES=@MPICH_INCLUDES@
|
||||
MPICH_LIBS=@MPICH_LIBS@
|
||||
|
||||
# Swig C++ Python
|
||||
|
||||
SWIG = @SWIG@
|
||||
SWIG_FLAGS = @SWIG_FLAGS@ -I$(inc_builddir) -I$(srcdir) -I.
|
||||
|
||||
# OMNIORB
|
||||
|
||||
OMNIORB_ROOT = @OMNIORB_ROOT@
|
||||
OMNIORB_INCLUDES = @OMNIORB_INCLUDES@
|
||||
OMNIORB_LIBS = @OMNIORB_LIBS@
|
||||
OMNIORB_CXXFLAGS = @OMNIORB_CXXFLAGS@
|
||||
|
||||
OMNIORB_IDL = @OMNIORB_IDL@
|
||||
OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
|
||||
OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome \
|
||||
-I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome\
|
||||
-I$(SMESH_ROOT_DIR)/idl/salome
|
||||
|
||||
OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@
|
||||
OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
|
||||
OMNIORB_IDL_CLN_OBJ = @OMNIORB_IDL_CLN_OBJ@
|
||||
|
||||
OMNIORB_IDL_SRV_H = @OMNIORB_IDL_SRV_H@
|
||||
OMNIORB_IDL_SRV_CXX = @OMNIORB_IDL_SRV_CXX@
|
||||
OMNIORB_IDL_SRV_OBJ = @OMNIORB_IDL_SRV_OBJ@
|
||||
|
||||
# Default ORB
|
||||
|
||||
CORBA_ROOT = @CORBA_ROOT@
|
||||
CORBA_INCLUDES = @CORBA_INCLUDES@
|
||||
CORBA_LIBS = @CORBA_LIBS@
|
||||
CORBA_CXXFLAGS = @CORBA_CXXFLAGS@
|
||||
|
||||
IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome \
|
||||
-I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome\
|
||||
-I$(SMESH_ROOT_DIR)/idl/salome
|
||||
IDLPYFLAGS = @IDLPYFLAGS@
|
||||
|
||||
IDL = @IDL@
|
||||
|
||||
IDL_CLN_H = @IDL_CLN_H@
|
||||
IDL_CLN_CXX = @IDL_CLN_CXX@
|
||||
IDL_CLN_OBJ = @IDL_CLN_OBJ@
|
||||
|
||||
IDL_SRV_H = @IDL_SRV_H@
|
||||
IDL_SRV_CXX = @IDL_SRV_CXX@
|
||||
IDL_SRV_OBJ = @IDL_SRV_OBJ@
|
||||
|
||||
CPPFLAGS+= $(CORBA_INCLUDES)
|
||||
CXXFLAGS+= $(CORBA_CXXFLAGS)
|
||||
|
||||
# SALOME
|
||||
|
||||
SALOME_INCLUDES = \
|
||||
-I$(KERNEL_ROOT_DIR)/include/salome \
|
||||
-I$(GEOM_ROOT_DIR)/include/salome \
|
||||
-I$(SMESH_ROOT_DIR)/include/salome
|
||||
|
||||
CPPFLAGS += -DSOLIDGEOM -DLINUX $(OCC_INCLUDES) $(SALOME_INCLUDES) $(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += -DSOLIDGEOM -DLINUX $(OCC_CXXFLAGS) $(SALOME_INCLUDES)
|
||||
|
||||
LDFLAGS += -lSMESHimpl -lSMESHEngine -lStdMeshers -lStdMeshersEngine -L${KERNEL_ROOT_DIR}/lib/salome -L${SMESH_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome -lSalomeGenericObj
|
||||
|
||||
# add corba libs when link salome application !
|
||||
#LDFLAGS+= $(CORBA_LIBS)
|
||||
LIBS+=$(CORBA_LIBS)
|
||||
|
||||
## Shared libraries
|
||||
LT_STATIC_EXEC=@LT_STATIC_EXEC@
|
||||
DYNAMIC_DIRS=@DYNAMIC_DIRS@
|
||||
LT_LIB=libtool
|
||||
LT=$(top_builddir)/libtool
|
||||
LT_COMPILE=$(LT) --mode=compile $(CC)
|
||||
LT_LINK_LIB=$(LT_LIB) --mode=link $(CC) -rpath $(libdir)
|
||||
LT_LINK_EXE=$(LT) --mode=link $(CC) $(LT_STATIC_EXEC) -dlopen self -rpath $(bindir) $(DYNAMIC_DIRS)
|
||||
LT_RUN=$(LT) --mode=execute
|
||||
LT_INSTALL_PROG=$(LT) --mode=install $(INSTALL_PROGRAM)
|
||||
LT_INSTALL_LIB=$(LT) --mode=install $(INSTALL_DATA)
|
||||
LT_UNINSTALL=$(LT) --mode=uninstall $(RM)
|
||||
|
||||
INSTALL=@INSTALL@
|
||||
INSTALL_PROGRAM=@INSTALL_PROGRAM@
|
||||
INSTALL_DATA=@INSTALL_DATA@
|
||||
|
||||
# create a symbolic link (or a copie ?)
|
||||
LN_S=@LN_S@
|
||||
|
||||
## Installation points
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@/salome
|
||||
libdir=@libdir@/salome
|
||||
# warning : if user give this path in configure we could have salome/salome :-(
|
||||
includedir=@includedir@/salome
|
||||
datadir=@datadir@/salome
|
||||
idldir=$(prefix)/idl/salome
|
||||
sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
|
||||
|
||||
docdir=${prefix}/doc/salome
|
||||
|
||||
#
|
||||
# begin of package rules
|
||||
#
|
||||
|
||||
.PHONY: all lib bin inc resources docs tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
|
||||
|
||||
.SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm
|
||||
|
||||
all:
|
||||
$(MAKE) inc
|
||||
$(MAKE) depend_idl
|
||||
$(MAKE) depend
|
||||
$(MAKE) lib
|
||||
$(MAKE) bin
|
||||
$(MAKE) resources
|
||||
|
||||
#
|
||||
# add target to build administrative files
|
||||
#
|
||||
|
||||
Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in
|
||||
cd $(top_builddir) ; ./config.status
|
||||
|
||||
LOCAL_MAKE = make_commence make_omniorb
|
||||
|
||||
KERNEL_MAKE = make_module make_conclude depend SALOMEconfig.h F77config.h sstream envScript
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure \
|
||||
$(LOCAL_MAKE:%=$(top_srcdir)/adm_local/unix/%.in) \
|
||||
$(KERNEL_MAKE:%=$(KERNEL_ROOT_DIR)/salome_adm/unix/%.in)
|
||||
cd $(top_builddir) ; ./config.status --recheck
|
||||
|
||||
# VPATH contain $(srcdir), so make configure is good in top_srcdir and we must add target configure otherwise :-)
|
||||
ifneq ($(top_srcdir),$(srcdir))
|
||||
configure: $(top_srcdir)/configure
|
||||
endif
|
||||
|
||||
$(top_srcdir)/configure: $(top_srcdir)/configure.in $(top_srcdir)/aclocal.m4
|
||||
cd $(top_srcdir) ; autoconf
|
||||
|
||||
$(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
|
||||
cd $(top_srcdir) && ./build_configure
|
||||
|
||||
|
||||
ACLOCAL_KERNEL = \
|
||||
ac_cxx_bool.m4 check_corba.m4 \
|
||||
ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \
|
||||
ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \
|
||||
ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \
|
||||
ac_cxx_partial_specialization.m4 python.m4 \
|
||||
ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
|
||||
ac_cc_warnings.m4 check_swig.m4 check_boost.m4
|
||||
|
||||
#ifeq (@WITHNETGEN@,yes)
|
||||
# ACLOCAL_SRC += check_Netgen.m4
|
||||
#endif
|
||||
|
||||
ACLOCAL_GUI = \
|
||||
check_vtk.m4 check_opengl.m4 check_qt.m4 \
|
||||
check_GUI.m4 check_corba_in_GUI.m4
|
||||
|
||||
ACLOCAL_GEOM = check_GEOM.m4
|
||||
|
||||
ACLOCAL_SMESH = check_SMESH.m4
|
||||
|
||||
$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
|
||||
$(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \
|
||||
$(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \
|
||||
$(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%)
|
||||
cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
|
||||
-I @GUI_ROOT_DIR@/adm_local/unix/config_files \
|
||||
-I @GEOM_ROOT_DIR@/adm_local/unix/config_files \
|
||||
-I @SMESH_ROOT_DIR@/adm_local/unix/config_files
|
||||
|
54
adm_local/unix/make_common_starter.am
Normal file
54
adm_local/unix/make_common_starter.am
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# ============================================================
|
||||
# This file defines the common definitions used in several
|
||||
# Makefile. This file must be included, if needed, by the file
|
||||
# Makefile.am.
|
||||
# ============================================================
|
||||
#
|
||||
|
||||
# Standard directory for installation
|
||||
salomeincludedir = $(includedir)/@PACKAGE@
|
||||
libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@
|
||||
bindir = $(prefix)/bin/@PACKAGE@
|
||||
salomescriptdir = $(bindir)
|
||||
|
||||
# Directory for installing idl files
|
||||
salomeidldir = $(prefix)/idl/@PACKAGE@
|
||||
|
||||
# Directory for installing resource files
|
||||
salomeresdir = $(prefix)/share/@PACKAGE@/resources/@MODULE_NAME@
|
||||
|
||||
# Directories for installing admin files
|
||||
admlocaldir = $(prefix)/adm_local
|
||||
admlocalunixdir = $(admlocaldir)/unix
|
||||
admlocalm4dir = $(admlocaldir)/unix/config_files
|
||||
|
||||
# Shared modules installation directory
|
||||
sharedpkgpythondir =$(pkgpythondir)/shared_modules
|
||||
|
||||
# Documentation directory
|
||||
docdir = $(datadir)/doc/@PACKAGE@
|
||||
|
||||
# common rules
|
||||
|
||||
# moc-files generation
|
||||
%_moc.cxx: %.h
|
||||
$(MOC) $< -o $@
|
||||
|
||||
# qm-files generation
|
||||
%.qm: %.po
|
||||
$(MSG2QM) $< $@
|
||||
|
||||
EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.po)
|
||||
|
||||
mostlyclean-local:
|
||||
rm -f @builddir@/*_moc.cxx
|
||||
rm -f @builddir@/*.qm
|
||||
|
||||
# tests
|
||||
tests: unittest
|
||||
|
||||
unittest: $(UNIT_TEST_PROG)
|
||||
@if test "x$(UNIT_TEST_PROG)" != "x"; then \
|
||||
$(UNIT_TEST_PROG); \
|
||||
fi;
|
@ -1,62 +0,0 @@
|
||||
#=======================================================================
|
||||
# Begin specific part to omniorb
|
||||
# (include from file adm/unix/make_omniorb generated by
|
||||
# adm/unix/make_omniorb.in)
|
||||
#=======================================================================
|
||||
# -* Makefile *-
|
||||
#
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 29/06/2001
|
||||
# $Header$
|
||||
#
|
||||
|
||||
# Client and server object are the same with omniorb
|
||||
# There are one header file and one source file generate
|
||||
|
||||
#IDLOBJ=$(IDLSRC:%.idl=%$(IDL_CLN_OBJ))
|
||||
|
||||
# dependancies between idl and it's generated files
|
||||
%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${KERNEL_ROOT_DIR}/idl/salome/%.idl
|
||||
$(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
|
||||
|
||||
%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${GEOM_ROOT_DIR}/idl/salome/%.idl
|
||||
$(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
|
||||
|
||||
#%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${MED_ROOT_DIR}/idl/salome/%.idl
|
||||
# $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
|
||||
|
||||
%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${SMESH_ROOT_DIR}/idl/salome/%.idl
|
||||
$(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
|
||||
|
||||
%$(OMNIORB_IDL_CLN_CXX) %$(OMNIORB_IDL_CLN_H): ${top_builddir}/idl/salome/%.idl
|
||||
$(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
|
||||
|
||||
# dependncies between idl files
|
||||
depend_idl: .depidl
|
||||
|
||||
# we use cpp to generate dependencies between idl files.
|
||||
# we change cpp output to keep only idl file and transform it to get a suitable rule
|
||||
.depidl: $(IDL_FILES)
|
||||
@touch $@
|
||||
@for dep in $? dummy; do \
|
||||
if [ $$dep != "dummy" ]; then \
|
||||
echo Building dependencies for $$dep; \
|
||||
basedep=`basename $$dep .idl`; \
|
||||
header="$$basedep"$(IDL_CLN_H); \
|
||||
sed '\%^'"$$header"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \
|
||||
$(CPP) $(C_DEPEND_FLAG) -I$(srcdir) $$dep 2>/dev/null | \
|
||||
sed `echo "s%$$basedep\\.idl%$$header:%g"` | \
|
||||
sed 's% $(srcdir)/% %g' | \
|
||||
sed 's% $(top_srcdir)/% %g' | \
|
||||
sed 's% $(top_builddir)/% %g' | \
|
||||
sed 's%^.*:\.o: *%%' | sed 's%^ *\\ *%%'| sed 's%^ *\(.*\):%\1:%' | \
|
||||
sed 's/\.idl/$(IDL_CLN_H)/' >>$@; \
|
||||
echo '' >>$@; \
|
||||
fi; \
|
||||
done ;
|
||||
|
||||
-include .depidl
|
||||
|
||||
#=======================================================================
|
||||
# End specific part to omniorb
|
||||
#=======================================================================
|
36
bin/Makefile.am
Normal file
36
bin/Makefile.am
Normal file
@ -0,0 +1,36 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
|
||||
# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
# -* Makefile *-
|
||||
#
|
||||
# Author : Guillaume Boulant (CSSI)
|
||||
# Module : KERNEL
|
||||
# $Header$
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
#
|
||||
# ===============================================================
|
||||
# Files to be installed
|
||||
# ===============================================================
|
||||
#
|
||||
|
||||
# These files are data, module or lib files
|
||||
nodist_salomescript_DATA= VERSION
|
||||
|
||||
EXTRA_DIST+= VERSION.in
|
273
build_configure
273
build_configure
@ -6,11 +6,14 @@
|
||||
#
|
||||
# Author : Marc Tajchman - CEA
|
||||
# Date : 10/10/2002
|
||||
# 13/03/2007: Alexander BORODIN - OCN
|
||||
# Reorganization for usage of autotools
|
||||
# $Header$
|
||||
#
|
||||
|
||||
ORIG_DIR=`pwd`
|
||||
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
|
||||
NETGENPLUGIN_WITH_GUI="yes"
|
||||
|
||||
########################################################################
|
||||
# Test if the KERNEL_ROOT_DIR is set correctly
|
||||
@ -26,12 +29,26 @@ fi
|
||||
# echo "failed : KERNEL_SRC variable is not correct !"
|
||||
# exit
|
||||
#fi
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
-with-ihm | --with-ihm)
|
||||
NETGENPLUGIN_WITH_GUI="yes"
|
||||
break;;
|
||||
-without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
|
||||
NETGENPLUGIN_WITH_GUI="no"
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
########################################################################
|
||||
# Test if the GUI_ROOT_DIR is set correctly
|
||||
|
||||
if test ! -d "${GUI_ROOT_DIR}"; then
|
||||
echo "failed : GUI_ROOT_DIR variable is not correct !"
|
||||
exit
|
||||
if test ${NETGENPLUGIN_WITH_GUI} = yes; then
|
||||
if test ! -d "${GUI_ROOT_DIR}"; then
|
||||
echo "failed : GUI_ROOT_DIR variable is not correct !"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
########################################################################
|
||||
@ -58,195 +75,93 @@ if test ! -d "${SMESH_ROOT_DIR}"; then
|
||||
exit
|
||||
fi
|
||||
|
||||
########################################################################
|
||||
# find_in - utility function
|
||||
#
|
||||
# usage :
|
||||
# find_in directory filename
|
||||
#
|
||||
# Finds files following the *.in pattern, recursively in the
|
||||
# directory (first argument).
|
||||
# Results are appended into the file (second argument)
|
||||
#
|
||||
# Difference from the standard unix find is that files are tested
|
||||
# before directories
|
||||
#
|
||||
|
||||
find_in()
|
||||
{
|
||||
local i
|
||||
local f=$2
|
||||
|
||||
# if the first argument is not a directory, returns
|
||||
|
||||
if [ ! -d "$1" ] ; then
|
||||
return
|
||||
fi
|
||||
|
||||
# dont look in the CVS directories
|
||||
|
||||
case $1 in
|
||||
*/CVS) return ;;
|
||||
*/adm_local/*) return ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# for each regular file contained in the directory
|
||||
# test if it's a .in file
|
||||
|
||||
for i in "$1"/*
|
||||
do
|
||||
if [ -f "$i" ] ; then
|
||||
case $i in
|
||||
*.in) echo " "$i" \\" >> $f;;
|
||||
*) ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
# for each subdirectory of the first argument, proceeds recursively
|
||||
|
||||
for i in "$1"/*
|
||||
do
|
||||
if [ -d "$i" ] ; then
|
||||
find_in "$i" "$f"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#######################################################################
|
||||
# Generate list of .in files (Makefile.in, config.h.in, etc)
|
||||
# appending it in file configure.in
|
||||
|
||||
cd ${CONF_DIR}
|
||||
ABS_CONF_DIR=`pwd`
|
||||
|
||||
#
|
||||
# Common part of the configure.in file
|
||||
#
|
||||
chmod u+w configure.in.base
|
||||
if ! \cp -f configure.in.base configure.in_tmp1
|
||||
then
|
||||
echo
|
||||
echo "error : can't create files in" ${CONF_DIR}
|
||||
echo "aborting ..."
|
||||
chmod u-w configure.in.base
|
||||
exit
|
||||
fi
|
||||
chmod u-w configure.in.base
|
||||
#######################################################################
|
||||
# Update configure.ac script: to set NETGENPLUGIN_WITH_GUI variable
|
||||
sed -e s/NETGENPLUGIN_WITH_GUI=[a-z]*/NETGENPLUGIN_WITH_GUI=${NETGENPLUGIN_WITH_GUI}/g configure.ac > configure.tmp
|
||||
mv -f configure.tmp configure.ac
|
||||
|
||||
if [ -e "${CONF_DIR}/salome_adm" ] ; then
|
||||
\rm -f ${CONF_DIR}/salome_adm
|
||||
fi
|
||||
mkdir -p salome_adm/unix/config_files
|
||||
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
|
||||
|
||||
# make a link allowing AC_OUTPUT to find the salome_adm/.../*.in files
|
||||
echo "" >> configure.in_tmp1
|
||||
echo 'ln -fs ${KERNEL_ROOT_DIR}/salome_adm ${ROOT_SRCDIR}/.' >> configure.in_tmp1
|
||||
cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
|
||||
|
||||
echo "" >> configure.in_tmp1
|
||||
echo "AC_OUTPUT([ \\" >> configure.in_tmp1
|
||||
#cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${MED_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${GEOM_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
#cp -f ${SMESH_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
|
||||
|
||||
#
|
||||
# List of .in files in the adm/unix directory
|
||||
# These files MUST be on top of AC_OUTPUT list so we
|
||||
# put them "manually"
|
||||
#
|
||||
# remove KERNEL deprecated configure files
|
||||
#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
|
||||
# check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
|
||||
# check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
|
||||
# do
|
||||
# rm -f salome_adm/unix/config_files/${deprecated}
|
||||
# done
|
||||
|
||||
|
||||
echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1
|
||||
echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1
|
||||
echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1
|
||||
echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1
|
||||
echo " ./adm_local/unix/make_omniorb:${ABS_CONF_DIR}/adm_local/unix/make_omniorb.in \\" >> configure.in_tmp1
|
||||
echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1
|
||||
echo " ./adm_local/unix/make_commence:${ABS_CONF_DIR}/adm_local/unix/make_commence.in \\" >> configure.in_tmp1
|
||||
echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1
|
||||
echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1
|
||||
# ____________________________________________________________________
|
||||
# aclocal creates the aclocal.m4 file from the standard macro and the
|
||||
# custom macro embedded in the directory salome_adm/unix/config_files
|
||||
# and KERNEL config_files directory.
|
||||
# output:
|
||||
# aclocal.m4
|
||||
# autom4te.cache (directory)
|
||||
echo "====================================================== aclocal"
|
||||
|
||||
\rm -f configure.in_tmp2 configure.in_tmp3
|
||||
touch configure.in_tmp2
|
||||
find_in . configure.in_tmp2
|
||||
sed -e '/^...salome_adm/d' configure.in_tmp2 > configure.in_tmp3
|
||||
sed -e '/^...adm_local.unix.make_omniorb/d' configure.in_tmp3 configure.in_tmp2
|
||||
sed -e '/^...adm_local.unix.make_commence/d' configure.in_tmp2 > configure.in_tmp3
|
||||
sed -e '/configure.in/d' configure.in_tmp3 > configure.in_tmp2
|
||||
sed -e 's/.in / /' configure.in_tmp2 >> configure.in_tmp1
|
||||
#sed '/^.salome_adm/d' configure.in_tmp2 > configure.in_tmp3
|
||||
#sed '/configure.in/d' configure.in_tmp3 > configure.in_tmp2
|
||||
#sed 's/.in / /' configure.in_tmp2 >> configure.in_tmp1
|
||||
|
||||
echo "])" >> configure.in_tmp1
|
||||
|
||||
# delete the link created for AC_OUTPUT
|
||||
echo "" >> configure.in_tmp1
|
||||
#echo 'rm -f ${ROOT_SRCDIR}/salome_adm' >> configure.in_tmp1
|
||||
\mv configure.in_tmp1 configure.in_new
|
||||
\rm -f configure.in_tmp2 configure.in_tmp3
|
||||
|
||||
|
||||
########################################################################
|
||||
# Create new (or replace old) configure.in file
|
||||
# Print a message if the file is write protected
|
||||
#
|
||||
|
||||
echo
|
||||
if test ! -f configure.in
|
||||
then
|
||||
echo -n "Creating new file 'configure.in' ... "
|
||||
if \mv configure.in_new configure.in >& /dev/null
|
||||
then
|
||||
echo "done"
|
||||
else
|
||||
echo "error, check your file permissions"
|
||||
fi
|
||||
if test ${NETGENPLUGIN_WITH_GUI} = yes; then
|
||||
aclocal -I adm_local/unix/config_files \
|
||||
-I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
|
||||
-I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${MED_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${SMESH_ROOT_DIR}/adm_local/unix/config_files || exit 1
|
||||
else
|
||||
echo -n "Updating 'configure.in' file ... "
|
||||
if ! \cp configure.in configure.in_old >& /dev/null
|
||||
then
|
||||
echo
|
||||
echo
|
||||
echo "Can't backup previous configure.in"
|
||||
echo -n "Continue (you will not be able to revert) - (Y/N) ? "
|
||||
read R
|
||||
case "x$R" in
|
||||
xn*) exit;;
|
||||
xN*) exit;;
|
||||
esac
|
||||
echo
|
||||
echo -n " "
|
||||
fi
|
||||
if \cp configure.in_new configure.in >& /dev/null
|
||||
then
|
||||
echo "done"
|
||||
else
|
||||
echo
|
||||
echo "error, can't update previous configure.in"
|
||||
fi
|
||||
aclocal -I adm_local/unix/config_files \
|
||||
-I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
|
||||
-I ${MED_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${SMESH_ROOT_DIR}/adm_local/unix/config_files || exit 1
|
||||
fi
|
||||
|
||||
########################################################################
|
||||
# Use autoconf to rebuild the configure script
|
||||
#
|
||||
# ____________________________________________________________________
|
||||
# libtoolize creates some configuration files (ltmain.sh,
|
||||
# config.guess and config.sub). It only depends on the libtool
|
||||
# version. The files are created in the directory specified with the
|
||||
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
|
||||
# output:
|
||||
# salome_adm/unix/config_files/config.guess
|
||||
# salome_adm/unix/config_files/config.sub
|
||||
# salome_adm/unix/config_files/ltmain.sh
|
||||
#echo "====================================================== libtoolize"
|
||||
|
||||
if test -f configure
|
||||
then
|
||||
echo -n "Updating 'configure' script ... "
|
||||
else
|
||||
echo -n "Creating 'configure' script ... "
|
||||
fi
|
||||
libtoolize --force --copy --automake || exit 1
|
||||
|
||||
aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
|
||||
-I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${MED_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
|
||||
-I ${SMESH_ROOT_DIR}/adm_local/unix/config_files
|
||||
if autoconf
|
||||
then
|
||||
echo "done"
|
||||
else
|
||||
echo "failed (check file permissions and/or user quotas ...)"
|
||||
fi
|
||||
# ____________________________________________________________________
|
||||
# autoconf creates the configure script from the file configure.ac (or
|
||||
# configure.in if configure.ac doesn't exist)
|
||||
# output:
|
||||
# configure
|
||||
echo "====================================================== autoconf"
|
||||
|
||||
cd ${ORIG_DIR}
|
||||
autoconf
|
||||
|
||||
echo
|
||||
# ____________________________________________________________________
|
||||
# automake creates some scripts used in building process
|
||||
# (install-sh, missing, ...). It only depends on the automake
|
||||
# version. The files are created in the directory specified with the
|
||||
# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
|
||||
# creates the Makefile.in files from the Makefile.am files.
|
||||
# output:
|
||||
# salome_adm/unix/config_files/compile
|
||||
# salome_adm/unix/config_files/depcomp
|
||||
# salome_adm/unix/config_files/install-sh
|
||||
# salome_adm/unix/config_files/missing
|
||||
# salome_adm/unix/config_files/py-compile
|
||||
# Makefile.in (from Makefile.am)
|
||||
echo "====================================================== automake"
|
||||
|
||||
automake --copy --gnu --add-missing
|
||||
|
@ -11,22 +11,25 @@
|
||||
# Date : 28/06/2001
|
||||
# Modified by : Patrick GOLDBRONN (CEA)
|
||||
# Modified by : Marc Tajchman (CEA)
|
||||
# 13/03/2007: Alexander BORODIN - OCN
|
||||
# Reorganization for usage of autotools
|
||||
#
|
||||
# Created from configure.in.base
|
||||
#
|
||||
|
||||
AC_INIT(src)
|
||||
AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files)
|
||||
AC_INIT([Salome2 Project NETGENPLUGIN module], [4.1.1], [webmaster.salome@opencascade.com], [salome])
|
||||
AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
PACKAGE=salome
|
||||
AC_SUBST(PACKAGE)
|
||||
|
||||
VERSION=3.2.0
|
||||
XVERSION=0x030200
|
||||
AC_SUBST(VERSION)
|
||||
XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
|
||||
AC_SUBST(XVERSION)
|
||||
|
||||
# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
|
||||
MODULE_NAME=netgenplugin
|
||||
AC_SUBST(MODULE_NAME)
|
||||
|
||||
dnl
|
||||
dnl Initialize source and build root directories
|
||||
dnl
|
||||
@ -102,6 +105,21 @@ AC_DEPEND_FLAG
|
||||
# AC_CC_WARNINGS([ansi])
|
||||
cc_ok=yes
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing Fortran
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
fortran_ok=no
|
||||
AC_PROG_F77
|
||||
AC_F77_LIBRARY_LDFLAGS
|
||||
AC_PROG_FC
|
||||
AC_FC_LIBRARY_LDFLAGS
|
||||
if test "X$FC" != "X" ; then
|
||||
fortran_ok=yes
|
||||
fi
|
||||
|
||||
dnl Library libdl :
|
||||
AC_CHECK_LIB(dl,dlopen)
|
||||
|
||||
@ -150,6 +168,8 @@ echo
|
||||
|
||||
CHECK_PYTHON
|
||||
|
||||
AM_PATH_PYTHON(2.3)
|
||||
|
||||
dnl echo
|
||||
dnl echo ---------------------------------------------
|
||||
dnl echo testing java
|
||||
@ -203,37 +223,63 @@ AC_SUBST_FILE(CORBA)
|
||||
corba=make_$ORB
|
||||
CORBA=adm_local/unix/$corba
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing openGL
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
NETGENPLUGIN_WITH_GUI=no
|
||||
|
||||
CHECK_OPENGL
|
||||
AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${NETGENPLUGIN_WITH_GUI}" = "yes"])
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing QT
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing MSG2QM
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_QT
|
||||
CHECK_MSG2QM
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing MSG2QM
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing openGL
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_MSG2QM
|
||||
CHECK_OPENGL
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing VTK
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing QT
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_VTK
|
||||
CHECK_QT
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing VTK
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_VTK
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_SALOME_GUI
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing full GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_CORBA_IN_GUI
|
||||
if test "x${CORBA_IN_GUI}" != "xyes"; then
|
||||
echo "failed : For configure NETGENPLUGIN module necessary full GUI !"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
@ -259,26 +305,6 @@ echo
|
||||
|
||||
CHECK_HTML_GENERATORS
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_SALOME_GUI
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing full GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_CORBA_IN_GUI
|
||||
if test "x${CORBA_IN_GUI}" != "xyes"; then
|
||||
echo "failed : For configure NETGENPLUGIN module necessary full GUI !"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing Kernel
|
||||
@ -295,13 +321,13 @@ echo
|
||||
|
||||
CHECK_GEOM
|
||||
|
||||
# echo
|
||||
# echo ---------------------------------------------
|
||||
# echo Testing Med
|
||||
# echo ---------------------------------------------
|
||||
# echo
|
||||
#
|
||||
# CHECK_MED
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing Med
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_MED
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
@ -325,8 +351,15 @@ echo Summary
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
#AM_CONDITIONAL( USE_GFORTRAN, [test "$F77" = "gfortran"])
|
||||
|
||||
echo Configure
|
||||
if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
fi
|
||||
if test "${NETGENPLUGIN_WITH_GUI}" = "no"; then
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok hdf5_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
fi
|
||||
|
||||
for var in $variables
|
||||
do
|
||||
@ -338,15 +371,6 @@ echo
|
||||
echo "Default ORB : $DEFAULT_ORB"
|
||||
echo
|
||||
|
||||
dnl generals files which could be included in every makefile
|
||||
|
||||
AC_SUBST_FILE(COMMENCE) COMMENCE=adm_local/unix/make_commence
|
||||
AC_SUBST_FILE(CONCLUDE) CONCLUDE=salome_adm/unix/make_conclude
|
||||
AC_SUBST_FILE(MODULE) MODULE=salome_adm/unix/make_module
|
||||
|
||||
dnl les dependences
|
||||
AC_SUBST_FILE(DEPEND) DEPEND=salome_adm/unix/depend
|
||||
|
||||
dnl We don t need to say when we re entering directories if we re using
|
||||
dnl GNU make becuase make does it for us.
|
||||
if test "X$GMAKE" = "Xyes"; then
|
||||
@ -355,67 +379,10 @@ else
|
||||
AC_SUBST(SETX) SETX="set -x"
|
||||
fi
|
||||
|
||||
# make other build directories
|
||||
for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl
|
||||
do
|
||||
# if test ! -d $rep ; then
|
||||
# eval mkdir $rep
|
||||
# fi
|
||||
$INSTALL -d $rep
|
||||
done
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo copying resource files, shell scripts, and
|
||||
echo xml files
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
|
||||
dnl copy resources directories
|
||||
|
||||
#for i in `find $ROOT_SRCDIR -name 'resources' -print`
|
||||
#do
|
||||
# local_res=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
|
||||
# local_res_dir=`echo $local_res | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
|
||||
# mkdir -p $local_res_dir
|
||||
# cd $local_res_dir
|
||||
# ln -fs $i
|
||||
# echo $local_res
|
||||
# cd $ROOT_BUILDDIR
|
||||
#done
|
||||
|
||||
dnl copy shells and utilities contained in the bin directory
|
||||
dnl excluding .in files (treated in AC-OUTPUT below) and CVS
|
||||
dnl excluding .in files (treated in AC-OUTPUT below) and CVS
|
||||
dnl directory
|
||||
|
||||
#mkdir -p bin/salome
|
||||
#cd bin/salome
|
||||
#for i in $ROOT_SRCDIR/bin/*
|
||||
#do
|
||||
# local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
|
||||
# case "$local_bin" in
|
||||
# *.in | *~) ;;
|
||||
# ./bin/CVS | ./bin/salome) ;;
|
||||
# *) /usr/bin/install -C $i .; echo $local_bin ;;
|
||||
# esac
|
||||
#done
|
||||
#cd $ROOT_BUILDDIR
|
||||
|
||||
AC_SUBST_FILE(ENVSCRIPT) ENVSCRIPT=salome_adm/unix/envScript
|
||||
|
||||
dnl copy xml files to the build tree (lib directory)
|
||||
dnl pourquoi ????
|
||||
|
||||
#cd lib
|
||||
#for i in `find $ROOT_SRCDIR -name "*.xml" -print`
|
||||
#do
|
||||
# ln -fs $i
|
||||
# echo `echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
|
||||
#done
|
||||
#cd $ROOT_BUILDDIR
|
||||
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo generating Makefiles and configure files
|
||||
@ -423,7 +390,27 @@ echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
#AC_OUTPUT_COMMANDS([ \
|
||||
# chmod +x ./bin/* \
|
||||
# chmod +x ./bin/*; \
|
||||
# chmod +x ./bin/salome/*;
|
||||
#])
|
||||
|
||||
## do not delete this line
|
||||
# This list is initiated using autoscan and must be updated manually
|
||||
# when adding a new file <filename>.in to manage. When you execute
|
||||
# autoscan, the Makefile list is generated in the output file configure.scan.
|
||||
# This could be helpfull to update de configuration.
|
||||
AC_OUTPUT([ \
|
||||
./salome_adm/unix/SALOMEconfig.h \
|
||||
./adm_local/Makefile \
|
||||
./adm_local/unix/Makefile \
|
||||
./adm_local/unix/config_files/Makefile \
|
||||
./bin/VERSION \
|
||||
./bin/Makefile \
|
||||
./NETGENPLUGIN_version.h \
|
||||
./src/Makefile \
|
||||
./src/GUI/Makefile \
|
||||
./src/NETGEN/Makefile \
|
||||
./src/NETGENPlugin/Makefile \
|
||||
./resources/Makefile \
|
||||
./idl/Makefile \
|
||||
Makefile \
|
||||
])
|
119
idl/Makefile.am
Normal file
119
idl/Makefile.am
Normal file
@ -0,0 +1,119 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, CEA, EDF R&D, LEG
|
||||
# PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
#
|
||||
# This Makefile is responsible of generating the client and server
|
||||
# implementation of IDL interfaces for both C++ and python usage.
|
||||
# The building process of the C++ files is in charge of each source
|
||||
# package and then is not manage here.
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
BASEIDL_FILES= NETGENPlugin_Algorithm.idl
|
||||
|
||||
EXTRA_DIST+= $(BASEIDL_FILES)
|
||||
|
||||
# This variable defines the files to be installed
|
||||
salomeidl_DATA = $(BASEIDL_FILES)
|
||||
|
||||
# GUI idl common library
|
||||
lib_LTLIBRARIES = libSalomeIDLNETGENPLUGIN.la
|
||||
|
||||
# Sources built from idl files
|
||||
nodist_libSalomeIDLNETGENPLUGIN_la_SOURCES= NETGENPlugin_AlgorithmSK.cc
|
||||
|
||||
# header files must be exported: other modules have to use this library
|
||||
nodist_salomeinclude_HEADERS= $(BASEIDL_FILES:%.idl=%.hh)
|
||||
|
||||
libSalomeIDLNETGENPLUGIN_la_CPPFLAGS =\
|
||||
$(KERNEL_CXXFLAGS) \
|
||||
$(GEOM_CXXFLAGS) \
|
||||
$(SMESH_CXXFLAGS) \
|
||||
@CORBA_CXXFLAGS@ \
|
||||
@CORBA_INCLUDES@ \
|
||||
-I$(top_builddir)/salome_adm/unix \
|
||||
-I$(top_builddir)/idl
|
||||
|
||||
|
||||
libSalomeIDLNETGENPLUGIN_la_LDFLAGS = -no-undefined -version-info=0:0:0
|
||||
libSalomeIDLNETGENPLUGIN_la_LIBADD = \
|
||||
$(KERNEL_LDFLAGS) -lSalomeIDLKernel \
|
||||
$(SMESH_LDFLAGS) -lSalomeIDLSMESH \
|
||||
$(GEOM_LDFLAGS) -lSalomeIDLGEOM \
|
||||
@CORBA_LIBS@
|
||||
|
||||
# These variables defines the building process of CORBA files
|
||||
OMNIORB_IDL = @OMNIORB_IDL@
|
||||
OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
|
||||
OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ \
|
||||
-I$(top_builddir)/idl/salome \
|
||||
-I$(KERNEL_ROOT_DIR)/idl/salome \
|
||||
-I$(GEOM_ROOT_DIR)/idl/salome \
|
||||
-I$(SMESH_ROOT_DIR)/idl/salome
|
||||
|
||||
IDLCXXFLAGS = \
|
||||
-bcxx \
|
||||
@IDLCXXFLAGS@ \
|
||||
-I$(top_builddir)/idl/salome \
|
||||
-I$(KERNEL_ROOT_DIR)/idl/salome \
|
||||
-I$(GEOM_ROOT_DIR)/idl/salome \
|
||||
-I$(SMESH_ROOT_DIR)/idl/salome \
|
||||
-I$(top_builddir)/salome_adm/unix
|
||||
IDLPYFLAGS = \
|
||||
@IDLPYFLAGS@ \
|
||||
-I$(KERNEL_ROOT_DIR)/idl/salome \
|
||||
-I$(GEOM_ROOT_DIR)/idl/salome \
|
||||
-I$(SMESH_ROOT_DIR)/idl/salome
|
||||
|
||||
# potential problem on parallel make on the following - multiple outputs
|
||||
SUFFIXES = .idl .hh SK.cc
|
||||
.idlSK.cc:
|
||||
$(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
|
||||
.idl.hh:
|
||||
$(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
|
||||
|
||||
install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
|
||||
$(INSTALL) -d $(pkgpythondir)
|
||||
ls $^ | while read file; do \
|
||||
$(OMNIORB_IDL) $(IDLPYFLAGS) -C$(pkgpythondir) $$file ; \
|
||||
done
|
||||
|
||||
# uninstall-local removes too much, but it works in distcheck
|
||||
uninstall-local:
|
||||
rm -rf $(pkgpythondir)/*
|
||||
|
||||
mostlyclean-local:
|
||||
-rm -f *.hh *.cc .depidl
|
||||
|
||||
# we use cpp to generate dependencies between idl files.
|
||||
# option x c tells the preprocessor to consider idl as a c file.
|
||||
# if an idl is modified, all idl dependencies are rebuilt
|
||||
|
||||
.depidl: $(BASEIDL_FILES)
|
||||
@echo "" > $@
|
||||
@for dep in $^ dummy; do \
|
||||
if [ $$dep != "dummy" ]; then \
|
||||
echo Building dependencies for $$dep; \
|
||||
$(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(SMESH_ROOT_DIR)/idl/salome -I$(top_builddir)/salome_adm/unix $$dep 2>/dev/null | \
|
||||
sed 's/\.o/\SK.cc/' >>$@; \
|
||||
fi; \
|
||||
done ;
|
||||
|
||||
-include .depidl
|
@ -1,84 +0,0 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
#
|
||||
# generate dependencies for idl file :
|
||||
#
|
||||
|
||||
# source path
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:${KERNEL_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome :${SMESH_ROOT_DIR}/idl/salome
|
||||
#:${MED_ROOT_DIR}/idl/salome
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
IDL_FILES = NETGENPlugin_Algorithm.idl
|
||||
|
||||
|
||||
# copy all idl file in $(top_builddir)/idl
|
||||
inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
|
||||
|
||||
$(top_builddir)/idl/salome:
|
||||
$(INSTALL) -d $@
|
||||
|
||||
$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
|
||||
cp -f $^ $(top_builddir)/idl/salome
|
||||
|
||||
|
||||
# python wrap
|
||||
lib: pyidl
|
||||
|
||||
PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
|
||||
|
||||
pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
|
||||
|
||||
$(PYTHON_BUILD_SITE):
|
||||
$(INSTALL) -d $@
|
||||
|
||||
$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
|
||||
$(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
|
||||
|
||||
|
||||
# install python client (generated from idl file)
|
||||
install: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
|
||||
$(INSTALL) -d $(idldir) $(PYTHON_SITE_INSTALL)
|
||||
$(INSTALL_DATA) $^ $(idldir)
|
||||
@for file in $^ dummy; do \
|
||||
if [ $$file != "dummy" ]; then \
|
||||
$(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
|
||||
fi ; \
|
||||
done ;
|
||||
|
||||
uninstall:
|
||||
-$(RM) $(IDL_FILES:%=$(idldir)/%)
|
||||
-$(RM) $(IDL_FILES:%.idl=$(PYTHON_SITE_INSTALL)/%_idl.py)
|
||||
|
||||
# clean
|
||||
cleandep:
|
||||
-$(RM) .dep*
|
||||
|
||||
clean: cleandep
|
||||
-$(RM) $(top_builddir)/idl/salome/*.idl
|
||||
-$(RM) $(PYTHON_BUILD_SITE)/*.py
|
||||
|
||||
distclean: clean
|
||||
-$(RM) Makefile
|
||||
|
@ -41,19 +41,28 @@ module NETGENPlugin
|
||||
};
|
||||
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D: interface of "1D-2D (Netgen)" algorithm
|
||||
* NETGENPlugin_NETGEN_2D: interface of "Netgen 1D-2D" algorithm
|
||||
*/
|
||||
interface NETGENPlugin_NETGEN_2D : SMESH::SMESH_2D_Algo
|
||||
{
|
||||
};
|
||||
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D3D: interface of "1D-2D-3D (Netgen)" algorithm
|
||||
* NETGENPlugin_NETGEN_2D3D: interface of "Netgen 1D-2D-3D" algorithm
|
||||
*/
|
||||
interface NETGENPlugin_NETGEN_2D3D : SMESH::SMESH_3D_Algo
|
||||
{
|
||||
};
|
||||
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D_ONLY: interface of "Netgen 2D" algorithm,
|
||||
* generating 2D elements on a geometrical face taking
|
||||
* into account pre-existing nodes on face boundaries
|
||||
*/
|
||||
interface NETGENPlugin_NETGEN_2D_ONLY : SMESH::SMESH_2D_Algo
|
||||
{
|
||||
};
|
||||
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis: interface of "NETGEN parameters" hypothesis
|
||||
*/
|
||||
|
39
resources/Makefile.am
Normal file
39
resources/Makefile.am
Normal file
@ -0,0 +1,39 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
# -* Makefile *-
|
||||
#
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Date : 28/06/2001
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# $Header$
|
||||
#
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
dist_salomeres_DATA = \
|
||||
mesh_algo_netgen_2d.png \
|
||||
mesh_algo_netgen_2d3d.png \
|
||||
mesh_hypo_netgen.png \
|
||||
mesh_hypo_netgen_2d.png \
|
||||
mesh_tree_algo_netgen_2d.png \
|
||||
mesh_tree_algo_netgen_2d3d.png \
|
||||
mesh_tree_hypo_netgen.png \
|
||||
mesh_tree_hypo_netgen_2d.png \
|
||||
NETGENPlugin.xml
|
@ -7,8 +7,8 @@
|
||||
|
||||
<meshers-group name="NETGEN"
|
||||
resources="NETGENPlugin"
|
||||
server-lib="libNETGENEngine.so"
|
||||
gui-lib="libNETGENPluginGUI.so">
|
||||
server-lib="NETGENEngine"
|
||||
gui-lib="NETGENPluginGUI">
|
||||
<hypotheses>
|
||||
<hypothesis type="NETGEN_Parameters"
|
||||
label-id="NETGEN 3D Parameters"
|
||||
@ -24,6 +24,7 @@
|
||||
label-id="Tetrahedron (Netgen)"
|
||||
icon-id="mesh_algo_tetra.png"
|
||||
hypos="MaxElementVolume"
|
||||
need-geom="false"
|
||||
input="TRIA"
|
||||
dim="3"/>
|
||||
<algorithm type="NETGEN_2D"
|
||||
@ -37,6 +38,14 @@
|
||||
icon-id="mesh_algo_netgen_2d3d.png"
|
||||
hypos="NETGEN_Parameters"
|
||||
dim="3"/>
|
||||
<algorithm type="NETGEN_2D_ONLY"
|
||||
label-id="Netgen 2D"
|
||||
icon-id="mesh_algo_netgen_2d.png"
|
||||
hypos="LengthFromEdges,MaxElementArea"
|
||||
opt-hypos="QuadranglePreference"
|
||||
input="EDGE"
|
||||
output="TRIA,QUAD"
|
||||
dim="2"/>
|
||||
</algorithms>
|
||||
</meshers-group>
|
||||
|
||||
|
71
src/GUI/Makefile.am
Normal file
71
src/GUI/Makefile.am
Normal file
@ -0,0 +1,71 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
# File : Makefile.in
|
||||
# Author : Michael Sazonov
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# Module : NETGENPLUGIN
|
||||
# $Header$
|
||||
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
# header files
|
||||
salomeinclude_HEADERS =
|
||||
|
||||
# Libraries targets
|
||||
lib_LTLIBRARIES = libNETGENPluginGUI.la
|
||||
|
||||
dist_libNETGENPluginGUI_la_SOURCES = \
|
||||
NETGENPluginGUI.cxx \
|
||||
NETGENPluginGUI_HypothesisCreator.cxx
|
||||
|
||||
MOC_FILES = \
|
||||
NETGENPluginGUI_HypothesisCreator_moc.cxx
|
||||
|
||||
nodist_libNETGENPluginGUI_la_SOURCES= \
|
||||
$(MOC_FILES)
|
||||
|
||||
# additionnal information to compil and link file
|
||||
|
||||
libNETGENPluginGUI_la_CPPFLAGS = \
|
||||
$(QT_INCLUDES) \
|
||||
$(CAS_CPPFLAGS) \
|
||||
$(PYTHON_INCLUDES) \
|
||||
$(KERNEL_CXXFLAGS) \
|
||||
$(GUI_CXXFLAGS) \
|
||||
$(GEOM_CXXFLAGS) \
|
||||
$(MED_CXXFLAGS) \
|
||||
$(SMESH_CXXFLAGS) \
|
||||
$(BOOST_CPPFLAGS) \
|
||||
$(CORBA_CXXFLAGS) \
|
||||
$(CORBA_INCLUDES) \
|
||||
-I$(srcdir)/../NETGENPlugin \
|
||||
-I$(top_builddir)/idl \
|
||||
-I$(top_builddir)/salome_adm/unix
|
||||
|
||||
libNETGENPluginGUI_la_LDFLAGS = \
|
||||
../NETGENPlugin/libNETGENEngine.la \
|
||||
${SMESH_LDFLAGS} -lSMESH \
|
||||
$(CAS_KERNEL)
|
||||
|
||||
# resources files
|
||||
nodist_salomeres_DATA= \
|
||||
NETGENPlugin_images.qm \
|
||||
NETGENPlugin_msg_en.qm
|
||||
|
@ -1,74 +0,0 @@
|
||||
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
# File : Makefile.in
|
||||
# Author : Michael Sazonov
|
||||
# Module : NETGENPLUGIN
|
||||
# $Header$
|
||||
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=../..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${GUI_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${SMESH_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
# .po files to transform in .qm
|
||||
PO_FILES = \
|
||||
NETGENPlugin_images.po \
|
||||
NETGENPlugin_msg_en.po
|
||||
|
||||
# Libraries targets
|
||||
LIB = libNETGENPluginGUI.la
|
||||
|
||||
LIB_SRC = \
|
||||
NETGENPluginGUI.cxx \
|
||||
NETGENPluginGUI_HypothesisCreator.cxx
|
||||
|
||||
LIB_MOC = \
|
||||
NETGENPluginGUI_HypothesisCreator.h
|
||||
|
||||
LIB_CLIENT_IDL = \
|
||||
SALOME_Exception.idl \
|
||||
SALOME_GenericObj.idl \
|
||||
SALOME_Component.idl \
|
||||
SALOME_Comm.idl \
|
||||
GEOM_Gen.idl \
|
||||
MED.idl \
|
||||
SMESH_Gen.idl \
|
||||
SMESH_Mesh.idl \
|
||||
SMESH_Group.idl \
|
||||
NETGENPlugin_Algorithm.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
# additionnal information to compil and link file
|
||||
|
||||
CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) \
|
||||
-I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome \
|
||||
-I${GEOM_ROOT_DIR}/include/salome -I${SMESH_ROOT_DIR}/include/salome \
|
||||
$(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome \
|
||||
-I${GEOM_ROOT_DIR}/include/salome -I${SMESH_ROOT_DIR}/include/salome
|
||||
|
||||
LDFLAGS += -lSMESH $(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome \
|
||||
-L${GUI_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome \
|
||||
-L${SMESH_ROOT_DIR}/lib/salome
|
||||
|
||||
@CONCLUDE@
|
@ -35,6 +35,7 @@
|
||||
//=============================================================================
|
||||
extern "C"
|
||||
{
|
||||
NETGENPLUGIN_GUI_EXPORT
|
||||
SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& aHypType )
|
||||
{
|
||||
SMESHGUI_GenericHypothesisCreator* aCreator = NULL;
|
||||
|
@ -122,16 +122,18 @@ QFrame* NETGENPluginGUI_HypothesisCreator::buildFrame()
|
||||
myGrowthRate->setMinValue( 0.1 );
|
||||
myGrowthRate->setMaxValue( 10 );
|
||||
myGrowthRate->setLineStep( 0.1 );
|
||||
|
||||
|
||||
const double VALUE_MAX = 1.0e+6;
|
||||
|
||||
new QLabel( tr( "NETGEN_SEG_PER_EDGE" ), GroupC1 );
|
||||
myNbSegPerEdge = new QtxDblSpinBox( GroupC1 );
|
||||
myNbSegPerEdge->setMinValue( 0.2 );
|
||||
myNbSegPerEdge->setMaxValue( 5.0 );
|
||||
myNbSegPerEdge->setMaxValue( VALUE_MAX ); // (PAL14890) max value in native netgen gui is 5
|
||||
|
||||
new QLabel( tr( "NETGEN_SEG_PER_RADIUS" ), GroupC1 );
|
||||
myNbSegPerRadius = new QtxDblSpinBox( GroupC1 );
|
||||
myNbSegPerRadius->setMinValue( 0.2 );
|
||||
myNbSegPerRadius->setMaxValue( 5.0 );
|
||||
myNbSegPerRadius->setMaxValue( VALUE_MAX ); // (PAL14890) max value in native netgen gui is 5
|
||||
|
||||
if ( hypType()=="NETGEN_Parameters_2D" )
|
||||
{
|
||||
|
@ -28,6 +28,16 @@
|
||||
#ifndef NETGENPLUGINGUI_HypothesisCreator_HeaderFile
|
||||
#define NETGENPLUGINGUI_HypothesisCreator_HeaderFile
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef NETGENPLUGIN_GUI_EXPORTS
|
||||
#define NETGENPLUGIN_GUI_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define NETGENPLUGIN_GUI_EXPORT __declspec( dllimport )
|
||||
#endif
|
||||
#else
|
||||
#define NETGENPLUGIN_GUI_EXPORT
|
||||
#endif
|
||||
|
||||
#include <SMESHGUI_Hypotheses.h>
|
||||
|
||||
class QtxDblSpinBox;
|
||||
@ -46,7 +56,7 @@ typedef struct
|
||||
/*!
|
||||
* \brief Class for creation of NETGEN2D and NETGEN3D hypotheses
|
||||
*/
|
||||
class NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
|
||||
class NETGENPLUGIN_GUI_EXPORT NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -21,16 +21,16 @@
|
||||
#
|
||||
# File : Makefile.in
|
||||
# Author : Patrick GOLDBRONN (CEA)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# Module : SMESH
|
||||
# $Header$
|
||||
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
@COMMENCE@
|
||||
#SUBDIRS = NETGEN NETGENPlugin GUI
|
||||
|
||||
SUBDIRS = NETGEN NETGENPlugin GUI
|
||||
SUBDIRS = NETGEN NETGENPlugin
|
||||
|
||||
@MODULE@
|
||||
if NETGENPLUGIN_ENABLE_GUI
|
||||
SUBDIRS += GUI
|
||||
endif
|
@ -20,23 +20,17 @@
|
||||
# -* Makefile *-
|
||||
#
|
||||
# Author : Edward AGAPOV (OCC)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# Module : NETGENPLUGIN
|
||||
# Date : 10/01/2004
|
||||
#
|
||||
#
|
||||
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=../..
|
||||
srcdir=@srcdir@
|
||||
VPATH=
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
# build .so of NETGEN itself
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
LIB = libNETGEN.la
|
||||
|
||||
@CONCLUDE@
|
||||
lib_LTLIBRARIES = libNETGEN.la
|
||||
|
||||
LIB_OBJ_O = \
|
||||
linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o \
|
||||
@ -70,19 +64,14 @@ $(LIB_OBJ_O):
|
||||
ar x $(NETGEN_LIBS_DIR)/libgeom2d.a
|
||||
rm -rf csgparser.o dynamicmem.o extrusion.o occconstruction.o parthreads.o readuser.o writeabaqus.o writediffpack.o writeelmer.o writefeap.o writefluent.o writegmsh.o writejcm.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o
|
||||
|
||||
LIB_OBJ_LO = $(LIB_OBJ_O:%.o=%.lo)
|
||||
#LIB_OBJ_LO = $(LIB_OBJ_O:%.o=%.lo)
|
||||
#%.lo: %.o; @ln -s $< $@
|
||||
|
||||
%.lo: %.o; @ln -s $< $@
|
||||
nodist_libNETGEN_la_SOURCES =
|
||||
|
||||
$(LIB): $(LIB_OBJ_O) $(LIB_OBJ_LO)
|
||||
LIB_OBJ = $(LIB_OBJ_LO)
|
||||
|
||||
ifeq ($(F77),gfortran)
|
||||
LDFLAGS += -lgfortran
|
||||
else
|
||||
LDFLAGS += -lg2c
|
||||
endif
|
||||
|
||||
LDFLAGS += $(OCC_LDPATH) -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES
|
||||
libNETGEN_la_LDFLAGS = $(LIB_OBJ_O) \
|
||||
$(CAS_LDPATH) -lTKernel -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKMesh -lTKSTL $(FCLIBS) $(STDLIB)
|
||||
|
||||
MOSTLYCLEAN += $(LIB_OBJ_O)
|
||||
libNETGEN_la_DEPENDENCIES = $(LIB_OBJ_O)
|
@ -1,23 +1,40 @@
|
||||
The Netgen 4.5 from the web location : http://www.hpfem.jku.at/netgen/
|
||||
(CVS access) is used in the SMESH Module of Salome3 distribution.
|
||||
|
||||
How to build Netgen for Salome
|
||||
1. How to build Netgen for Salome
|
||||
------------------------------
|
||||
|
||||
Patch the netgen 4.5 distribution:
|
||||
1.1. Download Netgen 4.5 from the NETGEN home site (see above).
|
||||
|
||||
1.2. Unpack the downloaded Netgen 4.5 archive
|
||||
(hereafter we assume that this is netgen45 directory)
|
||||
|
||||
1.3. Patch the netgen 4.5 distribution for SALOME:
|
||||
|
||||
$ cd netgen45
|
||||
$ patch -p1 < patch_directory/netgen45ForSalome.patch
|
||||
|
||||
Then run makeForSalome.sh (it will be created by the patch):
|
||||
1.4. For 64-bit platform you also need to apply another patch:
|
||||
|
||||
$ cd netgen45
|
||||
$ patch -p1 < patch_directory/netgen45lib64.patch
|
||||
|
||||
1.5. Set CASROOT environment variable to OCCT installation path,
|
||||
since Netgen 4.5 requires Open CASCADE Technology:
|
||||
|
||||
$ setenv CASROOT <occt_installation_path>
|
||||
|
||||
1.6. Compile and install netgen 4.5. To do this, simply run
|
||||
makeForSalome.sh script (it is created from the patch):
|
||||
|
||||
$ sh makeForSalome.sh
|
||||
|
||||
|
||||
Additional information for maintainers
|
||||
2. Additional information for maintainers
|
||||
--------------------------------------
|
||||
|
||||
The file check_NETGENPLUGIN.m4 assumes
|
||||
that Netgen is installed in the directory <netgen_installation_path> as follow:
|
||||
The file check_NETGEN.m4 assumes that Netgen is installed in
|
||||
the directory <netgen_installation_path> as follow:
|
||||
|
||||
prompt> ls <netgen_installation_path>
|
||||
|
||||
@ -50,17 +67,16 @@ edgeflw.hpp hpref_pyramid.hpp msghandler.hpp sparsmat.hpp
|
||||
|
||||
prompt> ls <netgen_installation_path>/lib
|
||||
|
||||
LINUX/
|
||||
|
||||
prompt> ls <netgen_installation_path>/lib/LINUX
|
||||
|
||||
libcsg.a libgeom2d.a libla.a libnginterface.a libopti.a
|
||||
libgen.a libgprim.a libmesh.a libocc.a libstlgeom.a
|
||||
|
||||
The library files can be also installed in the LINUX or LINUX64
|
||||
subfolder of the lib directory.
|
||||
|
||||
All the libraries *.a should be compiled without the option -DOPENGL.
|
||||
netgen45 is assumed to be the directory downloaded from the above web
|
||||
location archive of Netgen. The library
|
||||
<netgen_installation_path>/lib/LINUX/libnginterface.a should contain the objects
|
||||
<netgen_installation_path>/lib/libnginterface.a should contain the objects
|
||||
nglib.o (from netgen45/libsrc/interface/nglib.cpp) and ngnewdelete.o
|
||||
(from netgen45/ngtcltk/ngnewdelete.cpp).
|
||||
|
||||
@ -72,7 +88,7 @@ nglib.o and ngnewdelete.o to the library libnginterface.a and
|
||||
recompile the libraries only.
|
||||
All this job is done by applying the patch and running the script makeForSalome.sh.
|
||||
|
||||
Th suggested patch alters some Netgen sources to compile them.
|
||||
The suggested patch alters some Netgen sources to compile them.
|
||||
|
||||
Michael SAZONOV
|
||||
m-sazonov@opencascade.com
|
||||
|
221
src/NETGEN/netgen43ForSalome.patch
Normal file
221
src/NETGEN/netgen43ForSalome.patch
Normal file
@ -0,0 +1,221 @@
|
||||
diff -N -r -u netgen43/libsrc/include/spline2d.hpp /tmp/netgen43/libsrc/include/spline2d.hpp
|
||||
--- netgen43/libsrc/include/spline2d.hpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ /tmp/netgen43/libsrc/include/spline2d.hpp 2003-12-10 16:28:12.000000000 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../geom2d/spline2d.hpp"
|
||||
diff -N -r -u netgen43/libsrc/include/splinegeometry2.hpp /tmp/netgen43/libsrc/include/splinegeometry2.hpp
|
||||
--- netgen43/libsrc/include/splinegeometry2.hpp 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ /tmp/netgen43/libsrc/include/splinegeometry2.hpp 2003-12-10 16:28:23.000000000 +0100
|
||||
@@ -0,0 +1 @@
|
||||
+#include "../geom2d/splinegeometry2.hpp"
|
||||
diff -N -r -u netgen43/libsrc/interface/Makefile /tmp/netgen43/libsrc/interface/Makefile
|
||||
--- netgen43/libsrc/interface/Makefile 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/interface/Makefile 2003-12-10 15:59:47.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp
|
||||
+src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp nglib.cpp ngnewdelete.cpp
|
||||
#
|
||||
lib = nginterface
|
||||
libpath = libsrc/interface
|
||||
diff -N -r -u netgen43/libsrc/interface/nglib.cpp /tmp/netgen43/libsrc/interface/nglib.cpp
|
||||
--- netgen43/libsrc/interface/nglib.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/interface/nglib.cpp 2003-12-10 16:32:54.000000000 +0100
|
||||
@@ -23,6 +23,20 @@
|
||||
|
||||
#include "nglib.h"
|
||||
|
||||
+namespace netgen
|
||||
+{
|
||||
+ char geomfilename [100];
|
||||
+
|
||||
+ //Destination for messages, errors, ...
|
||||
+ void Ng_PrintDest(const char * s)
|
||||
+ {
|
||||
+ (*mycout) << s << flush;
|
||||
+ }
|
||||
+
|
||||
+#include <spline2d.hpp>
|
||||
+#include <splinegeometry2.hpp>
|
||||
+}
|
||||
+
|
||||
using namespace netgen;
|
||||
|
||||
// constants and types:
|
||||
@@ -171,8 +185,6 @@
|
||||
// CSG Geometry
|
||||
|
||||
// FlexLexer * lexer;
|
||||
-char geomfilename [100];
|
||||
-
|
||||
|
||||
// 2D Meshing Functions:
|
||||
|
||||
@@ -362,7 +374,18 @@
|
||||
cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl;
|
||||
}
|
||||
*/
|
||||
- geo->AddEdges(readedges);
|
||||
+
|
||||
+ ARRAY< Point<3> > readedges1;
|
||||
+
|
||||
+ for (i = 1; i <= readedges.Size(); i++)
|
||||
+ {
|
||||
+ Point3d readedgesData = readedges.Get(i);
|
||||
+ Point <3> readedges1Data = Point<3>(readedgesData.X(),readedgesData.Y(),readedgesData.Z());
|
||||
+
|
||||
+ readedges1.Append(readedges1Data);
|
||||
+ }
|
||||
+
|
||||
+ geo->AddEdges(readedges1);
|
||||
}
|
||||
|
||||
if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK;
|
||||
@@ -472,7 +495,14 @@
|
||||
n = Vec3d(nv[0],nv[1],nv[2]);
|
||||
}
|
||||
|
||||
- readtrias.Append(STLReadTriangle(apts,n));
|
||||
+ Point<3> apts1[3];
|
||||
+ apts1[0] = Point<3>(p1[0],p1[1],p1[2]);
|
||||
+ apts1[1] = Point<3>(p2[0],p2[1],p2[2]);
|
||||
+ apts1[2] = Point<3>(p3[0],p3[1],p3[2]);
|
||||
+
|
||||
+ Vec<3> n1 = Vec<3>(n.X(),n.Y(),n.Z());
|
||||
+
|
||||
+ readtrias.Append(STLReadTriangle(apts1,n1));
|
||||
}
|
||||
|
||||
// add (optional) edges:
|
||||
@@ -487,30 +517,29 @@
|
||||
|
||||
// compatibility functions:
|
||||
|
||||
-void MyError (const char * ch)
|
||||
+void netgen::MyError (const char * ch)
|
||||
{
|
||||
cerr << ch;
|
||||
}
|
||||
|
||||
-//Destination for messages, errors, ...
|
||||
-void Ng_PrintDest(const char * s)
|
||||
-{
|
||||
- (*mycout) << s << flush;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-double GetTime ()
|
||||
+double netgen::GetTime ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void ResetTime ()
|
||||
+void netgen::ResetTime ()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
-void MyBeep (int i)
|
||||
+void netgen::MyBeep (int i)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
+void MeshFromSpline2D (SplineGeometry2d & geometry,
|
||||
+ Mesh *& mesh,
|
||||
+ MeshingParameters & mp)
|
||||
+{
|
||||
+ MeshFromSpline2D (geometry, mesh, mp);
|
||||
+}
|
||||
diff -N -r -u netgen43/libsrc/makefile.mach.LINUX /tmp/netgen43/libsrc/makefile.mach.LINUX
|
||||
--- netgen43/libsrc/makefile.mach.LINUX 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/makefile.mach.LINUX 2003-12-10 15:12:18.000000000 +0100
|
||||
@@ -14,7 +14,8 @@
|
||||
#
|
||||
CFLAGS2 =
|
||||
# pg stands for profiling - also in linkflags2
|
||||
-CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
|
||||
+#CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
|
||||
+CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX
|
||||
# -fomit-frame-pointer
|
||||
# -ffast-math
|
||||
#
|
||||
diff -N -r -u netgen43/libsrc/meshing/improve2.cpp /tmp/netgen43/libsrc/meshing/improve2.cpp
|
||||
--- netgen43/libsrc/meshing/improve2.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/meshing/improve2.cpp 2003-12-10 15:42:00.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "meshing.hpp"
|
||||
#include <opti.hpp>
|
||||
|
||||
-#include <visual.hpp>
|
||||
+/*#include <visual.hpp>*/
|
||||
|
||||
|
||||
namespace netgen
|
||||
diff -N -r -u netgen43/libsrc/meshing/meshing2.cpp /tmp/netgen43/libsrc/meshing/meshing2.cpp
|
||||
--- netgen43/libsrc/meshing/meshing2.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/meshing/meshing2.cpp 2003-12-10 15:34:35.000000000 +0100
|
||||
@@ -1785,7 +1785,7 @@
|
||||
|
||||
|
||||
#else
|
||||
-void glrender (int wait)
|
||||
+void netgen::glrender (int wait)
|
||||
{
|
||||
;
|
||||
}
|
||||
diff -N -r -u netgen43/libsrc/visualization/stlmeshing.cpp /tmp/netgen43/libsrc/visualization/stlmeshing.cpp
|
||||
--- netgen43/libsrc/visualization/stlmeshing.cpp 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/libsrc/visualization/stlmeshing.cpp 2003-12-10 15:52:53.000000000 +0100
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <stlgeom.hpp>
|
||||
|
||||
#include <meshing.hpp>
|
||||
-#include <visual.hpp>
|
||||
+/*#include <visual.hpp>*/
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
diff -N -r -u netgen43/Makefile /tmp/netgen43/Makefile
|
||||
--- netgen43/Makefile 2003-05-07 16:01:43.000000000 +0200
|
||||
+++ /tmp/netgen43/Makefile 2003-12-10 15:11:41.000000000 +0100
|
||||
@@ -35,7 +35,8 @@
|
||||
.SUFFIXES: .cpp .o
|
||||
#
|
||||
#
|
||||
-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
|
||||
+#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
|
||||
+CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include
|
||||
LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu
|
||||
#
|
||||
CPLUSPLUSFLAGS = $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3)
|
||||
diff -N -r -u netgen43/makeForSalome.sh /tmp/netgen43/makeForSalome.sh
|
||||
--- netgen43/makeForSalome.sh 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ /tmp/netgen43/makeForSalome.sh 2004-01-05 12:33:59.000000000 +0100
|
||||
@@ -0,0 +1,26 @@
|
||||
+#! /bin/sh
|
||||
+cp ngtcltk/ngnewdelete.* libsrc/interface/
|
||||
+
|
||||
+MACHINE=LINUX
|
||||
+export MACHINE
|
||||
+make -C libsrc/csg
|
||||
+make -C libsrc/general
|
||||
+make -C libsrc/geom2d
|
||||
+make -C libsrc/gprim
|
||||
+make -C libsrc/interface
|
||||
+make -C libsrc/linalg
|
||||
+make -C libsrc/meshing
|
||||
+make -C libsrc/opti
|
||||
+make -C libsrc/stlgeom
|
||||
+
|
||||
+if [ ! -d install ] ; then
|
||||
+ mkdir install
|
||||
+fi
|
||||
+
|
||||
+cp -r lib install/
|
||||
+
|
||||
+if [ ! -d install/include ] ; then
|
||||
+ mkdir install/include
|
||||
+fi
|
||||
+
|
||||
+cp libsrc/interface/nglib.h install/include
|
File diff suppressed because it is too large
Load Diff
45
src/NETGEN/netgen45lib64.patch
Executable file
45
src/NETGEN/netgen45lib64.patch
Executable file
@ -0,0 +1,45 @@
|
||||
diff -ur netgen-4.5.old/libsrc/makefile.inc netgen-4.5.new/libsrc/makefile.inc
|
||||
--- netgen-4.5/libsrc/makefile.inc 2006-04-27 13:12:54.000000000 +0400
|
||||
+++ netgen-4.5/libsrc/makefile.inc 2006-09-05 14:16:32.000000000 +0400
|
||||
@@ -14,7 +14,7 @@
|
||||
#
|
||||
include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)
|
||||
#
|
||||
-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \
|
||||
+CPLUSPLUSFLAGS1 = -c -m64 -fPIC -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \
|
||||
-DOCCGEOMETRY -DOCC52 -DHAVE_IOSTREAM -DHAVE_LIMITS_H
|
||||
#
|
||||
ARFLAGS = r
|
||||
diff -ur netgen-4.5.old/libsrc/makefile.mach.LINUX64 netgen-4.5.new/libsrc/makefile.mach.LINUX64
|
||||
--- netgen-4.5/libsrc/makefile.mach.LINUX64 2006-03-29 15:09:32.000000000 +0400
|
||||
+++ netgen-4.5/libsrc/makefile.mach.LINUX64 2006-09-07 15:48:39.000000000 +0400
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
#
|
||||
CFLAGS2 =
|
||||
-CPLUSPLUSFLAGS2 = -pg -march=nocona -O2 -DLINUX -DOPENGL \
|
||||
+CPLUSPLUSFLAGS2 = -pg -march=nocona -O2 -DLINUX \
|
||||
-ftemplate-depth-99 -finline-limit=100000 \
|
||||
-fforce-addr -funroll-loops \
|
||||
-DTRAFO -DNGSOLVE -DnoADDON -DnoLAPACK -DnoFAST \
|
||||
@@ -23,7 +23,7 @@
|
||||
#
|
||||
#
|
||||
|
||||
-LINKFLAGS2 = -pg -L/usr/openwin/lib64 -L/usr/X11R6/lib64 -L/usr/lib/GL3.5 -L/usr/lib64
|
||||
+LINKFLAGS2 = -fPIC -pg -L/usr/openwin/lib64 -L/usr/X11R6/lib64 -L/usr/lib/GL3.5 -L/usr/lib64
|
||||
|
||||
|
||||
SYSLIB2 = -lstdc++
|
||||
diff -ur netgen-4.5.old/Makefile netgen-4.5.new/Makefile
|
||||
--- netgen-4.5/Makefile 2006-03-29 15:09:12.000000000 +0400
|
||||
+++ netgen-4.5/Makefile 2006-09-07 15:46:07.000000000 +0400
|
||||
@@ -72,7 +72,7 @@
|
||||
#
|
||||
#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL
|
||||
|
||||
-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -DOPENGL -I$(METISINC)
|
||||
+CPLUSPLUSFLAGS1 = -c -m64 -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -I$(METISINC)
|
||||
|
||||
LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu
|
||||
#
|
@ -20,26 +20,29 @@
|
||||
# -* Makefile *-
|
||||
#
|
||||
# Author : Edward AGAPOV (OCC)
|
||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
||||
# Module : NETGENPLUGIN
|
||||
# Date : 10/01/2004
|
||||
#
|
||||
#
|
||||
|
||||
# source path
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=../..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${GUI_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${SMESH_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
|
||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||
|
||||
@COMMENCE@
|
||||
# header files
|
||||
salomeinclude_HEADERS =
|
||||
|
||||
LIB_SRC = \
|
||||
# Libraries targets
|
||||
lib_LTLIBRARIES = libNETGENEngine.la
|
||||
|
||||
dist_libNETGENEngine_la_SOURCES = \
|
||||
NETGENPlugin_NETGEN_3D.cxx \
|
||||
NETGENPlugin_NETGEN_3D_i.cxx \
|
||||
NETGENPlugin_NETGEN_2D.cxx \
|
||||
NETGENPlugin_NETGEN_2D_i.cxx \
|
||||
NETGENPlugin_NETGEN_2D3D.cxx \
|
||||
NETGENPlugin_NETGEN_2D3D_i.cxx \
|
||||
NETGENPlugin_NETGEN_2D_ONLY.cxx \
|
||||
NETGENPlugin_NETGEN_2D_ONLY_i.cxx \
|
||||
NETGENPlugin_Hypothesis.cxx \
|
||||
NETGENPlugin_Hypothesis_i.cxx \
|
||||
NETGENPlugin_Hypothesis_2D.cxx \
|
||||
@ -47,20 +50,22 @@ LIB_SRC = \
|
||||
NETGENPlugin_Mesher.cxx \
|
||||
NETGENPlugin_i.cxx
|
||||
|
||||
LIB_SERVER_IDL = NETGENPlugin_Algorithm.idl
|
||||
libNETGENEngine_la_CPPFLAGS = \
|
||||
$(KERNEL_CXXFLAGS) \
|
||||
$(GUI_CXXFLAGS) \
|
||||
$(MED_CXXFLAGS) \
|
||||
$(GEOM_CXXFLAGS) \
|
||||
$(CAS_CPPFLAGS) \
|
||||
$(NETGEN_INCLUDES) \
|
||||
$(SMESH_CXXFLAGS) \
|
||||
$(CORBA_CXXFLAGS) \
|
||||
$(CORBA_INCLUDES) \
|
||||
$(BOOST_CPPFLAGS) \
|
||||
-I$(top_builddir)/idl \
|
||||
-I$(top_builddir)/salome_adm/unix
|
||||
|
||||
LIB_CLIENT_IDL = \
|
||||
SALOME_Component.idl \
|
||||
SALOME_Comm.idl \
|
||||
GEOM_Gen.idl \
|
||||
MED.idl
|
||||
|
||||
# Libraries targets
|
||||
LIB = libNETGENEngine.la
|
||||
|
||||
NETGEN_INCLUDES = @NETGEN_INCLUDES@
|
||||
CPPFLAGS += $(NETGEN_INCLUDES)
|
||||
CXXFLAGS += $(NETGEN_INCLUDES)
|
||||
LDFLAGS += -lNETGEN
|
||||
|
||||
@CONCLUDE@
|
||||
libNETGENEngine_la_LDFLAGS = \
|
||||
../NETGEN/libNETGEN.la \
|
||||
../../idl/libSalomeIDLNETGENPLUGIN.la \
|
||||
$(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lStdMeshersEngine \
|
||||
$(KERNEL_LDFLAGS) -lSalomeGenericObj
|
37
src/NETGENPlugin/NETGENPlugin_Defs.hxx
Executable file
37
src/NETGENPlugin/NETGENPlugin_Defs.hxx
Executable file
@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
//=============================================================================
|
||||
// File : NETGENPlugin_Defs.hxx
|
||||
// Author : Alexander A. BORODIN
|
||||
|
||||
#ifndef _NETGENPlugin_DEFS_HXX_
|
||||
#define _NETGENPlugin_DEFS_HXX_
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef NETGENPLUGIN_EXPORTS
|
||||
#define NETGENPLUGIN_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define NETGENPLUGIN_EXPORT __declspec( dllimport )
|
||||
#endif
|
||||
#else
|
||||
#define NETGENPLUGIN_EXPORT
|
||||
#endif
|
||||
|
||||
#endif
|
@ -26,10 +26,11 @@
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
|
||||
using namespace std;
|
||||
#include <NETGENPlugin_Hypothesis.hxx>
|
||||
#include <utilities.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
|
@ -29,13 +29,17 @@
|
||||
#ifndef _NETGENPlugin_Hypothesis_HXX_
|
||||
#define _NETGENPlugin_Hypothesis_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
// Parameters for work of NETGEN
|
||||
//
|
||||
|
||||
class NETGENPlugin_Hypothesis: public SMESH_Hypothesis
|
||||
using namespace std;
|
||||
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis: public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
|
||||
@ -87,8 +91,8 @@ public:
|
||||
// Persistence
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream & operator <<(ostream & save, NETGENPlugin_Hypothesis & hyp);
|
||||
friend istream & operator >>(istream & load, NETGENPlugin_Hypothesis & hyp);
|
||||
friend NETGENPLUGIN_EXPORT ostream & operator <<(ostream & save, NETGENPlugin_Hypothesis & hyp);
|
||||
friend NETGENPLUGIN_EXPORT istream & operator >>(istream & load, NETGENPlugin_Hypothesis & hyp);
|
||||
|
||||
/*!
|
||||
* \brief Does nothing
|
||||
|
@ -26,10 +26,11 @@
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
|
||||
using namespace std;
|
||||
#include <NETGENPlugin_Hypothesis_2D.hxx>
|
||||
#include <utilities.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _NETGENPlugin_Hypothesis_2D_HXX_
|
||||
#define _NETGENPlugin_Hypothesis_2D_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include "NETGENPlugin_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
@ -36,7 +38,7 @@
|
||||
// This class is just to give 2D dimension, actually
|
||||
// it inherits all behaviour of the parent
|
||||
|
||||
class NETGENPlugin_Hypothesis_2D: public NETGENPlugin_Hypothesis
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D: public NETGENPlugin_Hypothesis
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -25,8 +25,6 @@
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
using namespace std;
|
||||
|
||||
#include "NETGENPlugin_Hypothesis_2D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_PythonDump.hxx"
|
||||
@ -34,6 +32,8 @@ using namespace std;
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis_2D_i::NETGENPlugin_Hypothesis_2D_i
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _NETGENPlugin_Hypothesis_2D_i_HXX_
|
||||
#define _NETGENPlugin_Hypothesis_2D_i_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
@ -39,7 +41,7 @@ class SMESH_Gen;
|
||||
|
||||
// NETGENPlugin parameters hypothesis (2D case)
|
||||
|
||||
class NETGENPlugin_Hypothesis_2D_i:
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis_2D,
|
||||
public NETGENPlugin_Hypothesis_i
|
||||
{
|
||||
|
@ -25,8 +25,6 @@
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
using namespace std;
|
||||
|
||||
#include "NETGENPlugin_Hypothesis_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_PythonDump.hxx"
|
||||
@ -34,6 +32,8 @@ using namespace std;
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_Hypothesis_i::NETGENPlugin_Hypothesis_i
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _NETGENPlugin_Hypothesis_i_HXX_
|
||||
#define _NETGENPlugin_Hypothesis_i_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
@ -39,7 +41,7 @@ class SMESH_Gen;
|
||||
|
||||
// NETGENPlugin parameters hypothesis
|
||||
|
||||
class NETGENPlugin_Hypothesis_i:
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis,
|
||||
public virtual SMESH_Hypothesis_i
|
||||
{
|
||||
|
@ -25,11 +25,14 @@
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
using namespace std;
|
||||
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
||||
|
||||
#include <SMESH_Mesh.hxx>
|
||||
#include <SMESH_Comment.hxx>
|
||||
#include <SMESH_ComputeError.hxx>
|
||||
#include <SMESH_subMesh.hxx>
|
||||
#include <SMESHDS_Mesh.hxx>
|
||||
#include <SMDS_MeshElement.hxx>
|
||||
#include <SMDS_MeshNode.hxx>
|
||||
@ -42,6 +45,9 @@ using namespace std;
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <NCollection_Map.hxx>
|
||||
#include <OSD_Path.hxx>
|
||||
#include <OSD_File.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
// Netgen include files
|
||||
namespace nglib {
|
||||
@ -56,36 +62,43 @@ namespace netgen {
|
||||
extern MeshingParameters mparam;
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_Mesher::NETGENPlugin_Mesher (SMESHDS_Mesh* meshDS,
|
||||
NETGENPlugin_Mesher::NETGENPlugin_Mesher (SMESH_Mesh* mesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
const bool isVolume)
|
||||
: _meshDS (meshDS),
|
||||
: _mesh (mesh),
|
||||
_shape (aShape),
|
||||
_isVolume(isVolume),
|
||||
_optimize(true)
|
||||
{
|
||||
#ifdef WNT
|
||||
netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
|
||||
#else
|
||||
netgen::MeshingParameters& mparams = netgen::mparam;
|
||||
#endif
|
||||
// Initialize global NETGEN parameters by default values:
|
||||
// maximal mesh edge size
|
||||
netgen::mparam.maxh = NETGENPlugin_Hypothesis::GetDefaultMaxSize();
|
||||
mparams.maxh = NETGENPlugin_Hypothesis::GetDefaultMaxSize();
|
||||
// minimal number of segments per edge
|
||||
netgen::mparam.segmentsperedge = NETGENPlugin_Hypothesis::GetDefaultNbSegPerEdge();
|
||||
mparams.segmentsperedge = NETGENPlugin_Hypothesis::GetDefaultNbSegPerEdge();
|
||||
// rate of growth of size between elements
|
||||
netgen::mparam.grading = NETGENPlugin_Hypothesis::GetDefaultGrowthRate();
|
||||
mparams.grading = NETGENPlugin_Hypothesis::GetDefaultGrowthRate();
|
||||
// safety factor for curvatures (elements per radius)
|
||||
netgen::mparam.curvaturesafety = NETGENPlugin_Hypothesis::GetDefaultNbSegPerRadius();
|
||||
mparams.curvaturesafety = NETGENPlugin_Hypothesis::GetDefaultNbSegPerRadius();
|
||||
// create elements of second order
|
||||
netgen::mparam.secondorder = NETGENPlugin_Hypothesis::GetDefaultSecondOrder() ? 1 : 0;
|
||||
mparams.secondorder = NETGENPlugin_Hypothesis::GetDefaultSecondOrder() ? 1 : 0;
|
||||
// quad-dominated surface meshing
|
||||
if (_isVolume)
|
||||
netgen::mparam.quad = 0;
|
||||
mparams.quad = 0;
|
||||
else
|
||||
netgen::mparam.quad = NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed() ? 1 : 0;
|
||||
mparams.quad = NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed() ? 1 : 0;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -97,21 +110,26 @@ void NETGENPlugin_Mesher::SetParameters(const NETGENPlugin_Hypothesis* hyp)
|
||||
{
|
||||
if (hyp)
|
||||
{
|
||||
#ifdef WNT
|
||||
netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
|
||||
#else
|
||||
netgen::MeshingParameters& mparams = netgen::mparam;
|
||||
#endif
|
||||
// Initialize global NETGEN parameters:
|
||||
// maximal mesh segment size
|
||||
netgen::mparam.maxh = hyp->GetMaxSize();
|
||||
mparams.maxh = hyp->GetMaxSize();
|
||||
// minimal number of segments per edge
|
||||
netgen::mparam.segmentsperedge = hyp->GetNbSegPerEdge();
|
||||
mparams.segmentsperedge = hyp->GetNbSegPerEdge();
|
||||
// rate of growth of size between elements
|
||||
netgen::mparam.grading = hyp->GetGrowthRate();
|
||||
mparams.grading = hyp->GetGrowthRate();
|
||||
// safety factor for curvatures (elements per radius)
|
||||
netgen::mparam.curvaturesafety = hyp->GetNbSegPerRadius();
|
||||
mparams.curvaturesafety = hyp->GetNbSegPerRadius();
|
||||
// create elements of second order
|
||||
netgen::mparam.secondorder = hyp->GetSecondOrder() ? 1 : 0;
|
||||
mparams.secondorder = hyp->GetSecondOrder() ? 1 : 0;
|
||||
// quad-dominated surface meshing
|
||||
// only triangles are allowed for volumic mesh
|
||||
if (!_isVolume)
|
||||
netgen::mparam.quad = static_cast<const NETGENPlugin_Hypothesis_2D*>
|
||||
mparams.quad = static_cast<const NETGENPlugin_Hypothesis_2D*>
|
||||
(hyp)->GetQuadAllowed() ? 1 : 0;
|
||||
_optimize = hyp->GetOptimize();
|
||||
}
|
||||
@ -140,36 +158,23 @@ Standard_Boolean IsEqual(const Link& aLink1, const Link& aLink2)
|
||||
aLink1.n1 == aLink2.n2 && aLink1.n2 == aLink2.n1);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//================================================================================
|
||||
/*!
|
||||
* Here we are going to use the NETGEN mesher
|
||||
* \brief Initialize netgen::OCCGeometry with OCCT shape
|
||||
*/
|
||||
//=============================================================================
|
||||
bool NETGENPlugin_Mesher::Compute()
|
||||
//================================================================================
|
||||
|
||||
void NETGENPlugin_Mesher::PrepareOCCgeometry(netgen::OCCGeometry& occgeo,
|
||||
const TopoDS_Shape& shape)
|
||||
{
|
||||
MESSAGE("Compute with:\n"
|
||||
" max size = " << netgen::mparam.maxh << "\n"
|
||||
" segments per edge = " << netgen::mparam.segmentsperedge);
|
||||
MESSAGE("\n"
|
||||
" growth rate = " << netgen::mparam.grading << "\n"
|
||||
" elements per radius = " << netgen::mparam.curvaturesafety << "\n"
|
||||
" second order = " << netgen::mparam.secondorder << "\n"
|
||||
" quad allowed = " << netgen::mparam.quad);
|
||||
|
||||
nglib::Ng_Init();
|
||||
|
||||
// -------------------------
|
||||
// Prepare OCC geometry
|
||||
// -------------------------
|
||||
|
||||
netgen::OCCGeometry occgeo;
|
||||
occgeo.shape = _shape;
|
||||
occgeo.shape = shape;
|
||||
occgeo.changed = 1;
|
||||
occgeo.BuildFMap();
|
||||
BRepTools::Clean (_shape);
|
||||
BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (_shape, 0.01, true);
|
||||
occgeo.BuildFMap();
|
||||
|
||||
BRepTools::Clean (shape);
|
||||
BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, 0.01, true);
|
||||
Bnd_Box bb;
|
||||
BRepBndLib::Add (_shape, bb);
|
||||
BRepBndLib::Add (shape, bb);
|
||||
double x1,y1,z1,x2,y2,z2;
|
||||
bb.Get (x1,y1,z1,x2,y2,z2);
|
||||
MESSAGE("shape bounding box:\n" <<
|
||||
@ -178,6 +183,38 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
netgen::Point<3> p1 = netgen::Point<3> (x1,y1,z1);
|
||||
netgen::Point<3> p2 = netgen::Point<3> (x2,y2,z2);
|
||||
occgeo.boundingbox = netgen::Box<3> (p1,p2);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* Here we are going to use the NETGEN mesher
|
||||
*/
|
||||
//=============================================================================
|
||||
bool NETGENPlugin_Mesher::Compute()
|
||||
{
|
||||
#ifdef WNT
|
||||
netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
|
||||
#else
|
||||
netgen::MeshingParameters& mparams = netgen::mparam;
|
||||
#endif
|
||||
MESSAGE("Compute with:\n"
|
||||
" max size = " << mparams.maxh << "\n"
|
||||
" segments per edge = " << mparams.segmentsperedge);
|
||||
MESSAGE("\n"
|
||||
" growth rate = " << mparams.grading << "\n"
|
||||
" elements per radius = " << mparams.curvaturesafety << "\n"
|
||||
" second order = " << mparams.secondorder << "\n"
|
||||
" quad allowed = " << mparams.quad);
|
||||
|
||||
SMESH_ComputeErrorPtr error = SMESH_ComputeError::New();
|
||||
nglib::Ng_Init();
|
||||
|
||||
// -------------------------
|
||||
// Prepare OCC geometry
|
||||
// -------------------------
|
||||
|
||||
netgen::OCCGeometry occgeo;
|
||||
PrepareOCCgeometry( occgeo, _shape );
|
||||
|
||||
// -------------------------
|
||||
// Generate the mesh
|
||||
@ -190,19 +227,22 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
int endWith = (_optimize
|
||||
? (_isVolume ? netgen::MESHCONST_OPTVOLUME : netgen::MESHCONST_OPTSURFACE)
|
||||
: netgen::MESHCONST_MESHSURFACE);
|
||||
char *optstr;
|
||||
char *optstr = 0;
|
||||
|
||||
int err = 0;
|
||||
SMESH_Comment comment;
|
||||
try
|
||||
{
|
||||
err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr);
|
||||
if (err) comment << "Error in netgen::OCCGenerateMesh()";
|
||||
if (!err && !_optimize)
|
||||
{
|
||||
// we have got surface mesh only, so generate volume mesh
|
||||
startWith = endWith = netgen::MESHCONST_MESHVOLUME;
|
||||
err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr);
|
||||
if (err) comment << "Error in netgen::OCCGenerateMesh()";
|
||||
}
|
||||
if (!err && netgen::mparam.secondorder > 0)
|
||||
if (!err && mparams.secondorder > 0)
|
||||
{
|
||||
netgen::OCCRefinementSurfaces ref (occgeo);
|
||||
ref.MakeSecondOrder (*ngMesh);
|
||||
@ -210,8 +250,8 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
}
|
||||
catch (netgen::NgException exc)
|
||||
{
|
||||
MESSAGE ("Exception in NETGEN: " << exc.What());
|
||||
err = 1;
|
||||
error->myName = err = COMPERR_ALGO_FAILED;
|
||||
comment << exc.What();
|
||||
}
|
||||
|
||||
int nbNod = ngMesh->GetNP();
|
||||
@ -229,8 +269,9 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
// Feed back the SMESHDS with the generated Nodes and Elements
|
||||
// -----------------------------------------------------------
|
||||
|
||||
SMESHDS_Mesh* meshDS = _mesh->GetMeshDS();
|
||||
bool isOK = ( !err && (_isVolume ? (nbVol > 0) : (nbFac > 0)) );
|
||||
if ( isOK )
|
||||
if ( true /*isOK*/ ) // get whatever built
|
||||
{
|
||||
// vector of nodes in which node index == netgen ID
|
||||
vector< SMDS_MeshNode* > nodeVec ( nbNod + 1 );
|
||||
@ -238,7 +279,7 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
NCollection_Map<int> pindMap;
|
||||
// create and insert nodes into nodeVec
|
||||
int i;
|
||||
for (i = 1; i <= nbNod && isOK; ++i )
|
||||
for (i = 1; i <= nbNod /*&& isOK*/; ++i )
|
||||
{
|
||||
const netgen::MeshPoint& ngPoint = ngMesh->Point(i);
|
||||
SMDS_MeshNode* node = NULL;
|
||||
@ -248,7 +289,7 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
{
|
||||
// point on vertex
|
||||
aVert = TopoDS::Vertex(occgeo.vmap(i));
|
||||
SMESHDS_SubMesh * submesh = _meshDS->MeshElements(aVert);
|
||||
SMESHDS_SubMesh * submesh = meshDS->MeshElements(aVert);
|
||||
if (submesh)
|
||||
{
|
||||
SMDS_NodeIteratorPtr it = submesh->GetNodes();
|
||||
@ -262,25 +303,26 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
newNodeOnVertex = true;
|
||||
}
|
||||
if (!node)
|
||||
node = _meshDS->AddNode(ngPoint.X(), ngPoint.Y(), ngPoint.Z());
|
||||
node = meshDS->AddNode(ngPoint.X(), ngPoint.Y(), ngPoint.Z());
|
||||
if (!node)
|
||||
{
|
||||
MESSAGE("Cannot create a mesh node");
|
||||
isOK = false;
|
||||
if ( !comment.size() ) comment << "Cannot create a mesh node";
|
||||
nbSeg = nbFac = nbVol = isOK = 0;
|
||||
break;
|
||||
}
|
||||
nodeVec.at(i) = node;
|
||||
if (newNodeOnVertex)
|
||||
{
|
||||
// point on vertex
|
||||
_meshDS->SetNodeOnVertex(node, aVert);
|
||||
meshDS->SetNodeOnVertex(node, aVert);
|
||||
pindMap.Add(i);
|
||||
}
|
||||
}
|
||||
|
||||
// create mesh segments along geometric edges
|
||||
NCollection_Map<Link> linkMap;
|
||||
for (i = 1; i <= nbSeg && isOK; ++i )
|
||||
for (i = 1; i <= nbSeg/* && isOK*/; ++i )
|
||||
{
|
||||
const netgen::Segment& seg = ngMesh->LineSegment(i);
|
||||
Link link(seg.p1, seg.p2);
|
||||
@ -314,28 +356,29 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
continue;
|
||||
if (!aEdge.IsNull())
|
||||
{
|
||||
_meshDS->SetNodeOnEdge(nodeVec.at(pind), aEdge, param);
|
||||
meshDS->SetNodeOnEdge(nodeVec.at(pind), aEdge, param);
|
||||
pindMap.Add(pind);
|
||||
}
|
||||
}
|
||||
SMDS_MeshEdge* edge;
|
||||
if (nbp < 3) // second order ?
|
||||
edge = _meshDS->AddEdge(nodeVec.at(pinds[0]), nodeVec.at(pinds[1]));
|
||||
edge = meshDS->AddEdge(nodeVec.at(pinds[0]), nodeVec.at(pinds[1]));
|
||||
else
|
||||
edge = _meshDS->AddEdge(nodeVec.at(pinds[0]), nodeVec.at(pinds[1]),
|
||||
edge = meshDS->AddEdge(nodeVec.at(pinds[0]), nodeVec.at(pinds[1]),
|
||||
nodeVec.at(pinds[2]));
|
||||
if (!edge)
|
||||
{
|
||||
if ( !comment.size() ) comment << "Cannot create a mesh edge";
|
||||
MESSAGE("Cannot create a mesh edge");
|
||||
isOK = false;
|
||||
nbSeg = nbFac = nbVol = isOK = 0;
|
||||
break;
|
||||
}
|
||||
if (!aEdge.IsNull())
|
||||
_meshDS->SetMeshElementOnShape(edge, aEdge);
|
||||
meshDS->SetMeshElementOnShape(edge, aEdge);
|
||||
}
|
||||
|
||||
// create mesh faces along geometric faces
|
||||
for (i = 1; i <= nbFac && isOK; ++i )
|
||||
for (i = 1; i <= nbFac/* && isOK*/; ++i )
|
||||
{
|
||||
const netgen::Element2d& elem = ngMesh->SurfaceElement(i);
|
||||
int aGeomFaceInd = elem.GetIndex();
|
||||
@ -353,7 +396,7 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
if (!aFace.IsNull())
|
||||
{
|
||||
const netgen::PointGeomInfo& pgi = elem.GeomInfoPi(j);
|
||||
_meshDS->SetNodeOnFace(node, aFace, pgi.u, pgi.v);
|
||||
meshDS->SetNodeOnFace(node, aFace, pgi.u, pgi.v);
|
||||
pindMap.Add(pind);
|
||||
}
|
||||
}
|
||||
@ -361,16 +404,16 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
switch (elem.GetType())
|
||||
{
|
||||
case netgen::TRIG:
|
||||
face = _meshDS->AddFace(nodes[0],nodes[1],nodes[2]);
|
||||
face = meshDS->AddFace(nodes[0],nodes[1],nodes[2]);
|
||||
break;
|
||||
case netgen::QUAD:
|
||||
face = _meshDS->AddFace(nodes[0],nodes[1],nodes[2],nodes[3]);
|
||||
face = meshDS->AddFace(nodes[0],nodes[1],nodes[2],nodes[3]);
|
||||
break;
|
||||
case netgen::TRIG6:
|
||||
face = _meshDS->AddFace(nodes[0],nodes[1],nodes[2],nodes[5],nodes[3],nodes[4]);
|
||||
face = meshDS->AddFace(nodes[0],nodes[1],nodes[2],nodes[5],nodes[3],nodes[4]);
|
||||
break;
|
||||
case netgen::QUAD8:
|
||||
face = _meshDS->AddFace(nodes[0],nodes[1],nodes[2],nodes[3],
|
||||
face = meshDS->AddFace(nodes[0],nodes[1],nodes[2],nodes[3],
|
||||
nodes[4],nodes[7],nodes[5],nodes[6]);
|
||||
break;
|
||||
default:
|
||||
@ -379,18 +422,19 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
}
|
||||
if (!face)
|
||||
{
|
||||
if ( !comment.size() ) comment << "Cannot create a mesh face";
|
||||
MESSAGE("Cannot create a mesh face");
|
||||
isOK = false;
|
||||
nbSeg = nbFac = nbVol = isOK = 0;
|
||||
break;
|
||||
}
|
||||
if (!aFace.IsNull())
|
||||
_meshDS->SetMeshElementOnShape(face, aFace);
|
||||
meshDS->SetMeshElementOnShape(face, aFace);
|
||||
}
|
||||
|
||||
// create tetrahedra
|
||||
for (i = 1; i <= nbVol && isOK; ++i)
|
||||
for (i = 1; i <= nbVol/* && isOK*/; ++i)
|
||||
{
|
||||
const netgen::Element& elem = ngMesh->VolumeElement(i);
|
||||
const netgen::Element& elem = ngMesh->VolumeElement(i);
|
||||
int aSolidInd = elem.GetIndex();
|
||||
TopoDS_Solid aSolid;
|
||||
if (aSolidInd > 0 && aSolidInd <= occgeo.somap.Extent())
|
||||
@ -406,7 +450,7 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
if (!aSolid.IsNull())
|
||||
{
|
||||
// point in solid
|
||||
_meshDS->SetNodeInVolume(node, aSolid);
|
||||
meshDS->SetNodeInVolume(node, aSolid);
|
||||
pindMap.Add(pind);
|
||||
}
|
||||
}
|
||||
@ -414,11 +458,11 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
switch (elem.GetType())
|
||||
{
|
||||
case netgen::TET:
|
||||
vol = _meshDS->AddVolume(nodes[0],nodes[1],nodes[2],nodes[3]);
|
||||
vol = meshDS->AddVolume(nodes[0],nodes[1],nodes[2],nodes[3]);
|
||||
break;
|
||||
case netgen::TET10:
|
||||
vol = _meshDS->AddVolume(nodes[0],nodes[1],nodes[2],nodes[3],
|
||||
nodes[4],nodes[7],nodes[5],nodes[6],nodes[8],nodes[9]);
|
||||
vol = meshDS->AddVolume(nodes[0],nodes[1],nodes[2],nodes[3],
|
||||
nodes[4],nodes[7],nodes[5],nodes[6],nodes[8],nodes[9]);
|
||||
break;
|
||||
default:
|
||||
MESSAGE("NETGEN created a volume of unexpected type, ignoring");
|
||||
@ -426,17 +470,61 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
}
|
||||
if (!vol)
|
||||
{
|
||||
if ( !comment.size() ) comment << "Cannot create a mesh volume";
|
||||
MESSAGE("Cannot create a mesh volume");
|
||||
isOK = false;
|
||||
nbSeg = nbFac = nbVol = isOK = 0;
|
||||
break;
|
||||
}
|
||||
if (!aSolid.IsNull())
|
||||
_meshDS->SetMeshElementOnShape(vol, aSolid);
|
||||
meshDS->SetMeshElementOnShape(vol, aSolid);
|
||||
}
|
||||
}
|
||||
|
||||
if ( error->IsOK() && ( !isOK || comment.size() > 0 ))
|
||||
error->myName = COMPERR_ALGO_FAILED;
|
||||
if ( !comment.empty() )
|
||||
error->myComment = comment;
|
||||
|
||||
// set bad compute error to subshapes of all failed subshapes shapes
|
||||
if ( !error->IsOK() && err )
|
||||
{
|
||||
for (int i = 1; i <= occgeo.fmap.Extent(); i++) {
|
||||
int status = occgeo.facemeshstatus[i-1];
|
||||
if (status == 1 ) continue;
|
||||
if ( SMESH_subMesh* sm = _mesh->GetSubMeshContaining( occgeo.fmap( i ))) {
|
||||
SMESH_ComputeErrorPtr& smError = sm->GetComputeError();
|
||||
if ( !smError || smError->IsOK() ) {
|
||||
if ( status == -1 )
|
||||
smError.reset( new SMESH_ComputeError( error->myName, error->myComment ));
|
||||
else
|
||||
smError.reset( new SMESH_ComputeError( COMPERR_ALGO_FAILED, "Ignored" ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nglib::Ng_DeleteMesh((nglib::Ng_Mesh*)ngMesh);
|
||||
nglib::Ng_Exit();
|
||||
|
||||
return isOK;
|
||||
RemoveTmpFiles();
|
||||
|
||||
return error->IsOK();
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Remove "test.out" and "problemfaces" files in current directory
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void NETGENPlugin_Mesher::RemoveTmpFiles()
|
||||
{
|
||||
TCollection_AsciiString str("test.out");
|
||||
OSD_Path path1( str );
|
||||
OSD_File file1( path1 );
|
||||
file1.Remove();
|
||||
str = "problemfaces";
|
||||
OSD_Path path2( str );
|
||||
OSD_File file2( path2 );
|
||||
file2.Remove();
|
||||
}
|
||||
|
@ -29,28 +29,40 @@
|
||||
#ifndef _NETGENPlugin_Mesher_HXX_
|
||||
#define _NETGENPlugin_Mesher_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
#include "StdMeshers_FaceSide.hxx"
|
||||
|
||||
class SMESH_Mesh;
|
||||
class SMESHDS_Mesh;
|
||||
class TopoDS_Shape;
|
||||
class NETGENPlugin_Hypothesis;
|
||||
namespace netgen {
|
||||
class OCCGeometry;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief This class calls the NETGEN mesher of OCC geometry
|
||||
*/
|
||||
|
||||
class NETGENPlugin_Mesher
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
|
||||
{
|
||||
public:
|
||||
// ---------- PUBLIC METHODS ----------
|
||||
|
||||
NETGENPlugin_Mesher (SMESHDS_Mesh* meshDS, const TopoDS_Shape& aShape,
|
||||
NETGENPlugin_Mesher (SMESH_Mesh* mesh, const TopoDS_Shape& aShape,
|
||||
const bool isVolume);
|
||||
|
||||
void SetParameters(const NETGENPlugin_Hypothesis* hyp);
|
||||
|
||||
bool Compute();
|
||||
|
||||
static void PrepareOCCgeometry(netgen::OCCGeometry& occgeom,
|
||||
const TopoDS_Shape& shape);
|
||||
|
||||
static void RemoveTmpFiles();
|
||||
|
||||
private:
|
||||
SMESHDS_Mesh* _meshDS;
|
||||
SMESH_Mesh* _mesh;
|
||||
const TopoDS_Shape& _shape;
|
||||
bool _isVolume;
|
||||
bool _optimize;
|
||||
|
@ -25,8 +25,6 @@
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
using namespace std;
|
||||
|
||||
#include "NETGENPlugin_NETGEN_2D.hxx"
|
||||
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
@ -39,6 +37,8 @@ using namespace std;
|
||||
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -119,53 +119,10 @@ bool NETGENPlugin_NETGEN_2D::CheckHypothesis
|
||||
bool NETGENPlugin_NETGEN_2D::Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
{
|
||||
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
//SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
|
||||
NETGENPlugin_Mesher mesher(meshDS, aShape, false);
|
||||
NETGENPlugin_Mesher mesher(&aMesh, aShape, false);
|
||||
// NETGENPlugin_Mesher mesher(meshDS, aShape, false);
|
||||
mesher.SetParameters(_hypothesis);
|
||||
return mesher.Compute();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & NETGENPlugin_NETGEN_2D::SaveTo(ostream & save)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & NETGENPlugin_NETGEN_2D::LoadFrom(istream & load)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator << (ostream & save, NETGENPlugin_NETGEN_2D & hyp)
|
||||
{
|
||||
return hyp.SaveTo( save );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >> (istream & load, NETGENPlugin_NETGEN_2D & hyp)
|
||||
{
|
||||
return hyp.LoadFrom( load );
|
||||
}
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _NETGENPlugin_NETGEN_2D_HXX_
|
||||
#define _NETGENPlugin_NETGEN_2D_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include "SMESH_2D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "StdMeshers_MaxElementVolume.hxx"
|
||||
@ -36,7 +38,7 @@
|
||||
|
||||
class NETGENPlugin_Hypothesis_2D;
|
||||
|
||||
class NETGENPlugin_NETGEN_2D: public SMESH_2D_Algo
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D: public SMESH_2D_Algo
|
||||
{
|
||||
public:
|
||||
NETGENPlugin_NETGEN_2D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
@ -49,11 +51,6 @@ public:
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, NETGENPlugin_NETGEN_2D & hyp);
|
||||
friend istream & operator >> (istream & load, NETGENPlugin_NETGEN_2D & hyp);
|
||||
|
||||
protected:
|
||||
const NETGENPlugin_Hypothesis_2D* _hypothesis;
|
||||
};
|
||||
|
@ -25,8 +25,6 @@
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
using namespace std;
|
||||
|
||||
#include "NETGENPlugin_NETGEN_2D3D.hxx"
|
||||
#include "NETGENPlugin_Hypothesis.hxx"
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
@ -39,6 +37,8 @@ using namespace std;
|
||||
|
||||
#include <list>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -121,53 +121,10 @@ bool NETGENPlugin_NETGEN_2D3D::CheckHypothesis
|
||||
bool NETGENPlugin_NETGEN_2D3D::Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
{
|
||||
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
// SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
|
||||
NETGENPlugin_Mesher mesher(meshDS, aShape, true);
|
||||
NETGENPlugin_Mesher mesher(&aMesh, aShape, true);
|
||||
// NETGENPlugin_Mesher mesher(meshDS, aShape, true);
|
||||
mesher.SetParameters(_hypothesis);
|
||||
return mesher.Compute();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & NETGENPlugin_NETGEN_2D3D::SaveTo(ostream & save)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & NETGENPlugin_NETGEN_2D3D::LoadFrom(istream & load)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator << (ostream & save, NETGENPlugin_NETGEN_2D3D & hyp)
|
||||
{
|
||||
return hyp.SaveTo( save );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >> (istream & load, NETGENPlugin_NETGEN_2D3D & hyp)
|
||||
{
|
||||
return hyp.LoadFrom( load );
|
||||
}
|
||||
|
@ -29,6 +29,8 @@
|
||||
#ifndef _NETGENPlugin_NETGEN_2D3D_HXX_
|
||||
#define _NETGENPlugin_NETGEN_2D3D_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include "SMESH_3D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "StdMeshers_MaxElementVolume.hxx"
|
||||
@ -36,7 +38,7 @@
|
||||
|
||||
class NETGENPlugin_Hypothesis;
|
||||
|
||||
class NETGENPlugin_NETGEN_2D3D: public SMESH_3D_Algo
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D3D: public SMESH_3D_Algo
|
||||
{
|
||||
public:
|
||||
NETGENPlugin_NETGEN_2D3D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
@ -49,11 +51,6 @@ public:
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, NETGENPlugin_NETGEN_2D3D & hyp);
|
||||
friend istream & operator >> (istream & load, NETGENPlugin_NETGEN_2D3D & hyp);
|
||||
|
||||
protected:
|
||||
const NETGENPlugin_Hypothesis* _hypothesis;
|
||||
};
|
||||
|
@ -24,13 +24,14 @@
|
||||
// Module : NETGENPlugin
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "NETGENPlugin_NETGEN_2D3D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D3D_i::NETGENPlugin_NETGEN_2D3D_i
|
||||
|
@ -27,6 +27,8 @@
|
||||
#ifndef _NETGENPlugin_NETGEN_2D3D_I_HXX_
|
||||
#define _NETGENPlugin_NETGEN_2D3D_I_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
@ -36,7 +38,7 @@
|
||||
// ======================================================
|
||||
// NETGEN 3d algorithm
|
||||
// ======================================================
|
||||
class NETGENPlugin_NETGEN_2D3D_i:
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D3D_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_2D3D,
|
||||
public virtual SMESH_3D_Algo_i
|
||||
{
|
||||
|
437
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx
Normal file
437
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx
Normal file
@ -0,0 +1,437 @@
|
||||
// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File : NETGENPlugin_NETGEN_2D_ONLY.cxx
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
// Project : SALOME
|
||||
|
||||
|
||||
#include "NETGENPlugin_NETGEN_2D_ONLY.hxx"
|
||||
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "SMESH_Comment.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "SMESH_MesherHelper.hxx"
|
||||
#include "StdMeshers_FaceSide.hxx"
|
||||
#include "StdMeshers_MaxElementArea.hxx"
|
||||
#include "StdMeshers_LengthFromEdges.hxx"
|
||||
#include "StdMeshers_QuadranglePreference.hxx"
|
||||
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
/*
|
||||
Netgen include files
|
||||
*/
|
||||
namespace nglib {
|
||||
#include <nglib.h>
|
||||
}
|
||||
#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
#include <meshing.hpp>
|
||||
//#include <meshtype.hpp>
|
||||
namespace netgen {
|
||||
extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, int, int, char*);
|
||||
/*extern*/ MeshingParameters mparam;
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
using namespace netgen;
|
||||
using namespace nglib;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_NETGEN_2D_ONLY::NETGENPlugin_NETGEN_2D_ONLY(int hypId, int studyId,
|
||||
SMESH_Gen* gen)
|
||||
: SMESH_2D_Algo(hypId, studyId, gen)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_NETGEN_2D_ONLY::NETGENPlugin_NETGEN_2D_ONLY");
|
||||
_name = "NETGEN_2D_ONLY";
|
||||
|
||||
_shapeType = (1 << TopAbs_FACE);// 1 bit /shape type
|
||||
|
||||
_compatibleHypothesis.push_back("MaxElementArea");
|
||||
_compatibleHypothesis.push_back("LengthFromEdges");
|
||||
_compatibleHypothesis.push_back("QuadranglePreference");
|
||||
|
||||
_hypMaxElementArea = 0;
|
||||
_hypLengthFromEdges = 0;
|
||||
_hypQuadranglePreference = 0;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_NETGEN_2D_ONLY::~NETGENPlugin_NETGEN_2D_ONLY()
|
||||
{
|
||||
MESSAGE("NETGENPlugin_NETGEN_2D_ONLY::~NETGENPlugin_NETGEN_2D_ONLY");
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
Hypothesis_Status& aStatus)
|
||||
{
|
||||
_hypMaxElementArea = 0;
|
||||
_hypLengthFromEdges = 0;
|
||||
_hypQuadranglePreference = 0;
|
||||
|
||||
aStatus = HYP_MISSING;
|
||||
|
||||
const list<const SMESHDS_Hypothesis*>& hyps = GetUsedHypothesis(aMesh, aShape, false);
|
||||
|
||||
if (hyps.empty()) return false; // can't work with no hypothesis
|
||||
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator ith;
|
||||
for (ith = hyps.begin(); ith != hyps.end(); ++ith )
|
||||
{
|
||||
const SMESHDS_Hypothesis* hyp = (*ith);
|
||||
|
||||
string hypName = hyp->GetName();
|
||||
|
||||
if ( hypName == "MaxElementArea")
|
||||
_hypMaxElementArea = static_cast<const StdMeshers_MaxElementArea*> (hyp);
|
||||
else if ( hypName == "LengthFromEdges" )
|
||||
_hypLengthFromEdges = static_cast<const StdMeshers_LengthFromEdges*> (hyp);
|
||||
else if ( hypName == "QuadranglePreference" )
|
||||
_hypQuadranglePreference = static_cast<const StdMeshers_QuadranglePreference*>(hyp);
|
||||
else {
|
||||
aStatus = HYP_INCOMPATIBLE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( _hypMaxElementArea && _hypLengthFromEdges ) {
|
||||
aStatus = HYP_CONCURENT;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( _hypMaxElementArea || _hypLengthFromEdges )
|
||||
aStatus = HYP_OK;
|
||||
|
||||
return aStatus == HYP_OK;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Fill netgen mesh with segments
|
||||
* \retval SMESH_ComputeErrorPtr - error description
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
static TError AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
||||
OCCGeometry& geom,
|
||||
const TSideVector& wires,
|
||||
SMESH_MesherHelper& helper,
|
||||
vector< const SMDS_MeshNode* > & nodeVec)
|
||||
{
|
||||
// ----------------------------
|
||||
// Check wires and count nodes
|
||||
// ----------------------------
|
||||
int nbNodes = 0;
|
||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
||||
{
|
||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||
if ( wire->MissVertexNode() )
|
||||
return TError
|
||||
(new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH, "Missing nodes on vertices"));
|
||||
|
||||
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
||||
if ( uvPtVec.size() != wire->NbPoints() )
|
||||
return TError
|
||||
(new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Unexpected nb of points on wire ") << iW
|
||||
<< ": " << uvPtVec.size()<<" != "<<wire->NbPoints()));
|
||||
nbNodes += wire->NbSegments();
|
||||
}
|
||||
nodeVec.reserve( nbNodes );
|
||||
|
||||
// -----------------
|
||||
// Fill netgen mesh
|
||||
// -----------------
|
||||
|
||||
// netgen::Box<3> bb = geom.GetBoundingBox();
|
||||
// bb.Increase (bb.Diam()/10);
|
||||
// ngMesh.SetLocalH (bb.PMin(), bb.PMax(), 0.5); // set grading
|
||||
|
||||
const int faceID = 1, solidID = 0;
|
||||
ngMesh.AddFaceDescriptor (FaceDescriptor(faceID, solidID, solidID, 0));
|
||||
|
||||
for ( int iW = 0; iW < wires.size(); ++iW )
|
||||
{
|
||||
StdMeshers_FaceSidePtr wire = wires[ iW ];
|
||||
const vector<UVPtStruct>& uvPtVec = wire->GetUVPtStruct();
|
||||
|
||||
int firstPointID = ngMesh.GetNP() + 1;
|
||||
int edgeID = 1, posID = -2;
|
||||
for ( int i = 0; i < wire->NbSegments(); ++i ) // loop on segments
|
||||
{
|
||||
// Add the first point of a segment
|
||||
const SMDS_MeshNode * n = uvPtVec[ i ].node;
|
||||
const int posShapeID = n->GetPosition()->GetShapeId();
|
||||
|
||||
// skip nodes on degenerated edges
|
||||
if ( helper.IsDegenShape( posShapeID ) &&
|
||||
helper.IsDegenShape( uvPtVec[ i+1 ].node->GetPosition()->GetShapeId() ))
|
||||
continue;
|
||||
|
||||
nodeVec.push_back( n );
|
||||
|
||||
MeshPoint mp( Point<3> (n->X(), n->Y(), n->Z()) );
|
||||
ngMesh.AddPoint ( mp, 1, EDGEPOINT );
|
||||
|
||||
// Add the segment
|
||||
Segment seg;
|
||||
|
||||
seg.p1 = ngMesh.GetNP(); // ng node id
|
||||
seg.p2 = seg.p1 + 1; // ng node id
|
||||
seg.edgenr = ngMesh.GetNSeg() + 1;// segment id
|
||||
seg.si = faceID; // = geom.fmap.FindIndex (face);
|
||||
|
||||
for ( int iEnd = 0; iEnd < 2; ++iEnd)
|
||||
{
|
||||
const UVPtStruct& pnt = uvPtVec[ i + iEnd ];
|
||||
|
||||
seg.epgeominfo[ iEnd ].dist = pnt.param; // param on curve
|
||||
seg.epgeominfo[ iEnd ].u = pnt.u;
|
||||
seg.epgeominfo[ iEnd ].v = pnt.v;
|
||||
|
||||
// find out edge id and node parameter on edge
|
||||
bool onVertex = ( pnt.node->GetPosition()->GetTypeOfPosition() == SMDS_TOP_VERTEX );
|
||||
if ( onVertex || posShapeID != posID )
|
||||
{
|
||||
// get edge id
|
||||
double normParam = pnt.normParam;
|
||||
if ( onVertex )
|
||||
normParam = 0.5 * ( uvPtVec[ i ].normParam + uvPtVec[ i+1 ].normParam );
|
||||
const TopoDS_Edge& edge = wire->Edge( wire->EdgeIndex( normParam ));
|
||||
edgeID = geom.emap.FindIndex( edge );
|
||||
posID = posShapeID;
|
||||
if ( onVertex ) // param on curve is different on each of two edges
|
||||
seg.epgeominfo[ iEnd ].dist = helper.GetNodeU( edge, pnt.node );
|
||||
}
|
||||
seg.epgeominfo[ iEnd ].edgenr = edgeID; // = geom.emap.FindIndex(edge);
|
||||
}
|
||||
|
||||
ngMesh.AddSegment (seg);
|
||||
|
||||
// cout << "Segment: " << seg.edgenr << endl
|
||||
// << "\tp1: " << seg.p1 << endl
|
||||
// << "\tp2: " << seg.p2 << endl
|
||||
// << "\tp0 param: " << seg.epgeominfo[ 0 ].dist << endl
|
||||
// << "\tp0 uv: " << seg.epgeominfo[ 0 ].u <<", "<< seg.epgeominfo[ 0 ].v << endl
|
||||
// << "\tp0 edge: " << seg.epgeominfo[ 0 ].edgenr << endl
|
||||
// << "\tp1 param: " << seg.epgeominfo[ 1 ].dist << endl
|
||||
// << "\tp1 uv: " << seg.epgeominfo[ 1 ].u <<", "<< seg.epgeominfo[ 1 ].v << endl
|
||||
// << "\tp1 edge: " << seg.epgeominfo[ 1 ].edgenr << endl;
|
||||
}
|
||||
Segment& seg = ngMesh.LineSegment( ngMesh.GetNSeg() );
|
||||
seg.p2 = firstPointID;
|
||||
}
|
||||
|
||||
ngMesh.CalcSurfacesOfNode();
|
||||
|
||||
return TError();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*Here we are going to use the NETGEN mesher
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape)
|
||||
{
|
||||
MESSAGE("NETGENPlugin_NETGEN_2D_ONLY::Compute()");
|
||||
|
||||
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
int faceID = meshDS->ShapeToIndex( aShape );
|
||||
|
||||
SMESH_MesherHelper helper(aMesh);
|
||||
_quadraticMesh = helper.IsQuadraticSubMesh(aShape);
|
||||
helper.SetElementsOnShape( true );
|
||||
const bool ignoreMediumNodes = _quadraticMesh;
|
||||
|
||||
// ------------------------
|
||||
// get all edges of a face
|
||||
// ------------------------
|
||||
const TopoDS_Face F = TopoDS::Face( aShape.Oriented( TopAbs_FORWARD ));
|
||||
TError problem;
|
||||
TSideVector wires = StdMeshers_FaceSide::GetFaceWires( F, aMesh, ignoreMediumNodes, problem );
|
||||
if ( problem && !problem->IsOK() )
|
||||
return error( problem );
|
||||
int nbWires = wires.size();
|
||||
if ( nbWires == 0 )
|
||||
return error( "Problem in StdMeshers_FaceSide::GetFaceWires()");
|
||||
if ( wires[0]->NbSegments() < 3 ) // ex: a circle with 2 segments
|
||||
return error(COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Too few segments: ")<<wires[0]->NbSegments());
|
||||
|
||||
// -------------------------
|
||||
// Make input netgen mesh
|
||||
// -------------------------
|
||||
|
||||
Ng_Init();
|
||||
netgen::Mesh * ngMesh = new netgen::Mesh ();
|
||||
|
||||
netgen::OCCGeometry occgeo;
|
||||
NETGENPlugin_Mesher::PrepareOCCgeometry( occgeo, F );
|
||||
|
||||
vector< const SMDS_MeshNode* > nodeVec;
|
||||
problem = AddSegmentsToMesh( *ngMesh, occgeo, wires, helper, nodeVec );
|
||||
if ( problem && !problem->IsOK() ) {
|
||||
delete ngMesh; Ng_Exit();
|
||||
return error( problem );
|
||||
}
|
||||
|
||||
// --------------------
|
||||
// compute edge length
|
||||
// --------------------
|
||||
|
||||
double edgeLength = 0;
|
||||
if (_hypLengthFromEdges)
|
||||
{
|
||||
int nbSegments = 0;
|
||||
for ( int iW = 0; iW < nbWires; ++iW )
|
||||
{
|
||||
edgeLength += wires[ iW ]->Length();
|
||||
nbSegments += wires[ iW ]->NbSegments();
|
||||
}
|
||||
if ( nbSegments )
|
||||
edgeLength /= nbSegments;
|
||||
}
|
||||
if ( _hypMaxElementArea )
|
||||
{
|
||||
double maxArea = _hypMaxElementArea->GetMaxArea();
|
||||
edgeLength = sqrt(2. * maxArea/sqrt(3.0));
|
||||
}
|
||||
if ( edgeLength < DBL_MIN )
|
||||
edgeLength = occgeo.GetBoundingBox().Diam();
|
||||
|
||||
//cout << " edgeLength = " << edgeLength << endl;
|
||||
|
||||
netgen::mparam.maxh = edgeLength;
|
||||
netgen::mparam.quad = _hypQuadranglePreference ? 1 : 0;
|
||||
//ngMesh->SetGlobalH ( edgeLength );
|
||||
|
||||
// -------------------------
|
||||
// Generate surface mesh
|
||||
// -------------------------
|
||||
|
||||
char *optstr;
|
||||
int startWith = MESHCONST_MESHSURFACE;
|
||||
int endWith = MESHCONST_OPTSURFACE;
|
||||
int err = 1;
|
||||
|
||||
try {
|
||||
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr);
|
||||
}
|
||||
catch (Standard_Failure& ex) {
|
||||
string comment = ex.DynamicType()->Name();
|
||||
if ( ex.GetMessageString() && strlen( ex.GetMessageString() )) {
|
||||
comment += ": ";
|
||||
comment += ex.GetMessageString();
|
||||
}
|
||||
error(COMPERR_OCC_EXCEPTION, comment);
|
||||
}
|
||||
catch (NgException exc) {
|
||||
error( SMESH_Comment("NgException: ") << exc.What() );
|
||||
}
|
||||
catch (...) {
|
||||
error(COMPERR_EXCEPTION,"Exception in netgen::OCCGenerateMesh()");
|
||||
}
|
||||
|
||||
// ----------------------------------------------------
|
||||
// Fill the SMESHDS with the generated nodes and faces
|
||||
// ----------------------------------------------------
|
||||
|
||||
int nbNodes = ngMesh->GetNP();
|
||||
int nbFaces = ngMesh->GetNSE();
|
||||
|
||||
int nbInputNodes = nodeVec.size();
|
||||
nodeVec.resize( nbNodes, 0 );
|
||||
|
||||
// add nodes
|
||||
for ( int i = nbInputNodes + 1; i <= nbNodes; ++i )
|
||||
{
|
||||
const MeshPoint& ngPoint = ngMesh->Point(i);
|
||||
SMDS_MeshNode * node = meshDS->AddNode(ngPoint.X(), ngPoint.Y(), ngPoint.Z());
|
||||
nodeVec[ i-1 ] = node;
|
||||
}
|
||||
|
||||
// create faces
|
||||
bool reverse = ( aShape.Orientation() == TopAbs_REVERSED );
|
||||
for ( int i = 1; i <= nbFaces ; ++i )
|
||||
{
|
||||
const Element2d& elem = ngMesh->SurfaceElement(i);
|
||||
vector<const SMDS_MeshNode*> nodes( elem.GetNP() );
|
||||
for (int j=1; j <= elem.GetNP(); ++j)
|
||||
{
|
||||
int pind = elem.PNum(j);
|
||||
const SMDS_MeshNode* node = nodeVec.at(pind-1);
|
||||
if ( reverse )
|
||||
nodes[ nodes.size()-j ] = node;
|
||||
else
|
||||
nodes[ j-1 ] = node;
|
||||
if ( node->GetPosition()->GetTypeOfPosition() == SMDS_TOP_3DSPACE )
|
||||
{
|
||||
const PointGeomInfo& pgi = elem.GeomInfoPi(j);
|
||||
meshDS->SetNodeOnFace((SMDS_MeshNode*)node, faceID, pgi.u, pgi.v);
|
||||
}
|
||||
}
|
||||
SMDS_MeshFace* face = 0;
|
||||
if ( elem.GetType() == TRIG )
|
||||
face = helper.AddFace(nodes[0],nodes[1],nodes[2]);
|
||||
else
|
||||
face = helper.AddFace(nodes[0],nodes[1],nodes[2],nodes[3]);
|
||||
}
|
||||
|
||||
Ng_DeleteMesh((nglib::Ng_Mesh*)ngMesh);
|
||||
Ng_Exit();
|
||||
|
||||
NETGENPlugin_Mesher::RemoveTmpFiles();
|
||||
|
||||
return !err;
|
||||
}
|
84
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.hxx
Normal file
84
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.hxx
Normal file
@ -0,0 +1,84 @@
|
||||
// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
// File : NETGENPlugin_NETGEN_2D_ONLY.hxx
|
||||
// Project : SALOME
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
|
||||
#ifndef _NETGENPlugin_NETGEN_2D_ONLY_HXX_
|
||||
#define _NETGENPlugin_NETGEN_2D_ONLY_HXX_
|
||||
|
||||
#include "SMESH_2D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
|
||||
/*#define OCCGEOMETRY
|
||||
#include <occgeom.hpp>
|
||||
#include <meshing.hpp>//amv*/
|
||||
|
||||
class StdMeshers_MaxElementArea;
|
||||
class StdMeshers_LengthFromEdges;
|
||||
class StdMeshers_QuadranglePreference;
|
||||
//class NETGENPlugin_Hypothesis;
|
||||
|
||||
/*namespace netgen {
|
||||
class OCCGeometry;
|
||||
}*/
|
||||
/*namespace netgen {
|
||||
class OCCGeometry;
|
||||
extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, int, int, char*);
|
||||
extern MeshingParameters mparam;
|
||||
}*/
|
||||
|
||||
//using namespace netgen;
|
||||
|
||||
/*!
|
||||
* \brief Mesher generating 2D elements on a geometrical face taking
|
||||
* into account pre-existing nodes on face boundaries
|
||||
*
|
||||
* Historically, NETGENPlugin_NETGEN_2D is actually 1D-2D, that is why
|
||||
* the class is named NETGENPlugin_NETGEN_2D_ONLY. Renaming is useless as
|
||||
* algorithm field "_name" can't be changed
|
||||
*/
|
||||
class NETGENPlugin_NETGEN_2D_ONLY: public SMESH_2D_Algo
|
||||
{
|
||||
public:
|
||||
NETGENPlugin_NETGEN_2D_ONLY(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~NETGENPlugin_NETGEN_2D_ONLY();
|
||||
|
||||
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape,
|
||||
Hypothesis_Status& aStatus);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
/*static TError AddSegmentsToMesh(netgen::Mesh& ngMesh,
|
||||
OCCGeometry& geom,
|
||||
const TSideVector& wires,
|
||||
SMESH_MesherHelper& helper,
|
||||
vector< const SMDS_MeshNode* > & nodeVec); //amv*/
|
||||
|
||||
protected:
|
||||
const StdMeshers_MaxElementArea* _hypMaxElementArea;
|
||||
const StdMeshers_LengthFromEdges* _hypLengthFromEdges;
|
||||
const StdMeshers_QuadranglePreference* _hypQuadranglePreference;
|
||||
// const NETGENPlugin_Hypothesis* _hypothesis;
|
||||
};
|
||||
|
||||
#endif
|
81
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY_i.cxx
Normal file
81
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY_i.cxx
Normal file
@ -0,0 +1,81 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : NETGENPlugin_NETGEN_2D_ONLY_i.cxx
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
// Module : SMESH
|
||||
|
||||
#include "NETGENPlugin_NETGEN_2D_ONLY_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D_ONLY_i::NETGENPlugin_NETGEN_2D_ONLY_i
|
||||
*
|
||||
* Constructor
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_NETGEN_2D_ONLY_i::NETGENPlugin_NETGEN_2D_ONLY_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl )
|
||||
: SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA ),
|
||||
SMESH_Algo_i( thePOA ),
|
||||
SMESH_2D_Algo_i( thePOA )
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_NETGEN_2D_ONLY_i::NETGENPlugin_NETGEN_2D_ONLY_i" );
|
||||
myBaseImpl = new ::NETGENPlugin_NETGEN_2D_ONLY( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D_ONLY_i::~NETGENPlugin_NETGEN_2D_ONLY_i
|
||||
*
|
||||
* Destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
NETGENPlugin_NETGEN_2D_ONLY_i::~NETGENPlugin_NETGEN_2D_ONLY_i()
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_NETGEN_2D_ONLY_i::~NETGENPlugin_NETGEN_2D_ONLY_i" );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D_ONLY_i::GetImpl
|
||||
*
|
||||
* Get implementation
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
::NETGENPlugin_NETGEN_2D_ONLY* NETGENPlugin_NETGEN_2D_ONLY_i::GetImpl()
|
||||
{
|
||||
MESSAGE( "NETGENPlugin_NETGEN_2D_ONLY_i::GetImpl" );
|
||||
return ( ::NETGENPlugin_NETGEN_2D_ONLY* )myBaseImpl;
|
||||
}
|
||||
|
56
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY_i.hxx
Normal file
56
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY_i.hxx
Normal file
@ -0,0 +1,56 @@
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
//
|
||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : NETGENPlugin_NETGEN_2D_ONLY_i.cxx
|
||||
// Author : Edward AGAPOV (OCC)
|
||||
// Module : SMESH
|
||||
|
||||
#ifndef _NETGENPlugin_NETGEN_2D_ONLY_I_HXX_
|
||||
#define _NETGENPlugin_NETGEN_2D_ONLY_I_HXX_
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
#include "SMESH_2D_Algo_i.hxx"
|
||||
#include "NETGENPlugin_NETGEN_2D_ONLY.hxx"
|
||||
|
||||
// ======================================================
|
||||
// NETGEN 2D algorithm
|
||||
// ======================================================
|
||||
class NETGENPlugin_NETGEN_2D_ONLY_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_2D_ONLY,
|
||||
public virtual SMESH_2D_Algo_i
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
NETGENPlugin_NETGEN_2D_ONLY_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl );
|
||||
// Destructor
|
||||
virtual ~NETGENPlugin_NETGEN_2D_ONLY_i();
|
||||
|
||||
// Get implementation
|
||||
::NETGENPlugin_NETGEN_2D_ONLY* GetImpl();
|
||||
};
|
||||
|
||||
#endif
|
@ -24,13 +24,14 @@
|
||||
// Module : NETGENPlugin
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "NETGENPlugin_NETGEN_2D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_2D_i::NETGENPlugin_NETGEN_2D_i
|
||||
|
@ -27,6 +27,8 @@
|
||||
#ifndef _NETGENPlugin_NETGEN_2D_I_HXX_
|
||||
#define _NETGENPlugin_NETGEN_2D_I_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
@ -36,7 +38,7 @@
|
||||
// ======================================================
|
||||
// NETGEN 3d algorithm
|
||||
// ======================================================
|
||||
class NETGENPlugin_NETGEN_2D_i:
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_2D,
|
||||
public virtual SMESH_2D_Algo_i
|
||||
{
|
||||
|
@ -26,16 +26,17 @@
|
||||
// Copyright : CEA 2003
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
using namespace std;
|
||||
|
||||
#include "NETGENPlugin_NETGEN_3D.hxx"
|
||||
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "SMESH_ControlsDef.hxx"
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "SMESH_Comment.hxx"
|
||||
#include "SMESH_ControlsDef.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "SMESH_MesherHelper.hxx"
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
@ -43,6 +44,9 @@ using namespace std;
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
|
||||
#include <Standard_Failure.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
#include <list>
|
||||
@ -160,7 +164,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
// get triangles on aShell and make a map of nodes to Netgen node IDs
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
SMESH_MesherHelper* myTool = new SMESH_MesherHelper(aMesh);
|
||||
SMESH_MesherHelper helper(aMesh);
|
||||
SMESH_MesherHelper* myTool = &helper;
|
||||
bool _quadraticMesh = myTool->IsQuadraticSubMesh(aShape);
|
||||
|
||||
typedef map< const SMDS_MeshNode*, int> TNodeToIDMap;
|
||||
@ -187,12 +192,12 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
{
|
||||
// check element
|
||||
const SMDS_MeshElement* elem = iteratorElem->next();
|
||||
if ( !elem ||
|
||||
!( elem->NbNodes()==3 || ( _quadraticMesh && elem->NbNodes()==6) ) ) {
|
||||
INFOS( "NETGENPlugin_NETGEN_3D::Compute(), bad mesh");
|
||||
delete myTool; myTool = 0;
|
||||
return false;
|
||||
}
|
||||
if ( !elem )
|
||||
return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
|
||||
bool isTraingle = ( elem->NbNodes()==3 || (_quadraticMesh && elem->NbNodes()==6 ));
|
||||
if ( !isTraingle )
|
||||
return error( COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Not triangle element ")<<elem->GetID());
|
||||
// keep a triangle
|
||||
triangles.push_back( elem );
|
||||
isReversed.push_back( isRev );
|
||||
@ -312,12 +317,28 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
Ng_Result status;
|
||||
|
||||
try {
|
||||
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
status = Ng_GenerateVolumeMesh(Netgen_mesh, &Netgen_param);
|
||||
}
|
||||
catch (...) {
|
||||
MESSAGE("An exception has been caught during the Volume Mesh Generation ...");
|
||||
catch (Standard_Failure& exc) {
|
||||
error(COMPERR_OCC_EXCEPTION, exc.GetMessageString());
|
||||
status = NG_VOLUME_FAILURE;
|
||||
}
|
||||
catch (...) {
|
||||
error("Exception in Ng_GenerateVolumeMesh()");
|
||||
status = NG_VOLUME_FAILURE;
|
||||
}
|
||||
if ( GetComputeError()->IsOK() ) {
|
||||
switch ( status ) {
|
||||
case NG_SURFACE_INPUT_ERROR:error( status, "NG_SURFACE_INPUT_ERROR");
|
||||
case NG_VOLUME_FAILURE: error( status, "NG_VOLUME_FAILURE");
|
||||
case NG_STL_INPUT_ERROR: error( status, "NG_STL_INPUT_ERROR");
|
||||
case NG_SURFACE_FAILURE: error( status, "NG_SURFACE_FAILURE");
|
||||
case NG_FILE_NOT_FOUND: error( status, "NG_FILE_NOT_FOUND");
|
||||
};
|
||||
}
|
||||
|
||||
int Netgen_NbOfNodesNew = Ng_GetNP(Netgen_mesh);
|
||||
|
||||
@ -331,7 +352,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
// Feed back the SMESHDS with the generated Nodes and Volume Elements
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
bool isOK = ( status == NG_OK && Netgen_NbOfTetra > 0 );
|
||||
bool isOK = ( /*status == NG_OK &&*/ Netgen_NbOfTetra > 0 );// get whatever built
|
||||
if ( isOK )
|
||||
{
|
||||
// vector of nodes in which node index == netgen ID
|
||||
@ -368,51 +389,185 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
Ng_DeleteMesh(Netgen_mesh);
|
||||
Ng_Exit();
|
||||
|
||||
delete myTool; myTool = 0;
|
||||
NETGENPlugin_Mesher::RemoveTmpFiles();
|
||||
|
||||
return isOK;
|
||||
return (status == NG_OK);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & NETGENPlugin_NETGEN_3D::SaveTo(ostream & save)
|
||||
bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
SMESH_MesherHelper* aHelper)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & NETGENPlugin_NETGEN_3D::LoadFrom(istream & load)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator << (ostream & save, NETGENPlugin_NETGEN_3D & hyp)
|
||||
{
|
||||
return hyp.SaveTo( save );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >> (istream & load, NETGENPlugin_NETGEN_3D & hyp)
|
||||
{
|
||||
return hyp.LoadFrom( load );
|
||||
MESSAGE("NETGENPlugin_NETGEN_3D::Compute with maxElmentsize = " << _maxElementVolume);
|
||||
const int invalid_ID = -1;
|
||||
bool _quadraticMesh = false;
|
||||
typedef map< const SMDS_MeshNode*, int> TNodeToIDMap;
|
||||
TNodeToIDMap nodeToNetgenID;
|
||||
list< const SMDS_MeshElement* > triangles;
|
||||
SMESHDS_Mesh* MeshDS = aHelper->GetMeshDS();
|
||||
|
||||
SMESH_MesherHelper::MType MeshType = aHelper->IsQuadraticMesh();
|
||||
|
||||
if(MeshType == SMESH_MesherHelper::COMP)
|
||||
return error( COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Mesh with linear and quadratic elements given."));
|
||||
else if (MeshType == SMESH_MesherHelper::QUADRATIC)
|
||||
_quadraticMesh = true;
|
||||
|
||||
SMDS_FaceIteratorPtr iteratorFace = MeshDS->facesIterator();
|
||||
|
||||
while(iteratorFace->more())
|
||||
{
|
||||
// check element
|
||||
const SMDS_MeshElement* elem = iteratorFace->next();
|
||||
if ( !elem )
|
||||
return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
|
||||
bool isTraingle = ( elem->NbNodes()==3 || (_quadraticMesh && elem->NbNodes()==6 ));
|
||||
if ( !isTraingle )
|
||||
return error( COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Not triangle element ")<<elem->GetID());
|
||||
|
||||
// keep a triangle
|
||||
triangles.push_back( elem );
|
||||
// put elem nodes to nodeToNetgenID map
|
||||
SMDS_ElemIteratorPtr triangleNodesIt = elem->nodesIterator();
|
||||
while ( triangleNodesIt->more() ) {
|
||||
const SMDS_MeshNode * node =
|
||||
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
|
||||
if(aHelper->IsMedium(node))
|
||||
continue;
|
||||
|
||||
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------
|
||||
// Feed the Netgen with surface mesh
|
||||
// ---------------------------------
|
||||
|
||||
int Netgen_NbOfNodes = 0;
|
||||
int Netgen_param2ndOrder = 0;
|
||||
double Netgen_paramFine = 1.;
|
||||
double Netgen_paramSize = _maxElementVolume;
|
||||
|
||||
double Netgen_point[3];
|
||||
int Netgen_triangle[3];
|
||||
int Netgen_tetrahedron[4];
|
||||
|
||||
Ng_Init();
|
||||
|
||||
Ng_Mesh * Netgen_mesh = Ng_NewMesh();
|
||||
|
||||
// set nodes and remember thier netgen IDs
|
||||
|
||||
TNodeToIDMap::iterator n_id = nodeToNetgenID.begin();
|
||||
for ( ; n_id != nodeToNetgenID.end(); ++n_id )
|
||||
{
|
||||
const SMDS_MeshNode* node = n_id->first;
|
||||
|
||||
Netgen_point [ 0 ] = node->X();
|
||||
Netgen_point [ 1 ] = node->Y();
|
||||
Netgen_point [ 2 ] = node->Z();
|
||||
Ng_AddPoint(Netgen_mesh, Netgen_point);
|
||||
n_id->second = ++Netgen_NbOfNodes; // set netgen ID
|
||||
|
||||
}
|
||||
|
||||
// set triangles
|
||||
list< const SMDS_MeshElement* >::iterator tria = triangles.begin();
|
||||
for ( ; tria != triangles.end(); ++tria)
|
||||
{
|
||||
int i = 0;
|
||||
SMDS_ElemIteratorPtr triangleNodesIt = (*tria)->nodesIterator();
|
||||
while ( triangleNodesIt->more() ) {
|
||||
const SMDS_MeshNode * node =
|
||||
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
|
||||
if(aHelper->IsMedium(node))
|
||||
continue;
|
||||
Netgen_triangle[ i ] = nodeToNetgenID[ node ];
|
||||
++i;
|
||||
}
|
||||
|
||||
Ng_AddSurfaceElement(Netgen_mesh, NG_TRIG, Netgen_triangle);
|
||||
}
|
||||
|
||||
// -------------------------
|
||||
// Generate the volume mesh
|
||||
// -------------------------
|
||||
|
||||
Ng_Meshing_Parameters Netgen_param;
|
||||
|
||||
Netgen_param.secondorder = Netgen_param2ndOrder;
|
||||
Netgen_param.fineness = Netgen_paramFine;
|
||||
Netgen_param.maxh = Netgen_paramSize;
|
||||
|
||||
Ng_Result status;
|
||||
|
||||
try {
|
||||
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
status = Ng_GenerateVolumeMesh(Netgen_mesh, &Netgen_param);
|
||||
}
|
||||
catch (Standard_Failure& exc) {
|
||||
error(COMPERR_OCC_EXCEPTION, exc.GetMessageString());
|
||||
status = NG_VOLUME_FAILURE;
|
||||
}
|
||||
catch (...) {
|
||||
error("Bad mesh input!!!");
|
||||
status = NG_VOLUME_FAILURE;
|
||||
}
|
||||
if ( GetComputeError()->IsOK() ) {
|
||||
error( status, "Bad mesh input!!!");
|
||||
}
|
||||
|
||||
int Netgen_NbOfNodesNew = Ng_GetNP(Netgen_mesh);
|
||||
|
||||
int Netgen_NbOfTetra = Ng_GetNE(Netgen_mesh);
|
||||
|
||||
MESSAGE("End of Volume Mesh Generation. status=" << status <<
|
||||
", nb new nodes: " << Netgen_NbOfNodesNew - Netgen_NbOfNodes <<
|
||||
", nb tetra: " << Netgen_NbOfTetra);
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Feed back the SMESHDS with the generated Nodes and Volume Elements
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
bool isOK = ( Netgen_NbOfTetra > 0 );// get whatever built
|
||||
if ( isOK )
|
||||
{
|
||||
// vector of nodes in which node index == netgen ID
|
||||
vector< const SMDS_MeshNode* > nodeVec ( Netgen_NbOfNodesNew + 1 );
|
||||
// insert old nodes into nodeVec
|
||||
for ( n_id = nodeToNetgenID.begin(); n_id != nodeToNetgenID.end(); ++n_id ) {
|
||||
nodeVec.at( n_id->second ) = n_id->first;
|
||||
}
|
||||
// create and insert new nodes into nodeVec
|
||||
int nodeIndex = Netgen_NbOfNodes + 1;
|
||||
|
||||
for ( ; nodeIndex <= Netgen_NbOfNodesNew; ++nodeIndex )
|
||||
{
|
||||
Ng_GetPoint( Netgen_mesh, nodeIndex, Netgen_point );
|
||||
SMDS_MeshNode * node = aHelper->AddNode(Netgen_point[0],
|
||||
Netgen_point[1],
|
||||
Netgen_point[2]);
|
||||
nodeVec.at(nodeIndex) = node;
|
||||
}
|
||||
|
||||
// create tetrahedrons
|
||||
for ( int elemIndex = 1; elemIndex <= Netgen_NbOfTetra; ++elemIndex )
|
||||
{
|
||||
Ng_GetVolumeElement(Netgen_mesh, elemIndex, Netgen_tetrahedron);
|
||||
aHelper->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ),
|
||||
nodeVec.at( Netgen_tetrahedron[1] ),
|
||||
nodeVec.at( Netgen_tetrahedron[2] ),
|
||||
nodeVec.at( Netgen_tetrahedron[3] ));
|
||||
}
|
||||
}
|
||||
|
||||
Ng_DeleteMesh(Netgen_mesh);
|
||||
Ng_Exit();
|
||||
|
||||
NETGENPlugin_Mesher::RemoveTmpFiles();
|
||||
|
||||
return (status == NG_OK);
|
||||
}
|
||||
|
@ -23,19 +23,20 @@
|
||||
// Created : lundi 27 Janvier 2003
|
||||
// Author : Nadir BOUHAMOU (CEA)
|
||||
// Project : SALOME
|
||||
// Copyright : CEA 2003
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
|
||||
#ifndef _NETGENPlugin_NETGEN_3D_HXX_
|
||||
#define _NETGENPlugin_NETGEN_3D_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include "SMESH_3D_Algo.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "StdMeshers_MaxElementVolume.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
class NETGENPlugin_NETGEN_3D: public SMESH_3D_Algo
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_3D: public SMESH_3D_Algo
|
||||
{
|
||||
public:
|
||||
NETGENPlugin_NETGEN_3D(int hypId, int studyId, SMESH_Gen* gen);
|
||||
@ -48,11 +49,9 @@ public:
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape& aShape);
|
||||
|
||||
ostream & SaveTo(ostream & save);
|
||||
istream & LoadFrom(istream & load);
|
||||
friend ostream & operator << (ostream & save, NETGENPlugin_NETGEN_3D & hyp);
|
||||
friend istream & operator >> (istream & load, NETGENPlugin_NETGEN_3D & hyp);
|
||||
|
||||
virtual bool Compute(SMESH_Mesh& aMesh,
|
||||
SMESH_MesherHelper* aHelper);
|
||||
|
||||
protected:
|
||||
double _maxElementVolume;
|
||||
|
||||
|
@ -27,13 +27,14 @@
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "NETGENPlugin_NETGEN_3D_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i
|
||||
|
@ -30,6 +30,8 @@
|
||||
#ifndef _NETGENPlugin_NETGEN_3D_I_HXX_
|
||||
#define _NETGENPlugin_NETGEN_3D_I_HXX_
|
||||
|
||||
#include "NETGENPlugin_Defs.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
|
||||
|
||||
@ -39,7 +41,7 @@
|
||||
// ======================================================
|
||||
// NETGEN 3d algorithm
|
||||
// ======================================================
|
||||
class NETGENPlugin_NETGEN_3D_i:
|
||||
class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_3D_i:
|
||||
public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_3D,
|
||||
public virtual SMESH_3D_Algo_i
|
||||
{
|
||||
|
@ -26,11 +26,11 @@
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
#include "utilities.h"
|
||||
|
||||
#include "NETGENPlugin_NETGEN_3D_i.hxx"
|
||||
#include "NETGENPlugin_NETGEN_2D_i.hxx"
|
||||
#include "NETGENPlugin_NETGEN_2D_ONLY_i.hxx"
|
||||
#include "NETGENPlugin_NETGEN_2D3D_i.hxx"
|
||||
#include "NETGENPlugin_Hypothesis_i.hxx"
|
||||
#include "NETGENPlugin_Hypothesis_2D_i.hxx"
|
||||
@ -49,6 +49,7 @@ template <class T> class NETGENPlugin_Creator_i:public HypothesisCreator_i<T>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
NETGENPLUGIN_EXPORT
|
||||
GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName)
|
||||
{
|
||||
MESSAGE("GetHypothesisCreator " << aHypName);
|
||||
@ -62,6 +63,8 @@ extern "C"
|
||||
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_NETGEN_3D_i>;
|
||||
else if (strcmp(aHypName, "NETGEN_2D") == 0)
|
||||
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_NETGEN_2D_i>;
|
||||
else if (strcmp(aHypName, "NETGEN_2D_ONLY") == 0)
|
||||
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_NETGEN_2D_ONLY_i>;
|
||||
else if (strcmp(aHypName, "NETGEN_2D3D") == 0)
|
||||
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_NETGEN_2D3D_i>;
|
||||
// Hypotheses
|
||||
|
20
src/NETGENPlugin/NETGENPlugin_icons.po
Normal file
20
src/NETGENPlugin/NETGENPlugin_icons.po
Normal file
@ -0,0 +1,20 @@
|
||||
# This is a Qt message file in .po format. Each msgid starts with
|
||||
# a scope. This scope should *NOT* be translated - eg. "Foo::Bar"
|
||||
# would be translated to "Pub", not "Foo::Pub".
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
|
||||
"PO-Revision-Date: YYYY-MM-DD\n"
|
||||
"Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
|
||||
"Content-Type: text/plain; charset=iso-8859-1\n"
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# ObjectBrowser
|
||||
#-----------------------------------------------------------
|
||||
|
||||
#mesh_tree_algo_netgen
|
||||
msgid "ICON_SMESH_TREE_ALGO_NETGEN_3D"
|
||||
msgstr "mesh_tree_algo_tetra.png"
|
||||
#msgstr "mesh_tree_algo_netgen.png"
|
Loading…
Reference in New Issue
Block a user