Merge from BR_DEBUG_3_2_0b1

This commit is contained in:
abd 2006-06-15 07:39:03 +00:00
parent 899f23e83e
commit 1c086f562c
44 changed files with 523 additions and 192 deletions

View File

@ -1,5 +1 @@
This is the version 3.2.0a1 of NETGENPLUGIN
Compatible with :
- KERNEL 3.2.0a1
- SALOMEGUI 3.2.0a1
- SMESH 3.2.0a1
SALOME2 : NETGENPLUGIN module (SMESH plugin)

View File

@ -1,3 +1,22 @@
# 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)
@ -9,27 +28,43 @@
top_srcdir=@top_srcdir@
top_builddir=.
srcdir=@srcdir@
VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl
VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top_srcdir@/idl
@COMMENCE@
SUBDIRS = idl src
SUBDIRS = idl src adm_local
RESOURCES_FILES = NETGENPlugin.xml
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 ------------
ifeq ($(HAVE_SSTREAM),yes)
include_list=include/salome/SALOMEconfig.h
else
include_list=include/salome/SALOMEconfig.h include/salome/sstream
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) ../../$< $@
@ -47,6 +82,18 @@ 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)
@ -66,4 +113,4 @@ distclean-other:
@MODULE@
install: install-bin
install: install-bin install-include

View File

@ -105,6 +105,7 @@ OCC_VIEWER_LIBS=@CAS_VIEWER@
OCC_MODELER_LIBS=@CAS_MODELER@
OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@
OCC_LIBS=@CAS_LDFLAGS@
OCC_LDPATH=@CAS_LDPATH@
# MPICH
@ -234,7 +235,13 @@ all:
Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in
cd $(top_builddir) ; ./config.status
$(top_builddir)/config.status: $(top_srcdir)/configure
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 :-)
@ -249,19 +256,33 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
cd $(top_srcdir) && ./build_configure
ACLOCAL_SRC = \
ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \
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 check_opengl.m4 python.m4 \
ac_cxx_partial_specialization.m4 python.m4 \
ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
ac_cc_warnings.m4 check_qt.m4 check_swig.m4 \
check_boost.m4
ac_cc_warnings.m4 check_swig.m4 check_boost.m4
#ifeq (@WITHNETGEN@,yes)
# ACLOCAL_SRC += check_Netgen.m4
#endif
$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%)
cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files
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

View File

@ -1 +0,0 @@
THIS IS SALOME - NETGENPLUGIN VERSION: 3.2.0a1

View File

@ -26,6 +26,38 @@ fi
# echo "failed : KERNEL_SRC variable is not correct !"
# exit
#fi
########################################################################
# 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
fi
########################################################################
# Test if the MED_ROOT_DIR is set correctly
if test ! -d "${MED_ROOT_DIR}"; then
echo "failed : MED_ROOT_DIR variable is not correct !"
exit
fi
########################################################################
# Test if the GEOM_ROOT_DIR is set correctly
if test ! -d "${GEOM_ROOT_DIR}"; then
echo "failed : GEOM_ROOT_DIR variable is not correct !"
exit
fi
########################################################################
# Test if the SMESH_ROOT_DIR is set correctly
if test ! -d "${SMESH_ROOT_DIR}"; then
echo "failed : SMESH_ROOT_DIR variable is not correct !"
exit
fi
########################################################################
# find_in - utility function
#
@ -125,9 +157,9 @@ 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 \\" >> 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 \\" >> 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
@ -203,7 +235,11 @@ else
echo -n "Creating 'configure' script ... "
fi
aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
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"

View File

@ -22,8 +22,10 @@ AC_CANONICAL_HOST
PACKAGE=salome
AC_SUBST(PACKAGE)
VERSION=0.0.1
VERSION=3.2.0
XVERSION=0x030200
AC_SUBST(VERSION)
AC_SUBST(XVERSION)
dnl
dnl Initialize source and build root directories
@ -257,6 +259,26 @@ 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

View File

@ -1,3 +1,22 @@
# 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 :
#

View File

