From: asozinov Date: Wed, 2 Nov 2022 10:55:25 +0000 (+0300) Subject: Configure for use netgen6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f131fc760f1f99ec8c8e502ed35f677f39da674f;p=tools%2Fsat_salome.git Configure for use netgen6 Not for merge to master --- diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index e37a4f9..e4189eb 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -79,9 +79,9 @@ APPLICATION : MeshGems : '2.14-4' metis : 'native' mpi4py: 'native' - netgen : '5.3.1_with_CAS_7.2' + #netgen : '5.3.1_with_CAS_7.2' # comment out line above and uncomment the line below to use Netgen 6. - #netgen : '6.2.2101' + netgen : '6.2.2204' netcdf : 'native' nlopt : '2.4.2' nose: 'native' diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 30d12e3..b524319 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -79,9 +79,10 @@ APPLICATION : MeshGems : '2.14-4' metis : '5.1.0' msvc : '2017' - netgen : '5.3.1_with_CAS_7.2' + #netgen : '5.3.1_with_CAS_7.2' # comment out line above and uncomment the line below to use Netgen 6. #netgen : '6.2.2101' + netgen : '6.2.2204' nlopt : '2.5.0' numpy : '1.16.4' omniORB : '4.2.3' @@ -144,7 +145,7 @@ APPLICATION : 'GUI' 'GEOM' 'SMESH' : 'V9_10_0a2' - 'NETGENPLUGIN' : 'V9_10_0a2' + 'NETGENPLUGIN' : 'asozinov/32536_win' 'BLSURFPLUGIN' 'GHS3DPLUGIN' 'HYBRIDPLUGIN' diff --git a/products/netgen.pyconf b/products/netgen.pyconf index 05e01d1..6b0c09e 100644 --- a/products/netgen.pyconf +++ b/products/netgen.pyconf @@ -24,6 +24,20 @@ default_win: depend : ['CAS','zlib','tcltk'] } +version_6_2_2204 : +{ + build_source : "cmake" + #cmake_options : " -DUSE_GUI=OFF -DUSE_PYTHON=OFF -DUSE_MPI=OFF -DUSE_OCC=ON -DUSE_INTERNAL_TCL=OFF -DBUILD_STUB_FILES=OFF -DOCC_INCLUDE_DIR=$CAS_ROOT_DIR/inc -DOCC_LIBRARY_DIR=$CAS_ROOT_DIR/win/vc14/lib -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_CXX_STANDARD=17 -DUSE_NATIVE_ARCH=OFF " + cmake_options : " -DUSE_GUI=OFF -DUSE_PYTHON=OFF -DUSE_MPI=OFF -DUSE_OCC=ON -DUSE_INTERNAL_TCL=OFF -DBUILD_STUB_FILES=OFF -DOCC_INCLUDE_DIR=$CAS_ROOT_DIR/include/opencascade -DOCC_LIBRARY_DIR=$CAS_ROOT_DIR/lib -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_CXX_STANDARD=17 -DUSE_NATIVE_ARCH=OFF " + #cmake_options : " -DUSE_GUI=OFF -DUSE_PYTHON=OFF -DUSE_MPI=OFF -DUSE_OCC=ON -DUSE_INTERNAL_TCL=OFF -DBUILD_STUB_FILES=OFF -DOCC_INCLUDE_DIR=D:/S/SALOME-9.9.0/W64/CAS76/include/opencascade -DOCC_LIBRARY_DIR=D:/S/SALOME-9.9.0/W64/CAS76/lib -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_CXX_STANDARD=17 -DUSE_NATIVE_ARCH=OFF " + patches : [] + properties : + { + incremental : "yes" + single_install_dir : "yes" + } +} + version_6_2_2101 : { build_source : "cmake" diff --git a/products/patches/netgen-6.2.2204-for-SALOME.patch b/products/patches/netgen-6.2.2204-for-SALOME.patch new file mode 100644 index 0000000..b69cb6d --- /dev/null +++ b/products/patches/netgen-6.2.2204-for-SALOME.patch @@ -0,0 +1,129 @@ + external_dependencies/pybind11 | 1 - + libsrc/core/version.hpp | 7 ++++++- + libsrc/meshing/meshclass.cpp | 5 +++-- + libsrc/occ/occgenmesh.cpp | 15 +++++++++------ + libsrc/stlgeom/stlgeom.hpp | 2 +- + libsrc/stlgeom/stltopology.hpp | 2 +- + nglib/nglib.cpp | 2 +- + 7 files changed, 21 insertions(+), 13 deletions(-) + +diff --git a/external_dependencies/pybind11 b/external_dependencies/pybind11 +deleted file mode 160000 +index ffa34686..00000000 +--- a/external_dependencies/pybind11 ++++ /dev/null +@@ -1 +0,0 @@ +-Subproject commit ffa346860b306c9bbfb341aed9c14c067751feb8 +diff --git a/libsrc/core/version.hpp b/libsrc/core/version.hpp +index 3048ce5b..81524b58 100644 +--- a/libsrc/core/version.hpp ++++ b/libsrc/core/version.hpp +@@ -41,7 +41,12 @@ namespace ngcore + if(!vstring.empty()) + { + dot = vstring.find('-'); +- patch = std::stoi(vstring.substr(0,dot)); ++ try { ++ patch = std::stoi(vstring.substr(0,dot)); ++ } ++ catch (const std::exception& e) { ++ patch = 0; ++ } + if(dot == size_t(-1)) vstring = ""; + else vstring = vstring.substr(dot+1, vstring.size()-dot-1); + if(!vstring.empty()) +diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp +index c89064cb..5c16d67b 100644 +--- a/libsrc/meshing/meshclass.cpp ++++ b/libsrc/meshing/meshclass.cpp +@@ -281,8 +281,9 @@ namespace netgen + for(int i = 0; i < userdata_double.Size(); i++) + delete userdata_double[i]; + +- for (int i = 0; i < bcnames.Size(); i++ ) +- delete bcnames[i]; ++ // TODO!!!!! EXCEPTION!!!!!!!!! ++ // for (int i = 0; i < bcnames.Size(); i++ ) ++ // delete bcnames[i]; + + for (int i = 0; i < cd2names.Size(); i++) + delete cd2names[i]; +diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp +index e0164177..e70a246f 100644 +--- a/libsrc/occ/occgenmesh.cpp ++++ b/libsrc/occ/occgenmesh.cpp +@@ -653,13 +653,13 @@ namespace netgen + + for (int k = 1; k <=3; k++) + { +- // int n = triangulation->Triangles()(j)(k); +- // p[k-1] = triangulation->Nodes()(n).Transformed(loc); +- // par[k-1] = triangulation->UVNodes()(n); ++ int n = triangulation->Triangles()(j)(k); ++ p[k-1] = triangulation->Nodes()(n).Transformed(loc); ++ par[k-1] = triangulation->UVNodes()(n); + // fix for OCC7.6.0-dev +- int n = triangulation->Triangle(j)(k); +- p[k-1] = triangulation->Node(n).Transformed(loc); +- par[k-1] = triangulation->UVNode(n); ++ //int n = triangulation->Triangle(j)(k); ++ //p[k-1] = triangulation->Node(n).Transformed(loc); ++ //par[k-1] = triangulation->UVNode(n); + } + + //double maxside = 0; +@@ -796,12 +796,15 @@ namespace netgen + } + } + ++ MyFile << "1.8\n"; + for (auto mspnt : mparam.meshsize_points) + mesh.RestrictLocalH(mspnt.pnt, mspnt.h, mspnt.layer); + ++ MyFile << "1.9\n"; + multithread.task = savetask; + + } ++ MyFile << "2"; + + mesh.LoadLocalMeshSize (mparam.meshsizefilename); + } +diff --git a/libsrc/stlgeom/stlgeom.hpp b/libsrc/stlgeom/stlgeom.hpp +index 8cc5739e..46bad1dc 100644 +--- a/libsrc/stlgeom/stlgeom.hpp ++++ b/libsrc/stlgeom/stlgeom.hpp +@@ -68,7 +68,7 @@ namespace netgen + void Restore (); + + void SetSize(int /* size */) { }; +- void Clear() { }; ++ DLL_HEADER void Clear() { }; + int Size() const { return geom.GetNTE(); } + const STLTopEdge & Get(int i) const { return geom.GetTopEdge(i); } + STLTopEdge & Elem(int i) { return geom.GetTopEdge(i); } +diff --git a/libsrc/stlgeom/stltopology.hpp b/libsrc/stlgeom/stltopology.hpp +index 34c3c801..c5c868c4 100644 +--- a/libsrc/stlgeom/stltopology.hpp ++++ b/libsrc/stlgeom/stltopology.hpp +@@ -350,7 +350,7 @@ public: + int GetNP() const { return points.Size(); } + int AddPoint(const Point<3> & p) { points.Append(p); return points.Size(); } + const Point<3> & GetPoint(STLPointId nr) const { return points[nr]; } // .Get(nr); } +- int GetPointNum (const Point<3> & p); ++ DLL_HEADER int GetPointNum (const Point<3> & p); + void SetPoint(STLPointId nr, const Point<3> & p) { points[nr] = p; } // { points.Elem(nr) = p; } + auto & GetPoints() const { return points; } + +diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp +index c72e067b..2d548ca6 100644 +--- a/nglib/nglib.cpp ++++ b/nglib/nglib.cpp +@@ -542,7 +542,7 @@ namespace nglib + + + NgArray readtrias; //only before initstlgeometry +- NgArray > readedges; //only before init stlgeometry ++ DLL_HEADER NgArray > readedges; //only before init stlgeometry + + // loads geometry from STL file + NGLIB_API Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary) diff --git a/products/sphinxintl.pyconf b/products/sphinxintl.pyconf index db66f48..6686557 100644 --- a/products/sphinxintl.pyconf +++ b/products/sphinxintl.pyconf @@ -39,7 +39,7 @@ version_2_0_0_win_dbg : name : "sphinx_intl" build_source : "script" compil_script : 'sphinxintl.bat' - archive_info : {archive_name : "sphinxintl-2.0.0.tar.gz"} + archive_info : {archive_name : "sphinxintl-2.0.0-SRC_windows.tar.gz"} get_source : "archive" environ : { diff --git a/salome.pyconf b/salome.pyconf index 13077c2..dbd68e1 100644 --- a/salome.pyconf +++ b/salome.pyconf @@ -4,21 +4,21 @@ project_path : $PWD # Where to search the archives of the products -ARCHIVEPATH : "/home/salome-public/prerequis/archives:/nfs/home/salome-public/prerequis/archives:/mnt/prerequis/archives" +ARCHIVEPATH : "\\\\titania\\home_projet\\salome-public\\prerequis\\archives" ARCHIVEFTP : "ftp.cea.fr/pub/salome/prerequisites" # Where to search the pyconf of the applications -APPLICATIONPATH : $project_path + "/applications/" +APPLICATIONPATH : $project_path + "\\applications\\" # Where to search the pyconf of the products -PRODUCTPATH : $project_path + "/products/" +PRODUCTPATH : $project_path + "\\products" # Where to search the pyconf of the jobs of the project -JOBPATH : $project_path + "/jobs/" +JOBPATH : $project_path + r"\\jobs\\" # Where to search for licences -LICENCEPATH : "\\\\terre\\data\\tmpsalome\\salome\\prerequis\\install\\LICENSE:/home/salome-public/prerequis/LICENCE:/nfs/home/salome-public/prerequis/LICENCE:/export/home/salome/prerequis/install/LICENCE:/volatile/salome/prerequis/install/LICENCE:/soft/commun/SALOME/LICENSE:/mnt/prerequis/LICENCE" +LICENCEPATH : "\\\titania\\home_projet\\salome-public\\prerequis\\LICENCE:\\\\terre\\data\\tmpsalome\\salome\\prerequis\\install\\LICENSE:/data/tmpsalome/salome/prerequis/install/LICENCE:/export/home/salome/prerequis/install/LICENCE:/volatile/salome/prerequis/install/LICENCE:/soft/commun/SALOME/LICENSE" git_info : { - default_git_server : "https://git.salome-platform.org/gitpub/" - default_git_server_dev : "https://codev-tuleap.cea.fr/plugins/git/salome/" + default_git_server : "https://git.salome-platform.org/gitpub/" + default_git_server_dev : "https://codev-tuleap.cea.fr/plugins/git/salome/" } test_bases :