From 4349d5586ee7ac96d1a42d23b5d2abd15024d2cd Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 5 Mar 2012 14:07:13 +0000 Subject: [PATCH] http://www.salome-platform.org/forum/forum_10/416888157: NetGen local mesh size in Salome 6.4.0 Move setting local size on faces after evaluation of global maxh --- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 29 +++++++++--------------- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index b4b7ce3..49f78e7 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -1793,24 +1793,6 @@ bool NETGENPlugin_Mesher::Compute() NETGENPlugin_Internals internals( *_mesh, _shape, _isVolume ); PrepareOCCgeometry( occgeo, _shape, *_mesh, meshedSM, &internals ); - // ------------------------- - // Local size on faces - // ------------------------- - -#ifdef NETGEN_NEW - if ( ! _simpleHyp ) - { - for(std::map::const_iterator it=FaceId2LocalSize.begin(); it!=FaceId2LocalSize.end(); it++) - { - int key = (*it).first; - double val = (*it).second; - const TopoDS_Shape& shape = ShapesWithLocalSize.FindKey(key); - int faceNgID = occgeo.fmap.FindIndex(shape); - occgeo.SetFaceMaxH(faceNgID, val); - } - } -#endif - // ------------------------- // Generate the mesh // ------------------------- @@ -1846,8 +1828,19 @@ bool NETGENPlugin_Mesher::Compute() mparams.maxh = occgeo.boundingbox.Diam(); if ( _simpleHyp || ( mparams.minh == 0.0 && _fineness != NETGENPlugin_Hypothesis::UserDefined)) mparams.minh = GetDefaultMinSize( _shape, mparams.maxh ); + #ifdef NETGEN_NEW + // Local size on faces occgeo.face_maxh = mparams.maxh; + for(map::const_iterator it=FaceId2LocalSize.begin(); + it!=FaceId2LocalSize.end(); it++) + { + int key = (*it).first; + double val = (*it).second; + const TopoDS_Shape& shape = ShapesWithLocalSize.FindKey(key); + int faceNgID = occgeo.fmap.FindIndex(shape); + occgeo.SetFaceMaxH(faceNgID, val); + } #endif // Let netgen create ngMesh and calculate element size on not meshed shapes -- 2.39.2