@ -15,7 +15,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@ -40,6 +40,56 @@ module NETGENPlugin
{
};
/*!
* NETGENPlugin_NETGEN_2D: interface of "1D-2D (Netgen)" algorithm
*/
interface NETGENPlugin_NETGEN_2D : SMESH::SMESH_2D_Algo
{
};
/*!
* NETGENPlugin_NETGEN_2D3D: interface of "1D-2D-3D (Netgen)" algorithm
*/
interface NETGENPlugin_NETGEN_2D3D : SMESH::SMESH_3D_Algo
{
};
/*!
* NETGENPlugin_Hypothesis: interface of "NETGEN parameters" hypothesis
*/
interface NETGENPlugin_Hypothesis : SMESH::SMESH_Hypothesis
{
void SetMaxSize(in double value);
double GetMaxSize();
void SetSecondOrder(in boolean value);
boolean GetSecondOrder();
void SetOptimize(in boolean value);
boolean GetOptimize();
void SetFineness(in long value);
long GetFineness();
void SetGrowthRate(in double value);
double GetGrowthRate();
void SetNbSegPerEdge(in double value);
double GetNbSegPerEdge();
void SetNbSegPerRadius(in double value);
double GetNbSegPerRadius();
};
/*!
* NETGENPlugin_Hypothesis_2D: interface of "NETGEN 2D parameters" hypothesis
*/
interface NETGENPlugin_Hypothesis_2D : NETGENPlugin_Hypothesis
{
void SetQuadAllowed(in boolean value);
boolean GetQuadAllowed();
};
};
#endif

View File

@ -8,11 +8,34 @@
<meshers-group name="NETGEN"
resources="NETGENPlugin"
server-lib="NETGENEngine"
gui-lib="">
gui-lib="NETGENPluginGUI">
<hypotheses>
<hypothesis type="NETGEN_Parameters"
label-id="NETGEN 3D Parameters"
icon-id="mesh_hypo_netgen.png"
dim="3"/>
<hypothesis type="NETGEN_Parameters_2D"
label-id="NETGEN 2D Parameters"
icon-id="mesh_hypo_netgen_2d.png"
dim="2"/>
</hypotheses>
<algorithms>
<algorithm type="NETGEN_3D"
label-id="Tetrahedron (Netgen)"
icon-id="mesh_algo_tetra.png"
hypos="MaxElementVolume"
input="TRIA"
dim="3"/>
<algorithm type="NETGEN_2D"
label-id="Netgen 1D-2D"
icon-id="mesh_algo_netgen_2d.png"
hypos="NETGEN_Parameters_2D"
output="TRIA,QUAD"
dim="2"/>
<algorithm type="NETGEN_2D3D"
label-id="Netgen 1D-2D-3D"
icon-id="mesh_algo_netgen_2d3d.png"
hypos="NETGEN_Parameters"
dim="3"/>
</algorithms>
</meshers-group>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 B

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 224 B

View File

@ -15,7 +15,7 @@
# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
#
#
@ -31,6 +31,6 @@ VPATH=.:@srcdir@
@COMMENCE@
SUBDIRS = NETGEN NETGENPlugin
SUBDIRS = NETGEN NETGENPlugin GUI
@MODULE@

View File

@ -1,3 +1,22 @@
# 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 : Edward AGAPOV (OCC)
@ -21,24 +40,26 @@ LIB = libNETGEN.la
LIB_OBJ_O = \
linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o \
improve3.o adfront3.o tetrarls.o prism2rls.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.o \
clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.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 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 spline2d.o splinegeometry2.o ngnewdelete.o nglib.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
NETGEN_LIBS_DIR=@NETGEN_LIBS_DIR@
$(LIB_OBJ_O):
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
@ -47,7 +68,7 @@ $(LIB_OBJ_O):
ar x $(NETGEN_LIBS_DIR)/libla.a
ar x $(NETGEN_LIBS_DIR)/libstlgeom.a
ar x $(NETGEN_LIBS_DIR)/libgeom2d.a
rm -rf sgparser.o hprefinement.o parthreads.o writediffpack.o writepermas.o writeuser.o dynamicmem.o importsolution.o readuser.o writefeap.o writetecplot.o wuchemnitz.o extrusion.o writeabaqus.o writefluent.o writetochnog.o csgparser.o geom2dmesh.o
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)
@ -62,4 +83,6 @@ else
LDFLAGS += -lg2c
endif
LDFLAGS += $(OCC_LDPATH) -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES
MOSTLYCLEAN += $(LIB_OBJ_O)

