From: eap Date: Mon, 29 Nov 2021 11:20:44 +0000 (+0300) Subject: bos #18711: NETGEN 6 Integration in SALOME X-Git-Tag: V9_9_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3bdb54961f6aa020c4d96a552edbd6510985910b;p=plugins%2Fnetgenplugin.git bos #18711: NETGEN 6 Integration in SALOME mparams.nthreads = std::thread::hardware_concurrency(); --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index b58cfe5..10c24b5 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -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( &occgeo, &NOOP_Deleter )); netgen::mparam.perfstepsstart = startWith;