Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1636efa7ec | ||
|
1c5be6335c | ||
|
55d7933efe | ||
|
e6e02812ed | ||
|
58429b7405 | ||
|
4178edae0a | ||
|
b32d520638 | ||
|
0857e7bffe | ||
|
46adf58292 | ||
|
4db4ace92a | ||
|
1552ad307a | ||
|
92aed1e510 | ||
|
74459a0d46 | ||
|
e3e64a8856 | ||
|
d044e30e9c | ||
|
19f84535d7 | ||
|
93b251f66d | ||
|
af62c662c5 |
50
adm_local/cmake_files/FindNETGEN.cmake
Normal file
50
adm_local/cmake_files/FindNETGEN.cmake
Normal file
@ -0,0 +1,50 @@
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 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
|
||||
#
|
||||
|
||||
SET(NETGENHOME $ENV{NETGENHOME})
|
||||
FIND_PATH(NETGEN_INCLUDES_DIR nglib.h ${NETGENHOME}/include)
|
||||
SET(NETGEN_INCLUDES)
|
||||
SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -I${NETGEN_INCLUDES_DIR})
|
||||
SET(NETGEN_INCLUDES ${NETGEN_INCLUDES} -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
|
||||
|
||||
FIND_LIBRARY(NETGEN_LIB_csg csg PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_gen gen PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_geom2d geom2d PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_gprim gprim PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_la la PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_mesh mesh PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_nginterface nginterface PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_occ occ PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_opti opti PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
FIND_LIBRARY(NETGEN_LIB_stlgeom stlgeom PATHS ${NETGENHOME}/lib ${NETGENHOME}/lib/LINUX)
|
||||
|
||||
SET(NETGEN_LIBS)
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_csg})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_gen})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_geom2d})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_gprim})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_la})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_mesh})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_nginterface})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_occ})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_opti})
|
||||
SET(NETGEN_LIBS ${NETGEN_LIBS} ${NETGEN_LIB_stlgeom})
|
30
build_cmake
Executable file
30
build_cmake
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
#
|
||||
# Copyright (C) 2003-2007 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
|
||||
#
|
||||
|
||||
CURRENT_DIR=`pwd`
|
||||
CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
|
||||
cd ${CONF_DIR}
|
||||
python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --netgenplugin
|
||||
status=$?
|
||||
cd ${CURRENT_DIR}
|
||||
exit $status
|
2
build_cmake.bat
Normal file
2
build_cmake.bat
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --netgenplugin
|
@ -30,7 +30,6 @@
|
||||
#
|
||||
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
|
||||
@ -46,27 +45,6 @@ fi
|
||||
# echo "failed : KERNEL_SRC variable is not correct !"
|
||||
# exit
|
||||
#fi
|
||||
for option
|
||||
do
|
||||
case $option in
|
||||
-with-gui | --with-gui)
|
||||
NETGENPLUGIN_WITH_GUI="yes"
|
||||
break;;
|
||||
-without-gui | --without-gui | -with-gui=no | --with-gui=no)
|
||||
NETGENPLUGIN_WITH_GUI="no"
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
########################################################################
|
||||
# Test if the GUI_ROOT_DIR is set correctly
|
||||
|
||||
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
|
||||
|
||||
########################################################################
|
||||
# Test if the MED_ROOT_DIR is set correctly
|
||||
@ -96,10 +74,6 @@ cd ${CONF_DIR}
|
||||
ABS_CONF_DIR=`pwd`
|
||||
|
||||
#######################################################################
|
||||
# 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
|
||||
|
||||
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
|
||||
@ -129,20 +103,11 @@ cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
|
||||
# autom4te.cache (directory)
|
||||
echo "====================================================== aclocal"
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
# ____________________________________________________________________
|
||||
# libtoolize creates some configuration files (ltmain.sh,
|
||||
|
91
configure.ac
91
configure.ac
@ -31,11 +31,11 @@
|
||||
# Reorganization for usage of autotools
|
||||
# Created from configure.in.base
|
||||
#
|
||||
AC_INIT([Salome2 Project NETGENPLUGIN module], [5.1.0], [webmaster.salome@opencascade.com], [SalomeNETGENPLUGIN])
|
||||
AC_INIT([Salome2 Project NETGENPLUGIN module], [5.1.2], [webmaster.salome@opencascade.com], [SalomeNETGENPLUGIN])
|
||||
AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_INIT_AUTOMAKE([-Wno-portability])
|
||||
|
||||
XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
|
||||
AC_SUBST(XVERSION)
|
||||
@ -237,11 +237,34 @@ AC_SUBST_FILE(CORBA)
|
||||
corba=make_$ORB
|
||||
CORBA=adm_local/unix/$corba
|
||||
|
||||
NETGENPLUGIN_WITH_GUI=yes
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing GUI
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${NETGENPLUGIN_WITH_GUI}" = "yes"])
|
||||
CHECK_GUI_MODULE
|
||||
|
||||
if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
|
||||
gui_ok=no
|
||||
if test "${SalomeGUI_need}" != "no" -a "${FullGUI_ok}" = "yes" ; then
|
||||
gui_ok=yes
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(NETGENPLUGIN_ENABLE_GUI, [test "${gui_ok}" = "yes"])
|
||||
|
||||
if test "${SalomeGUI_need}" == "yes"; then
|
||||
if test "${FullGUI_ok}" != "yes"; then
|
||||
AC_MSG_WARN(For configure NETGENPLUGIN module necessary full GUI!)
|
||||
fi
|
||||
elif test "${SalomeGUI_need}" == "auto"; then
|
||||
if test "${FullGUI_ok}" != "yes"; then
|
||||
AC_MSG_WARN(Full GUI not found. Build will be done without GUI!)
|
||||
fi
|
||||
elif test "${SalomeGUI_need}" == "no"; then
|
||||
echo Build without GUI option has been chosen
|
||||
fi
|
||||
|
||||
if test "${gui_ok}" = "yes"; then
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo testing openGL
|
||||
@ -265,26 +288,6 @@ if test "${NETGENPLUGIN_WITH_GUI}" = "yes"; then
|
||||
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
|
||||
@ -360,11 +363,13 @@ 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"
|
||||
|
||||
if test "${gui_ok}" = "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 gui_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
elif test "${SalomeGUI_need}" != "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 gui_ok Geom_ok SMesh_ok Netgen_ok"
|
||||
else
|
||||
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
|
||||
@ -405,18 +410,18 @@ echo
|
||||
# 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 \
|
||||
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 \
|
||||
])
|
||||
|
@ -68,6 +68,8 @@ libNETGENPluginGUI_la_CPPFLAGS = \
|
||||
|
||||
libNETGENPluginGUI_la_LDFLAGS = \
|
||||
../NETGENPlugin/libNETGENEngine.la \
|
||||
${QT_MT_LIBS} \
|
||||
${GUI_LDFLAGS} -lSalomeApp -lqtx -lsuit \
|
||||
${SMESH_LDFLAGS} -lSMESH \
|
||||
$(CAS_KERNEL)
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
// $Header:
|
||||
//
|
||||
#ifdef WIN32
|
||||
#ifdef NETGENPLUGIN_GUI_EXPORTS
|
||||
#if defined NETGENPLUGIN_GUI_EXPORTS || defined NETGENPluginGUI_EXPORTS
|
||||
#define NETGENPLUGIN_GUI_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define NETGENPLUGIN_GUI_EXPORT __declspec( dllimport )
|
||||
|
@ -225,20 +225,18 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
||||
if ( isCreation() )
|
||||
myName->setText( hypName() );
|
||||
|
||||
// set default real values
|
||||
// Set default values
|
||||
|
||||
NETGENPlugin_SimpleHypothesis_2D_var h =
|
||||
NETGENPlugin_SimpleHypothesis_2D::_narrow( initParamsHypothesis( hasInitParamsHypothesis() ));
|
||||
|
||||
if ( double len = h->GetLocalLength() )
|
||||
int dfltNbSeg = (int) h->GetNumberOfSegments();
|
||||
myNbSeg->setValue( dfltNbSeg );
|
||||
if ( double len = h->GetLocalLength() ) {
|
||||
myLength->setValue( len );
|
||||
if ( double area = h->GetMaxElementArea() )
|
||||
myArea->setValue( area );
|
||||
if ( myVolume ) {
|
||||
NETGENPlugin_SimpleHypothesis_3D_var h3d =
|
||||
NETGENPlugin_SimpleHypothesis_3D::_narrow( initParamsHypothesis( hasInitParamsHypothesis()) );
|
||||
if ( double volume = (double) h3d->GetMaxElementVolume() )
|
||||
myVolume->setValue( volume );
|
||||
myArea->setValue( len * len );
|
||||
if ( myVolume )
|
||||
myVolume->setValue( len * len * len );
|
||||
}
|
||||
|
||||
h = NETGENPlugin_SimpleHypothesis_2D::_narrow( hypothesis() );
|
||||
@ -248,7 +246,7 @@ void NETGENPluginGUI_SimpleCreator::retrieveParams() const
|
||||
SMESH::ListOfParameters_var aParameters = h->GetLastParameters();
|
||||
|
||||
// 1D
|
||||
int nbSeg = (int) h->GetNumberOfSegments();
|
||||
int nbSeg = isCreation() ? dfltNbSeg : (int) h->GetNumberOfSegments();
|
||||
myNbSegRadioBut->setChecked( nbSeg );
|
||||
myLengthRadioBut->setChecked( !nbSeg );
|
||||
QString aPrm;
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Naur netgen-4.5.old/libsrc/csg/meshsurf.cpp netgen-4.5.new/libsrc/csg/meshsurf.cpp
|
||||
--- netgen-4.5.old/libsrc/csg/meshsurf.cpp 2006-02-14 11:54:35.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/csg/meshsurf.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/csg/meshsurf.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -77,11 +77,12 @@
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ diff -Naur netgen-4.5.old/libsrc/csg/meshsurf.cpp netgen-4.5.new/libsrc/csg/mesh
|
||||
void MeshOptimize2dSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2,
|
||||
diff -Naur netgen-4.5.old/libsrc/csg/meshsurf.hpp netgen-4.5.new/libsrc/csg/meshsurf.hpp
|
||||
--- netgen-4.5.old/libsrc/csg/meshsurf.hpp 2004-01-20 14:49:44.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/csg/meshsurf.hpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/csg/meshsurf.hpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -45,7 +45,7 @@
|
||||
MeshOptimize2dSurfaces (const CSGeometry & ageometry);
|
||||
|
||||
@ -27,9 +27,29 @@ diff -Naur netgen-4.5.old/libsrc/csg/meshsurf.hpp netgen-4.5.new/libsrc/csg/mesh
|
||||
///
|
||||
virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const;
|
||||
///
|
||||
diff -Naur netgen-4.5.old/libsrc/general/profiler.cpp netgen-4.5.new/libsrc/general/profiler.cpp
|
||||
--- netgen-4.5.old/libsrc/general/profiler.cpp 2006-01-11 13:05:59.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/general/profiler.cpp 2009-06-11 17:58:07.000000000 +0400
|
||||
@@ -34,8 +34,14 @@
|
||||
{
|
||||
StopTimer (total_timer);
|
||||
|
||||
- ofstream prof ("netgen.prof");
|
||||
- Print (prof);
|
||||
+ char* env;
|
||||
+ if ((env = getenv("NETGEN_PROF")) && !strcmp(env, "1")) {
|
||||
+ ofstream prof ("netgen.prof");
|
||||
+ Print (prof);
|
||||
+ }
|
||||
+ else {
|
||||
+ Print (std::cout);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
diff -Naur netgen-4.5.old/libsrc/interface/Makefile netgen-4.5.new/libsrc/interface/Makefile
|
||||
--- netgen-4.5.old/libsrc/interface/Makefile 2005-08-09 18:14:59.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/interface/Makefile 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/interface/Makefile 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -1,4 +1,5 @@
|
||||
-src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp
|
||||
+#src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp
|
||||
@ -39,7 +59,7 @@ diff -Naur netgen-4.5.old/libsrc/interface/Makefile netgen-4.5.new/libsrc/interf
|
||||
libpath = libsrc/interface
|
||||
diff -Naur netgen-4.5.old/libsrc/interface/nglib.cpp netgen-4.5.new/libsrc/interface/nglib.cpp
|
||||
--- netgen-4.5.old/libsrc/interface/nglib.cpp 2005-10-18 17:53:18.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/interface/nglib.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/interface/nglib.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -56,7 +56,8 @@
|
||||
|
||||
void Ng_Exit ()
|
||||
@ -52,7 +72,7 @@ diff -Naur netgen-4.5.old/libsrc/interface/nglib.cpp netgen-4.5.new/libsrc/inter
|
||||
|
||||
diff -Naur netgen-4.5.old/libsrc/makefile.inc netgen-4.5.new/libsrc/makefile.inc
|
||||
--- netgen-4.5.old/libsrc/makefile.inc 2005-09-02 17:17:51.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/makefile.inc 2008-02-12 14:59:55.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/makefile.inc 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -8,17 +8,14 @@
|
||||
LIBSRC_DIR=$(CPP_DIR)/libsrc
|
||||
LIB_DIR=$(CPP_DIR)/lib/$(MACHINE)
|
||||
@ -78,7 +98,7 @@ diff -Naur netgen-4.5.old/libsrc/makefile.inc netgen-4.5.new/libsrc/makefile.inc
|
||||
#
|
||||
diff -Naur netgen-4.5.old/libsrc/makefile.mach.LINUX netgen-4.5.new/libsrc/makefile.mach.LINUX
|
||||
--- netgen-4.5.old/libsrc/makefile.mach.LINUX 2004-10-11 23:49:26.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/makefile.mach.LINUX 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/makefile.mach.LINUX 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -16,7 +16,7 @@
|
||||
#
|
||||
CFLAGS2 =
|
||||
@ -88,29 +108,9 @@ diff -Naur netgen-4.5.old/libsrc/makefile.mach.LINUX netgen-4.5.new/libsrc/makef
|
||||
-ftemplate-depth-99 -finline-limit=10000 \
|
||||
-Wdisabled-optimization -funroll-loops -DnoNGSOLVE
|
||||
|
||||
diff -Naur netgen-4.5.old/libsrc/meshing/meshtype.cpp netgen-4.5.new/libsrc/meshing/meshtype.cpp
|
||||
--- netgen-4.5.old/libsrc/meshing/meshtype.cpp 2006-02-10 13:11:08.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/meshtype.cpp 2008-03-14 13:19:53.000000000 +0300
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <mystdlib.h>
|
||||
+#include <float.h>
|
||||
|
||||
#include "meshing.hpp"
|
||||
|
||||
@@ -774,7 +775,7 @@
|
||||
frob /= 2;
|
||||
|
||||
double det = trans.Det();
|
||||
- if (det <= 0)
|
||||
+ if (det <= DBL_MIN)
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob / det;
|
||||
|
||||
|
||||
diff -Naur netgen-4.5.old/libsrc/meshing/improve2.cpp netgen-4.5.new/libsrc/meshing/improve2.cpp
|
||||
--- netgen-4.5.old/libsrc/meshing/improve2.cpp 2006-01-11 19:08:19.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/improve2.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/improve2.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <opti.hpp>
|
||||
|
||||
@ -122,7 +122,7 @@ diff -Naur netgen-4.5.old/libsrc/meshing/improve2.cpp netgen-4.5.new/libsrc/mesh
|
||||
namespace netgen
|
||||
diff -Naur netgen-4.5.old/libsrc/meshing/improve2.hpp netgen-4.5.new/libsrc/meshing/improve2.hpp
|
||||
--- netgen-4.5.old/libsrc/meshing/improve2.hpp 2004-10-12 23:22:55.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/meshing/improve2.hpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/improve2.hpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -32,17 +32,16 @@
|
||||
///
|
||||
virtual void SelectSurfaceOfPoint (const Point3d & p,
|
||||
@ -149,9 +149,39 @@ diff -Naur netgen-4.5.old/libsrc/meshing/improve2.hpp netgen-4.5.new/libsrc/mesh
|
||||
|
||||
///
|
||||
virtual void GetNormalVector(INDEX surfind, const Point3d & p, PointGeomInfo & gi, Vec3d & n) const;
|
||||
diff -Naur netgen-4.5.old/libsrc/meshing/meshtype.cpp netgen-4.5.new/libsrc/meshing/meshtype.cpp
|
||||
--- netgen-4.5.old/libsrc/meshing/meshtype.cpp 2006-02-10 13:11:08.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/meshtype.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <mystdlib.h>
|
||||
+#include <float.h>
|
||||
|
||||
#include "meshing.hpp"
|
||||
|
||||
@@ -774,7 +775,7 @@
|
||||
frob /= 2;
|
||||
|
||||
double det = trans.Det();
|
||||
- if (det <= 0)
|
||||
+ if (det <= DBL_MIN)
|
||||
err += 1e12;
|
||||
else
|
||||
err += frob * frob / det;
|
||||
diff -Naur netgen-4.5.old/libsrc/meshing/meshtype.hpp netgen-4.5.new/libsrc/meshing/meshtype.hpp
|
||||
--- netgen-4.5.old/libsrc/meshing/meshtype.hpp 2006-02-10 13:11:08.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/meshtype.hpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -13,7 +13,7 @@
|
||||
Classes for NETGEN
|
||||
*/
|
||||
|
||||
-
|
||||
+class Mesh;
|
||||
enum ELEMENT_TYPE {
|
||||
SEGMENT = 1, SEGMENT3 = 2,
|
||||
TRIG = 10, QUAD=11, TRIG6 = 12, QUAD6 = 13, QUAD8 = 14,
|
||||
diff -Naur netgen-4.5.old/libsrc/meshing/smoothing2.cpp netgen-4.5.new/libsrc/meshing/smoothing2.cpp
|
||||
--- netgen-4.5.old/libsrc/meshing/smoothing2.cpp 2006-01-11 19:08:20.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/smoothing2.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/meshing/smoothing2.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -300,7 +300,7 @@
|
||||
double Opti2SurfaceMinFunction ::
|
||||
FuncGrad (const Vector & x, Vector & grad) const
|
||||
@ -270,9 +300,119 @@ diff -Naur netgen-4.5.old/libsrc/meshing/smoothing2.cpp netgen-4.5.new/libsrc/me
|
||||
if (moveisok)
|
||||
{
|
||||
for (j = 0; j < locelements.Size(); j++)
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Inter2d.cxx netgen-4.5.new/libsrc/occ/Partition_Inter2d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Inter2d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Inter2d.cxx 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -29,10 +29,10 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
-#include "Partition_Inter2d.ixx"
|
||||
-
|
||||
#include "utilities.h"
|
||||
|
||||
+#include "Partition_Inter2d.ixx"
|
||||
+
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAlgo_AsDes.hxx>
|
||||
#include <BRepLib_MakeVertex.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Inter3d.cxx netgen-4.5.new/libsrc/occ/Partition_Inter3d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Inter3d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Inter3d.cxx 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -29,13 +29,17 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
+
|
||||
+#include "utilities.h"
|
||||
+
|
||||
#include "Partition_Inter2d.hxx"
|
||||
#include "Partition_Inter3d.ixx"
|
||||
-#include "utilities.h"
|
||||
|
||||
#include <BRepAlgo_AsDes.hxx>
|
||||
#include <BRepAlgo_Image.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
+//using namespace std;
|
||||
+
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Loop.cxx netgen-4.5.new/libsrc/occ/Partition_Loop.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Loop.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Loop.cxx 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -29,12 +29,14 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
-#include <stdio.h>
|
||||
|
||||
-#include "Partition_Loop.ixx"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#include "Partition_Loop.ixx"
|
||||
+
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAlgo_FaceRestrictor.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Loop2d.cxx netgen-4.5.new/libsrc/occ/Partition_Loop2d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Loop2d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Loop2d.cxx 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -12,9 +12,11 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
-#include "Partition_Loop2d.ixx"
|
||||
+
|
||||
|
||||
#include "utilities.h"
|
||||
+
|
||||
+#include "Partition_Loop2d.ixx"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Loop3d.cxx netgen-4.5.new/libsrc/occ/Partition_Loop3d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Loop3d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Loop3d.cxx 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -10,6 +10,11 @@
|
||||
// Module : GEOM
|
||||
|
||||
//using namespace std;
|
||||
+
|
||||
+
|
||||
+
|
||||
+#include "utilities.h"
|
||||
+
|
||||
#include "Partition_Loop3d.ixx"
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Spliter.cxx netgen-4.5.new/libsrc/occ/Partition_Spliter.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Spliter.cxx 2005-07-11 10:33:27.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Spliter.cxx 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -29,14 +29,15 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
+
|
||||
+#include "utilities.h"
|
||||
+
|
||||
#include "Partition_Inter2d.hxx"
|
||||
#include "Partition_Inter3d.hxx"
|
||||
#include "Partition_Loop2d.hxx"
|
||||
#include "Partition_Loop3d.hxx"
|
||||
#include "Partition_Spliter.ixx"
|
||||
|
||||
-#include "utilities.h"
|
||||
-
|
||||
#include <Precision.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TopExp.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/occconstruction.cpp netgen-4.5.new/libsrc/occ/occconstruction.cpp
|
||||
--- netgen-4.5.old/libsrc/occ/occconstruction.cpp 2005-12-06 18:15:53.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occconstruction.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occconstruction.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -28,8 +28,8 @@
|
||||
#include <BRepAlgoAPI_Common.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
@ -286,7 +426,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occconstruction.cpp netgen-4.5.new/libsrc/o
|
||||
namespace netgen
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/occgenmesh.cpp
|
||||
--- netgen-4.5.old/libsrc/occ/occgenmesh.cpp 2006-02-07 13:12:48.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occgenmesh.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occgenmesh.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -28,7 +28,7 @@
|
||||
return Point<3> (p.X(), p.Y(), p.Z());
|
||||
}
|
||||
@ -418,7 +558,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
multithread.task = "Surface meshing";
|
||||
|
||||
geom.facemeshstatus = 0;
|
||||
@@ -751,7 +760,7 @@
|
||||
@@ -751,7 +757,7 @@
|
||||
multithread.task = savetask;
|
||||
}
|
||||
|
||||
@ -427,7 +567,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
{
|
||||
double hret;
|
||||
kappa *= mparam.curvaturesafety;
|
||||
@@ -779,7 +788,7 @@
|
||||
@@ -779,7 +785,7 @@
|
||||
double nq = n*q;
|
||||
|
||||
Point<3> p = p0 + 0.5*n;
|
||||
@ -436,7 +576,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
|
||||
if (lambda >= 0 && lambda <= 1)
|
||||
{
|
||||
@@ -799,55 +808,55 @@
|
||||
@@ -799,55 +805,55 @@
|
||||
|
||||
|
||||
|
||||
@ -512,7 +652,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
|
||||
//(*testout) << "curvature " << curvature << endl;
|
||||
|
||||
@@ -886,51 +895,47 @@
|
||||
@@ -886,51 +892,47 @@
|
||||
pm1.SetX(0.5*(par0.X()+par2.X())); pm1.SetY(0.5*(par0.Y()+par2.Y()));
|
||||
pm2.SetX(0.5*(par1.X()+par0.X())); pm2.SetY(0.5*(par1.Y()+par0.Y()));
|
||||
|
||||
@ -579,7 +719,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
(*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;
|
||||
*/
|
||||
}
|
||||
@@ -970,7 +975,7 @@
|
||||
@@ -970,7 +972,7 @@
|
||||
if (mparam.uselocalh)
|
||||
{
|
||||
|
||||
@ -588,7 +728,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
multithread.percent = 0;
|
||||
|
||||
mesh->SetLocalH (bb.PMin(), bb.PMax(), mparam.grading);
|
||||
@@ -1075,7 +1080,6 @@
|
||||
@@ -1075,7 +1077,6 @@
|
||||
if (triangulation.IsNull()) continue;
|
||||
|
||||
BRepAdaptor_Surface sf(face, Standard_True);
|
||||
@ -596,7 +736,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
|
||||
int ntriangles = triangulation -> NbTriangles();
|
||||
for (int j = 1; j <= ntriangles; j++)
|
||||
@@ -1096,7 +1100,7 @@
|
||||
@@ -1096,7 +1097,7 @@
|
||||
maxside = max (maxside, p[1].Distance(p[2]));
|
||||
//cout << "\rFace " << i << " pos11 ntriangles " << ntriangles << " maxside " << maxside << flush;
|
||||
|
||||
@ -607,7 +747,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgenmesh.cpp netgen-4.5.new/libsrc/occ/oc
|
||||
}
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/occgeom.cpp netgen-4.5.new/libsrc/occ/occgeom.cpp
|
||||
--- netgen-4.5.old/libsrc/occ/occgeom.cpp 2006-01-25 16:35:50.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occgeom.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occgeom.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "ShapeAnalysis_ShapeContents.hxx"
|
||||
#include "ShapeAnalysis_CheckSmallFace.hxx"
|
||||
@ -786,7 +926,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgeom.cpp netgen-4.5.new/libsrc/occ/occge
|
||||
}
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/occgeom.hpp netgen-4.5.new/libsrc/occ/occgeom.hpp
|
||||
--- netgen-4.5.old/libsrc/occ/occgeom.hpp 2006-01-25 16:35:50.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occgeom.hpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occgeom.hpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -15,8 +15,6 @@
|
||||
#include "Geom_Curve.hxx"
|
||||
#include "Geom2d_Curve.hxx"
|
||||
@ -865,7 +1005,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occgeom.hpp netgen-4.5.new/libsrc/occ/occge
|
||||
cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/occmeshsurf.cpp netgen-4.5.new/libsrc/occ/occmeshsurf.cpp
|
||||
--- netgen-4.5.old/libsrc/occ/occmeshsurf.cpp 2006-01-25 16:36:26.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occmeshsurf.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occmeshsurf.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <occgeom.hpp>
|
||||
#include <meshing.hpp>
|
||||
@ -983,7 +1123,7 @@ diff -Naur netgen-4.5.old/libsrc/occ/occmeshsurf.cpp netgen-4.5.new/libsrc/occ/o
|
||||
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/occmeshsurf.hpp netgen-4.5.new/libsrc/occ/occmeshsurf.hpp
|
||||
--- netgen-4.5.old/libsrc/occ/occmeshsurf.hpp 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/occmeshsurf.hpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/occmeshsurf.hpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -151,7 +151,7 @@
|
||||
MeshOptimize2dOCCSurfaces (const OCCGeometry & ageometry);
|
||||
|
||||
@ -1003,9 +1143,20 @@ diff -Naur netgen-4.5.old/libsrc/occ/occmeshsurf.hpp netgen-4.5.new/libsrc/occ/o
|
||||
};
|
||||
|
||||
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/utilities.h netgen-4.5.new/libsrc/occ/utilities.h
|
||||
--- netgen-4.5.old/libsrc/occ/utilities.h 2005-02-11 14:35:43.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/utilities.h 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
+#include <iomanip>
|
||||
#include <cstdlib>
|
||||
// #include "SALOME_Log.hxx"
|
||||
|
||||
diff -Naur netgen-4.5.old/libsrc/stlgeom/meshstlsurface.cpp netgen-4.5.new/libsrc/stlgeom/meshstlsurface.cpp
|
||||
--- netgen-4.5.old/libsrc/stlgeom/meshstlsurface.cpp 2006-01-11 19:08:20.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/stlgeom/meshstlsurface.cpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/stlgeom/meshstlsurface.cpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -946,20 +946,23 @@
|
||||
}
|
||||
|
||||
@ -1056,7 +1207,7 @@ diff -Naur netgen-4.5.old/libsrc/stlgeom/meshstlsurface.cpp netgen-4.5.new/libsr
|
||||
n = geom.GetChartNormalVector();
|
||||
diff -Naur netgen-4.5.old/libsrc/stlgeom/meshstlsurface.hpp netgen-4.5.new/libsrc/stlgeom/meshstlsurface.hpp
|
||||
--- netgen-4.5.old/libsrc/stlgeom/meshstlsurface.hpp 2004-09-30 17:13:56.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/stlgeom/meshstlsurface.hpp 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/stlgeom/meshstlsurface.hpp 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -79,12 +79,10 @@
|
||||
virtual void SelectSurfaceOfPoint (const Point3d & p,
|
||||
const PointGeomInfo & gi);
|
||||
@ -1073,12 +1224,16 @@ diff -Naur netgen-4.5.old/libsrc/stlgeom/meshstlsurface.hpp netgen-4.5.new/libsr
|
||||
|
||||
diff -Naur netgen-4.5.old/makeForSalome.sh netgen-4.5.new/makeForSalome.sh
|
||||
--- netgen-4.5.old/makeForSalome.sh 1970-01-01 03:00:00.000000000 +0300
|
||||
+++ netgen-4.5.new/makeForSalome.sh 2008-02-12 14:57:01.000000000 +0300
|
||||
+++ netgen-4.5.new/makeForSalome.sh 2009-06-11 17:56:43.000000000 +0400
|
||||
@@ -0,0 +1,31 @@
|
||||
+#! /bin/sh
|
||||
+cp ngtcltk/ngnewdelete.* libsrc/interface/
|
||||
+
|
||||
+MACHINE=LINUX
|
||||
+if test `uname -m` == "x86_64" ; then
|
||||
+ MACHINE=LINUX64
|
||||
+else
|
||||
+ MACHINE=LINUX
|
||||
+fi
|
||||
+export MACHINE
|
||||
+make -C libsrc/csg
|
||||
+make -C libsrc/general
|
||||
@ -1102,128 +1257,3 @@ diff -Naur netgen-4.5.old/makeForSalome.sh netgen-4.5.new/makeForSalome.sh
|
||||
+fi
|
||||
+
|
||||
+cp libsrc/interface/nglib.h libsrc/general/*.hpp libsrc/csg/*.hpp libsrc/geom2d/*.hpp \
|
||||
+ libsrc/gprim/*.hpp libsrc/linalg/*.hpp libsrc/meshing/*.hpp \
|
||||
+ libsrc/occ/*.hpp libsrc/opti/*.hpp libsrc/include/mydefs.hpp \
|
||||
+ libsrc/stlgeom/*.hpp libsrc/include/mystdlib.h \
|
||||
+ install/include
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Inter2d.cxx netgen-4.5.new/libsrc/occ/Partition_Inter2d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Inter2d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Inter2d.cxx 2008-02-26 12:34:14.000000000 +0300
|
||||
@@ -29,10 +29,10 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
-#include "Partition_Inter2d.ixx"
|
||||
-
|
||||
#include "utilities.h"
|
||||
|
||||
+#include "Partition_Inter2d.ixx"
|
||||
+
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <BRepAlgo_AsDes.hxx>
|
||||
#include <BRepLib_MakeVertex.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Inter3d.cxx netgen-4.5.new/libsrc/occ/Partition_Inter3d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Inter3d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Inter3d.cxx 2008-02-26 12:36:27.000000000 +0300
|
||||
@@ -29,13 +29,17 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
+
|
||||
+#include "utilities.h"
|
||||
+
|
||||
#include "Partition_Inter2d.hxx"
|
||||
#include "Partition_Inter3d.ixx"
|
||||
-#include "utilities.h"
|
||||
|
||||
#include <BRepAlgo_AsDes.hxx>
|
||||
#include <BRepAlgo_Image.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
+//using namespace std;
|
||||
+
|
||||
#include <BRepOffset_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Loop2d.cxx netgen-4.5.new/libsrc/occ/Partition_Loop2d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Loop2d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Loop2d.cxx 2008-02-26 12:37:10.000000000 +0300
|
||||
@@ -12,9 +12,11 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
-#include "Partition_Loop2d.ixx"
|
||||
+
|
||||
|
||||
#include "utilities.h"
|
||||
+
|
||||
+#include "Partition_Loop2d.ixx"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Loop3d.cxx netgen-4.5.new/libsrc/occ/Partition_Loop3d.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Loop3d.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Loop3d.cxx 2008-02-26 12:39:32.000000000 +0300
|
||||
@@ -10,6 +10,11 @@
|
||||
// Module : GEOM
|
||||
|
||||
//using namespace std;
|
||||
+
|
||||
+
|
||||
+
|
||||
+#include "utilities.h"
|
||||
+
|
||||
#include "Partition_Loop3d.ixx"
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Loop.cxx netgen-4.5.new/libsrc/occ/Partition_Loop.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Loop.cxx 2005-06-09 18:51:10.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Loop.cxx 2008-02-26 12:40:41.000000000 +0300
|
||||
@@ -29,12 +29,14 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
-#include <stdio.h>
|
||||
|
||||
-#include "Partition_Loop.ixx"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#include "Partition_Loop.ixx"
|
||||
+
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepAlgo_FaceRestrictor.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/Partition_Spliter.cxx netgen-4.5.new/libsrc/occ/Partition_Spliter.cxx
|
||||
--- netgen-4.5.old/libsrc/occ/Partition_Spliter.cxx 2005-07-11 10:33:27.000000000 +0400
|
||||
+++ netgen-4.5.new/libsrc/occ/Partition_Spliter.cxx 2008-02-26 12:41:32.000000000 +0300
|
||||
@@ -29,14 +29,15 @@
|
||||
// $Header$
|
||||
|
||||
//using namespace std;
|
||||
+
|
||||
+#include "utilities.h"
|
||||
+
|
||||
#include "Partition_Inter2d.hxx"
|
||||
#include "Partition_Inter3d.hxx"
|
||||
#include "Partition_Loop2d.hxx"
|
||||
#include "Partition_Loop3d.hxx"
|
||||
#include "Partition_Spliter.ixx"
|
||||
|
||||
-#include "utilities.h"
|
||||
-
|
||||
#include <Precision.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TopExp.hxx>
|
||||
diff -Naur netgen-4.5.old/libsrc/occ/utilities.h netgen-4.5.new/libsrc/occ/utilities.h
|
||||
--- netgen-4.5.old/libsrc/occ/utilities.h 2005-02-11 14:35:43.000000000 +0300
|
||||
+++ netgen-4.5.new/libsrc/occ/utilities.h 2008-02-26 12:28:02.000000000 +0300
|
||||
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
+#include <iomanip>
|
||||
#include <cstdlib>
|
||||
// #include "SALOME_Log.hxx"
|
||||
|
||||
|
@ -88,5 +88,6 @@ libNETGENEngine_la_CPPFLAGS = \
|
||||
libNETGENEngine_la_LDFLAGS = \
|
||||
../NETGEN/libNETGEN.la \
|
||||
../../idl/libSalomeIDLNETGENPLUGIN.la \
|
||||
$(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lStdMeshersEngine \
|
||||
$(KERNEL_LDFLAGS) -lSalomeGenericObj
|
||||
$(CAS_LDPATH) -lTKernel -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKMesh -lTKSTL -lTKG3d -lTKTopAlgo -lTKG2d -lTKBool -lTKGeomAlgo -lTKOffset -lTKGeomBase -lTKBO \
|
||||
$(SMESH_LDFLAGS) -lSMESHimpl -lSMESHEngine -lStdMeshersEngine -lStdMeshers -lSMESHDS -lSMDS -lSMESHControls \
|
||||
$(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace -lOpUtil
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define _NETGENPlugin_DEFS_HXX_
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef NETGENPLUGIN_EXPORTS
|
||||
#if defined NETGENPLUGIN_EXPORTS || defined NETGENEngine_EXPORTS
|
||||
#define NETGENPLUGIN_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define NETGENPLUGIN_EXPORT __declspec( dllimport )
|
||||
|
@ -25,7 +25,7 @@
|
||||
// Date : 28/03/2006
|
||||
// Project : SALOME
|
||||
//
|
||||
#include <NETGENPlugin_Hypothesis.hxx>
|
||||
#include "NETGENPlugin_Hypothesis.hxx"
|
||||
#include <utilities.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -27,7 +27,7 @@
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include <NETGENPlugin_Hypothesis_2D.hxx>
|
||||
#include "NETGENPlugin_Hypothesis_2D.hxx"
|
||||
#include <utilities.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -24,7 +24,6 @@
|
||||
// Author : Michael Sazonov (OCN)
|
||||
// Date : 31/03/2006
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_Mesher.hxx"
|
||||
@ -273,15 +272,15 @@ void NETGENPlugin_Mesher::PrepareOCCgeometry(netgen::OCCGeometry& occgeo,
|
||||
* \brief return id of netgen point corresponding to SMDS node
|
||||
*/
|
||||
//================================================================================
|
||||
typedef map< const SMDS_MeshNode*, int > TNode2IdMap;
|
||||
|
||||
static int ngNodeId( const SMDS_MeshNode* node,
|
||||
netgen::Mesh& ngMesh,
|
||||
map< const SMDS_MeshNode*, int >& nodeNgIdMap)
|
||||
static int ngNodeId( const SMDS_MeshNode* node,
|
||||
netgen::Mesh& ngMesh,
|
||||
TNode2IdMap& nodeNgIdMap)
|
||||
{
|
||||
int newNgId = ngMesh.GetNP() + 1;
|
||||
|
||||
pair< map< const SMDS_MeshNode*, int >::iterator, bool > it_isNew =
|
||||
nodeNgIdMap.insert( make_pair( node, newNgId ));
|
||||
pair< TNode2IdMap::iterator, bool > it_isNew = nodeNgIdMap.insert( make_pair( node, newNgId ));
|
||||
|
||||
if ( it_isNew.second ) {
|
||||
netgen::MeshPoint p( netgen::Point<3> (node->X(), node->Y(), node->Z()) );
|
||||
@ -301,7 +300,7 @@ bool NETGENPlugin_Mesher::fillNgMesh(netgen::OCCGeometry& occgeom,
|
||||
vector<SMDS_MeshNode*>& nodeVec,
|
||||
const list< SMESH_subMesh* > & meshedSM)
|
||||
{
|
||||
map< const SMDS_MeshNode*, int > nodeNgIdMap;
|
||||
TNode2IdMap nodeNgIdMap;
|
||||
|
||||
TopTools_MapOfShape visitedShapes;
|
||||
|
||||
@ -416,7 +415,7 @@ bool NETGENPlugin_Mesher::fillNgMesh(netgen::OCCGeometry& occgeom,
|
||||
const TopoDS_Face& geomFace = TopoDS::Face( sm->GetSubShape() );
|
||||
helper.SetSubShape( geomFace );
|
||||
|
||||
// find solids geomFace bounds
|
||||
// Find solids the geomFace bounds
|
||||
int solidID1 = 0, solidID2 = 0;
|
||||
const TopTools_ListOfShape& ancestors = _mesh->GetAncestors( geomFace );
|
||||
TopTools_ListIteratorOfListOfShape ancestorIt ( ancestors );
|
||||
@ -433,7 +432,19 @@ bool NETGENPlugin_Mesher::fillNgMesh(netgen::OCCGeometry& occgeom,
|
||||
_faceDescriptors[ faceID ].first = solidID1;
|
||||
_faceDescriptors[ faceID ].second = solidID2;
|
||||
|
||||
// add surface elements
|
||||
// Orient the face correctly in solidID1 (issue 0020206)
|
||||
bool reverse = false;
|
||||
if ( solidID1 ) {
|
||||
TopoDS_Shape solid = occgeom.somap( solidID1 );
|
||||
for ( TopExp_Explorer f( solid, TopAbs_FACE ); f.More(); f.Next() ) {
|
||||
if ( geomFace.IsSame( f.Current() )) {
|
||||
reverse = SMESH_Algo::IsReversedSubMesh( TopoDS::Face( f.Current()), helper.GetMeshDS() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add surface elements
|
||||
SMDS_ElemIteratorPtr faces = smDS->GetElements();
|
||||
while ( faces->more() ) {
|
||||
|
||||
@ -456,15 +467,21 @@ bool NETGENPlugin_Mesher::fillNgMesh(netgen::OCCGeometry& occgeom,
|
||||
for ( int i = 0; i < 3; ++i ) {
|
||||
const SMDS_MeshNode* node = f->GetNode( i ), * inFaceNode=0;
|
||||
if ( helper.IsSeamShape( node->GetPosition()->GetShapeId() ))
|
||||
if ( helper.IsSeamShape( f->GetNode( i+1 )->GetPosition()->GetShapeId() ))
|
||||
inFaceNode = f->GetNode( i-1 );
|
||||
if ( helper.IsSeamShape( f->GetNodeWrap( i+1 )->GetPosition()->GetShapeId() ))
|
||||
inFaceNode = f->GetNodeWrap( i-1 );
|
||||
else
|
||||
inFaceNode = f->GetNode( i+1 );
|
||||
|
||||
inFaceNode = f->GetNodeWrap( i+1 );
|
||||
|
||||
gp_XY uv = helper.GetNodeUV( geomFace, node, inFaceNode );
|
||||
tri.GeomInfoPi(i+1).u = uv.X();
|
||||
tri.GeomInfoPi(i+1).v = uv.Y();
|
||||
tri.PNum(i+1) = ngNodeId( node, ngMesh, nodeNgIdMap );
|
||||
if ( reverse ) {
|
||||
tri.GeomInfoPi(3-i).u = uv.X();
|
||||
tri.GeomInfoPi(3-i).v = uv.Y();
|
||||
tri.PNum (3-i) = ngNodeId( node, ngMesh, nodeNgIdMap );
|
||||
} else {
|
||||
tri.GeomInfoPi(i+1).u = uv.X();
|
||||
tri.GeomInfoPi(i+1).v = uv.Y();
|
||||
tri.PNum (i+1) = ngNodeId( node, ngMesh, nodeNgIdMap );
|
||||
}
|
||||
}
|
||||
|
||||
ngMesh.AddSurfaceElement (tri);
|
||||
@ -486,7 +503,7 @@ bool NETGENPlugin_Mesher::fillNgMesh(netgen::OCCGeometry& occgeom,
|
||||
|
||||
// fill nodeVec
|
||||
nodeVec.resize( ngMesh.GetNP() + 1 );
|
||||
map< const SMDS_MeshNode*, int >::iterator node_NgId, nodeNgIdEnd = nodeNgIdMap.end();
|
||||
TNode2IdMap::iterator node_NgId, nodeNgIdEnd = nodeNgIdMap.end();
|
||||
for ( node_NgId = nodeNgIdMap.begin(); node_NgId != nodeNgIdEnd; ++node_NgId)
|
||||
nodeVec[ node_NgId->second ] = (SMDS_MeshNode*) node_NgId->first;
|
||||
|
||||
@ -549,7 +566,7 @@ bool NETGENPlugin_Mesher::Compute()
|
||||
// nb of segments
|
||||
mparams.segmentsperedge = nbSeg + 0.1;
|
||||
mparams.maxh = occgeo.boundingbox.Diam();
|
||||
mparams.grading = 0;
|
||||
mparams.grading = 0.01;
|
||||
}
|
||||
else {
|
||||
// segment length
|
||||
|
@ -25,7 +25,6 @@
|
||||
// Created : lundi 27 Janvier 2003
|
||||
// Author : Nadir BOUHAMOU (CEA)
|
||||
// Project : SALOME
|
||||
// $Header$
|
||||
//=============================================================================
|
||||
//
|
||||
#include "NETGENPlugin_NETGEN_3D.hxx"
|
||||
@ -40,6 +39,7 @@
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Mesh.hxx"
|
||||
#include "SMESH_MesherHelper.hxx"
|
||||
#include "SMESH_MeshEditor.hxx"
|
||||
#include "StdMeshers_QuadToTriaAdaptor.hxx"
|
||||
|
||||
#include <BRep_Tool.hxx>
|
||||
@ -64,6 +64,7 @@ namespace nglib {
|
||||
#include <nglib.h>
|
||||
}
|
||||
using namespace nglib;
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
@ -173,7 +174,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
SMESH_MesherHelper* myTool = &helper;
|
||||
bool _quadraticMesh = myTool->IsQuadraticSubMesh(aShape);
|
||||
|
||||
typedef map< const SMDS_MeshNode*, int> TNodeToIDMap;
|
||||
typedef map< const SMDS_MeshNode*, int, TIDCompare > TNodeToIDMap;
|
||||
TNodeToIDMap nodeToNetgenID;
|
||||
list< const SMDS_MeshElement* > triangles;
|
||||
list< bool > isReversed; // orientation of triangles
|
||||
@ -214,13 +215,13 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
//return error( COMPERR_BAD_INPUT_MESH,
|
||||
// SMESH_Comment("Not triangle element ")<<elem->GetID());
|
||||
// using adaptor
|
||||
std::list<const SMDS_FaceOfNodes*> faces = Adaptor.GetTriangles(elem);
|
||||
if(faces.size()==0) {
|
||||
const list<const SMDS_FaceOfNodes*>* faces = Adaptor.GetTriangles(elem);
|
||||
if(faces==0) {
|
||||
return error( COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Not triangles in adaptor for element ")<<elem->GetID());
|
||||
}
|
||||
std::list<const SMDS_FaceOfNodes*>::iterator itf = faces.begin();
|
||||
for(; itf!=faces.end(); itf++ ) {
|
||||
list<const SMDS_FaceOfNodes*>::const_iterator itf = faces->begin();
|
||||
for(; itf!=faces->end(); itf++ ) {
|
||||
triangles.push_back( (*itf) );
|
||||
isReversed.push_back( isRev );
|
||||
// put triange's nodes to nodeToNetgenID map
|
||||
@ -440,7 +441,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
MESSAGE("NETGENPlugin_NETGEN_3D::Compute with maxElmentsize = " << _maxElementVolume);
|
||||
const int invalid_ID = -1;
|
||||
bool _quadraticMesh = false;
|
||||
typedef map< const SMDS_MeshNode*, int> TNodeToIDMap;
|
||||
typedef map< const SMDS_MeshNode*, int, TIDCompare > TNodeToIDMap;
|
||||
TNodeToIDMap nodeToNetgenID;
|
||||
list< const SMDS_MeshElement* > triangles;
|
||||
SMESHDS_Mesh* MeshDS = aHelper->GetMeshDS();
|
||||
@ -456,10 +457,14 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
StdMeshers_QuadToTriaAdaptor Adaptor;
|
||||
Adaptor.Compute(aMesh);
|
||||
|
||||
SMDS_FaceIteratorPtr iteratorFace = MeshDS->facesIterator();
|
||||
while(iteratorFace->more()) {
|
||||
SMDS_FaceIteratorPtr fIt = MeshDS->facesIterator();
|
||||
TIDSortedElemSet sortedFaces; // 0020279: control the "random" use when using mesh algorithms
|
||||
while( fIt->more()) sortedFaces.insert( fIt->next() );
|
||||
|
||||
TIDSortedElemSet::iterator itFace = sortedFaces.begin(), fEnd = sortedFaces.end();
|
||||
for ( ; itFace != fEnd; ++itFace ) {
|
||||
// check element
|
||||
const SMDS_MeshElement* elem = iteratorFace->next();
|
||||
const SMDS_MeshElement* elem = *itFace;
|
||||
if ( !elem )
|
||||
return error( COMPERR_BAD_INPUT_MESH, "Null element encounters");
|
||||
bool isTraingle = ( elem->NbNodes()==3 || (_quadraticMesh && elem->NbNodes()==6 ));
|
||||
@ -467,13 +472,13 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
|
||||
//return error( COMPERR_BAD_INPUT_MESH,
|
||||
// SMESH_Comment("Not triangle element ")<<elem->GetID());
|
||||
// using adaptor
|
||||
std::list<const SMDS_FaceOfNodes*> faces = Adaptor.GetTriangles(elem);
|
||||
if(faces.size()==0) {
|
||||
const list<const SMDS_FaceOfNodes*>* faces = Adaptor.GetTriangles(elem);
|
||||
if(faces==0) {
|
||||
return error( COMPERR_BAD_INPUT_MESH,
|
||||
SMESH_Comment("Not triangles in adaptor for element ")<<elem->GetID());
|
||||
}
|
||||
std::list<const SMDS_FaceOfNodes*>::iterator itf = faces.begin();
|
||||
for(; itf!=faces.end(); itf++ ) {
|
||||
list<const SMDS_FaceOfNodes*>::const_iterator itf = faces->begin();
|
||||
for(; itf!=faces->end(); itf++ ) {
|
||||
triangles.push_back( (*itf) );
|
||||
// put triange's nodes to nodeToNetgenID map
|
||||
SMDS_ElemIteratorPtr triangleNodesIt = (*itf)->nodesIterator();
|
||||
|
Loading…
Reference in New Issue
Block a user