View File

@ -1,102 +1,78 @@
The Netgen 4.3 from the web location : http://www.hpfem.jku.at/netgen/ is used
in the SMESH Module of Salome2 distribution.
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
------------------------------
Patch the official netgen 4.3 distribution:
Patch the netgen 4.5 distribution:
$ cd netgen43
$ patch -p1 < patch_directory/netgen43ForSalome.patch
$ cd netgen45
$ patch -p1 < patch_directory/netgen45ForSalome.patch
Then run makeForSalome.sh:
Then run makeForSalome.sh (it will be created by the patch):
$ sh makeForSalome.sh
Additional information for maintainers
--------------------------------------
The SMESH Engine of SALOME2 (particularly the m4 file check_Netgen.m4) assume
The file check_NETGENPLUGIN.m4 assumes
that Netgen is installed in the directory <netgen_installation_path> as follow:
prompt> ls <netgen_installation_path>
bin/ cshrc_for_netgen doc/ include/ lib/ tutorials/
include/ lib/
prompt> ls <netgen_installation_path>/bin
prompt> ls <netgen_installation_path>/include
adfront2.hpp explicitcurve2d.hpp hpref_quad.hpp myadt.hpp spbita2d.hpp
adfront3.hpp extrusion.hpp hpref_segm.hpp mydefs.hpp specials.hpp
adtree.hpp findip.hpp hpref_tet.hpp mystdlib.h specpoin.hpp
algprim.hpp findip2.hpp hpref_trig.hpp mystring.hpp spline.hpp
array.hpp flags.hpp hprefinement.hpp ngexception.hpp spline2d.hpp
autoptr.hpp gencyl.hpp identify.hpp nglib.h spline3d.hpp
basemat.hpp geom2d.hpp improve2.hpp occgeom.hpp splinegeometry.hpp
bisect.hpp geom2dmesh.hpp improve3.hpp occmeshsurf.hpp splinegeometry2.hpp
bitarray.hpp geom3d.hpp linalg.hpp opti.hpp stack.hpp
boundarylayer.hpp geometry2d.hpp localh.hpp optmem.hpp stlgeom.hpp
brick.hpp geomfuncs.hpp manifold.hpp parthreads.hpp stlline.hpp
classifyhpel.hpp geoml.hpp meshclass.hpp polyhedra.hpp stltool.hpp
clusters.hpp geomobjects.hpp meshfunc.hpp polynomial.hpp stltopology.hpp
csg.hpp geomops.hpp meshing.hpp profiler.hpp surface.hpp
csgeom.hpp geomsearch.hpp meshing2.hpp revolution.hpp symbolta.hpp
csgparser.hpp geomtest3d.hpp meshing3.hpp ruler2.hpp table.hpp
curve2d.hpp global.hpp meshstlsurface.hpp ruler3.hpp template.hpp
curvedelems.hpp gprim.hpp meshsurf.hpp seti.hpp topology.hpp
curvedelems_new.hpp hashtabl.hpp meshtool.hpp singularref.hpp transform3d.hpp
densemat.hpp hpref_hex.hpp meshtype.hpp solid.hpp triapprox.hpp
dynamicmem.hpp hpref_prism.hpp moveablemem.hpp sort.hpp vector.hpp
edgeflw.hpp hpref_pyramid.hpp msghandler.hpp sparsmat.hpp
prompt> ls <netgen_installation_path>/lib
LINUX/
prompt> ls <netgen_installation_path>/bin/LINUX/
prompt> ls <netgen_installation_path>/lib/LINUX
demoapp/ ng ng.tcl ngtcltk/ startup.tcl
libcsg.a libgeom2d.a libla.a libnginterface.a libopti.a
libgen.a libgprim.a libmesh.a libocc.a libstlgeom.a
prompt> ls <netgen_installation_path>/bin/LINUX/demoapp/
demoapp.tcl
prompt> ls <netgen_installation_path>/bin/LINUX/ngtcltk/
dialog.tcl menustat.tcl ngicon.tcl parameters.tcl
drawing.tcl nghelp.tcl ngvisual.tcl variables.tcl
prompt> ls <netgen_installation_path>/doc/
ng4.pdf usenetgen.ps
prompt> ls <netgen_installation_path>/include/
nglib.h
prompt> ls <netgen_installation_path>/lib/
LINUX/
prompt> ls <netgen_installation_path>/lib/LINUX/
libcsg.a libgeom2d.a libla.a libnginterface.a libstlgeom.a
libgen.a libgprim.a libmesh.a libopti.a libvis.a
prompt> ls <netgen_installation_path>/tutorials/
boxcyl.geo cylinder.geo ficherea.geo part1.stl square.in2d
cone.geo cylsphere.geo hinge.stl sculpture.geo trafo.geo
cubeandspheres.geo demo2d.in2d lshape3d.geo shaft.geo twobricks.geo
cube.geo ellipsoid.geo manyholes.geo sphere.geo twocubes.geo
cubemcyl.geo ellipticcyl.geo matrix.geo sphereincube.geo twocyl.geo
cubemsphere.geo
All *.tcl files are needed to control and initiate the Netgen mesher throughout its
MHI (Machine Human Interface).<netgen_installation_path>/bin/LINUX/ng is the Netgen
executable with its embarked MHI. All the libraries *.a should be compiled without
the option -DOPENGL which is only needed for the Netgen MHI. netgen43 is assumed to
be the directory downloaded from the above web location archive of Netgen. The library
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
nglib.o (from netgen43/libsrc/interface/nglib.cpp) and ngnewdelete.o
(from netgen43/ngtcltk/ngnewdelete.cpp).
nglib.o (from netgen45/libsrc/interface/nglib.cpp) and ngnewdelete.o
(from netgen45/ngtcltk/ngnewdelete.cpp).
To have that kind of distribution from the version in the above web location you
should first compile Netgen as suggested in the netgen43/README.INSTALL file. It will
then produce the executable ng linked statically with the libraries *.a. Then modify
the Makefiles to remove -DOPENGL from compiler flags list, add the objects nglib.o
and ngnewdelete.o to the library libnginterface.a and recompile the libraries only.
need not to compile Netgen as suggested in the netgen45/README.INSTALL file.
Simply modify the Makefiles to remove -DOPENGL from compiler flags
list and to add OCC include dir and flags to compiler flags, add the objects
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.
From the above web location perhaps, you will have to alter some Netgen sources to
compile them; if you find any difficulties to do that, just ask me.
Th suggested patch alters some Netgen sources to compile them.
Nadir
********************************
* Dr Nadir Bouhamou *
* Ingénieur-chercheur *
* Engineer-Researcher *
* *
* CEA Saclay *
* DEN/DM2S/SFME/LGLS *
* Bat 454 Pièce 5A *
* 91191 Gif-Sur-Yvette cédex *
* *
* Tél: +33 (0)1 69 08 73 07 *
* Fax: +33 (0)1 69 08 96 96 *
* email: nadir.bouhamou@cea.fr *
********************************
Michael SAZONOV
m-sazonov@opencascade.com

