]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
bos #18711: NETGEN 6 Integration in SALOME
authoreap <eap@opencascade.com>
Mon, 29 Nov 2021 11:20:44 +0000 (14:20 +0300)
committereap <eap@opencascade.com>
Mon, 29 Nov 2021 11:20:44 +0000 (14:20 +0300)
  mparams.nthreads = std::thread::hardware_concurrency();

src/NETGENPlugin/NETGENPlugin_Mesher.cxx

index b58cfe57e725c917cb5e755b071d18c90280a7db..10c24b523c179c53d2e09e5a20d41ec360e3496a 100644 (file)
@@ -599,6 +599,12 @@ void NETGENPlugin_Mesher::SetDefaultParameters()
   _fineness               = NETGENPlugin_Hypothesis::GetDefaultFineness();
   mparams.uselocalh       = NETGENPlugin_Hypothesis::GetDefaultSurfaceCurvature();
   netgen::merge_solids    = NETGENPlugin_Hypothesis::GetDefaultFuseEdges();
+
+#ifdef NETGEN_V6
+
+  mparams.nthreads = std::thread::hardware_concurrency();
+
+#endif
 }
 
 //=============================================================================
@@ -4492,10 +4498,11 @@ int NETGENPlugin_NetgenLibWrapper::GenerateMesh( netgen::OCCGeometry& occgeo,
                                                  netgen::Mesh* & ngMesh )
 {
   int err = 0;
-#ifdef NETGEN_V6
-
   if ( !ngMesh )
     ngMesh = new netgen::Mesh;
+
+#ifdef NETGEN_V6
+
   ngMesh->SetGeometry( shared_ptr<netgen::NetgenGeometry>( &occgeo, &NOOP_Deleter ));
 
   netgen::mparam.perfstepsstart = startWith;