View File

@ -1,3 +1,22 @@
# 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 : Edward AGAPOV (OCC)
@ -10,20 +29,32 @@
top_srcdir=@top_srcdir@
top_builddir=../..
srcdir=@srcdir@
VPATH=.:@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_icons.po
LIB_SRC = \
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_Hypothesis.cxx \
NETGENPlugin_Hypothesis_i.cxx \
NETGENPlugin_Hypothesis_2D.cxx \
NETGENPlugin_Hypothesis_2D_i.cxx \
NETGENPlugin_Mesher.cxx \
NETGENPlugin_i.cxx
LIB_SERVER_IDL = NETGENPlugin_Algorithm.idl
LIB_CLIENT_IDL = \
SALOME_Component.idl \
SALOME_Comm.idl \
GEOM_Gen.idl \
MED.idl
# Libraries targets
LIB = libNETGENEngine.la

View File

@ -26,10 +26,11 @@
// $Header$
//=============================================================================
using namespace std;
#include <NETGENPlugin_Hypothesis.hxx>
#include <utilities.h>
using namespace std;
//=============================================================================
/*!
*

View File

@ -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

View File

@ -26,10 +26,11 @@
// $Header$
//=============================================================================
using namespace std;
#include <NETGENPlugin_Hypothesis_2D.hxx>
#include <utilities.h>
using namespace std;
//=============================================================================
/*!
*

View File

@ -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:

View File

@ -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

View File

@ -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
{

View File

@ -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

View File

@ -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
{

View File

@ -25,8 +25,6 @@
// Project : SALOME
// $Header$
//=============================================================================
using namespace std;
#include "NETGENPlugin_Mesher.hxx"
#include "NETGENPlugin_Hypothesis_2D.hxx"
@ -56,6 +54,8 @@ namespace netgen {
extern MeshingParameters mparam;
}
using namespace std;
//=============================================================================
/*!
*
@ -70,22 +70,23 @@ NETGENPlugin_Mesher::NETGENPlugin_Mesher (SMESHDS_Mesh* meshDS,
_isVolume(isVolume),
_optimize(true)
{
netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
// 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 +98,22 @@ void NETGENPlugin_Mesher::SetParameters(const NETGENPlugin_Hypothesis* hyp)
{
if (hyp)
{
netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
// 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();
}
@ -147,14 +149,15 @@ Standard_Boolean IsEqual(const Link& aLink1, const Link& aLink2)
//=============================================================================
bool NETGENPlugin_Mesher::Compute()
{
netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
MESSAGE("Compute with:\n"
" max size = " << netgen::mparam.maxh << "\n"
" segments per edge = " << netgen::mparam.segmentsperedge);
" max size = " << mparams.maxh << "\n"
" segments per edge = " << mparams.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);
" growth rate = " << mparams.grading << "\n"
" elements per radius = " << mparams.curvaturesafety << "\n"
" second order = " << mparams.secondorder << "\n"
" quad allowed = " << mparams.quad);
nglib::Ng_Init();
@ -202,7 +205,7 @@ bool NETGENPlugin_Mesher::Compute()
startWith = endWith = netgen::MESHCONST_MESHVOLUME;
err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr);
}
if (!err && netgen::mparam.secondorder > 0)
if (!err && mparams.secondorder > 0)
{
netgen::OCCRefinementSurfaces ref (occgeo);
ref.MakeSecondOrder (*ngMesh);

View File

@ -29,6 +29,8 @@
#ifndef _NETGENPlugin_Mesher_HXX_
#define _NETGENPlugin_Mesher_HXX_
#include "NETGENPlugin_Defs.hxx"
class SMESHDS_Mesh;
class TopoDS_Shape;
class NETGENPlugin_Hypothesis;
@ -37,7 +39,7 @@ class NETGENPlugin_Hypothesis;
* \brief This class calls the NETGEN mesher of OCC geometry
*/
class NETGENPlugin_Mesher
class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
{
public:
// ---------- PUBLIC METHODS ----------

View File

@ -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;
//=============================================================================
/*!
*

View File

@ -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);

View File

@ -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;
//=============================================================================
/*!
*

View File

@ -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);

View File

@ -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

View File

@ -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
{

View File

@ -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

View File

@ -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
{

View File

@ -1,3 +1,22 @@
// 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_3D.cxx
// Moved here from SMESH_NETGEN_3D.cxx
@ -15,6 +34,7 @@
#include "SMESHDS_Mesh.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMESH_MesherHelper.hxx"
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
@ -31,15 +51,11 @@
Netgen include files
*/
namespace nglib
{
#include <nglib.h>
namespace nglib {
#include <nglib.h>
}
using namespace nglib;
using namespace std;
//=============================================================================
/*!
*
@ -142,6 +158,9 @@ 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);
bool _quadraticMesh = myTool->IsQuadraticSubMesh(aShape);
typedef map< const SMDS_MeshNode*, int> TNodeToIDMap;
TNodeToIDMap nodeToNetgenID;
list< const SMDS_MeshElement* > triangles;
@ -166,8 +185,10 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
{
// check element
const SMDS_MeshElement* elem = iteratorElem->next();
if ( !elem || elem->NbNodes() != 3 ) {
if ( !elem ||
!( elem->NbNodes()==3 || ( _quadraticMesh && elem->NbNodes()==6) ) ) {
INFOS( "NETGENPlugin_NETGEN_3D::Compute(), bad mesh");
delete myTool; myTool = 0;
return false;
}
// keep a triangle
@ -178,6 +199,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
while ( triangleNodesIt->more() ) {
const SMDS_MeshNode * node =
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
if(myTool->IsMedium(node))
continue;
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
}
#ifdef _DEBUG_
@ -250,6 +273,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
if ( isDegen ) // all nodes on a degen edge get one netgen ID
*(shId_ngId->second) = n_id->second;
}
// set triangles
list< const SMDS_MeshElement* >::iterator tria = triangles.begin();
list< bool >::iterator reverse = isReversed.begin();
@ -260,6 +284,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
while ( triangleNodesIt->more() ) {
const SMDS_MeshNode * node =
static_cast<const SMDS_MeshNode *>(triangleNodesIt->next());
if(myTool->IsMedium(node))
continue;
Netgen_triangle[ *reverse ? 2 - i : i ] = nodeToNetgenID[ node ];
++i;
}
@ -285,7 +311,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
try {
status = Ng_GenerateVolumeMesh(Netgen_mesh, &Netgen_param);
} catch (...) {
}
catch (...) {
MESSAGE("An exception has been caught during the Volume Mesh Generation ...");
status = NG_VOLUME_FAILURE;
}
@ -308,8 +335,9 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
// 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 )
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;
int shapeID = meshDS->ShapeToIndex( aShape );
@ -327,7 +355,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
for ( int elemIndex = 1; elemIndex <= Netgen_NbOfTetra; ++elemIndex )
{
Ng_GetVolumeElement(Netgen_mesh, elemIndex, Netgen_tetrahedron);
SMDS_MeshVolume * elt = meshDS->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ),
SMDS_MeshVolume * elt = myTool->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ),
nodeVec.at( Netgen_tetrahedron[1] ),
nodeVec.at( Netgen_tetrahedron[2] ),
nodeVec.at( Netgen_tetrahedron[3] ));
@ -338,6 +366,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
Ng_DeleteMesh(Netgen_mesh);
Ng_Exit();
delete myTool; myTool = 0;
return isOK;
}

View File

@ -1,25 +1,35 @@
// 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_3D.hxx
// Moved here from SMESH_NETGEN_3D.hxx
// 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_
#ifdef WIN32
#ifdef NETGENPLUGIN_EXPORTS
#define NETGENPLUGIN_EXPORT __declspec( dllexport )
#else
#define NETGENPLUGIN_EXPORT __declspec( dllimport )
#endif
#else
#define NETGENPLUGIN_EXPORT
#endif
#include "NETGENPlugin_Defs.hxx"
#include "SMESH_3D_Algo.hxx"
#include "SMESH_Mesh.hxx"

View File

@ -17,7 +17,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//

View File

@ -17,7 +17,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@ -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)

View File

@ -17,7 +17,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@ -29,6 +29,16 @@
#include "utilities.h"
#include "NETGENPlugin_NETGEN_3D_i.hxx"
#include "NETGENPlugin_NETGEN_2D_i.hxx"
#include "NETGENPlugin_NETGEN_2D3D_i.hxx"
#include "NETGENPlugin_Hypothesis_i.hxx"
#include "NETGENPlugin_Hypothesis_2D_i.hxx"
template <class T> class NETGENPlugin_Creator_i:public HypothesisCreator_i<T>
{
// as we have 'module NETGENPlugin' in NETGENPlugin_Algorithm.idl
virtual std::string GetModuleName() { return "NETGENPlugin"; }
};
using namespace std;
@ -51,7 +61,16 @@ extern "C"
// Algorithms
if (strcmp(aHypName, "NETGEN_3D") == 0)
aCreator = new HypothesisCreator_i<NETGENPlugin_NETGEN_3D_i>;
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_2D3D") == 0)
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_NETGEN_2D3D_i>;
// Hypotheses
else if (strcmp(aHypName, "NETGEN_Parameters") == 0)
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_Hypothesis_i>;
else if (strcmp(aHypName, "NETGEN_Parameters_2D") == 0)
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_Hypothesis_2D_i>;
else ;
return aCreator;