From 81d6498051e7ab161c0c364e0bf3967e0ca9f557 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 8 Jul 2011 12:42:09 +0000 Subject: [PATCH] 0021271: [CEA 473] Implement min size in netgen plugin set maxh if no hyps defined --- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index f382364..8f486e3 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -138,8 +138,8 @@ void NETGENPlugin_Mesher::defaultParameters() { netgen::MeshingParameters& mparams = netgen::mparam; // maximal mesh edge size - mparams.maxh = NETGENPlugin_Hypothesis::GetDefaultMaxSize(); - mparams.maxh = 0; + mparams.maxh = 0;//NETGENPlugin_Hypothesis::GetDefaultMaxSize(); + mparams.minh = 0; // minimal number of segments per edge mparams.segmentsperedge = NETGENPlugin_Hypothesis::GetDefaultNbSegPerEdge(); // rate of growth of size between elements @@ -520,8 +520,6 @@ void NETGENPlugin_Mesher::PrepareOCCgeometry(netgen::OCCGeometry& occgeo, occgeo.facemeshstatus.SetSize (occgeo.fmap.Extent()); occgeo.facemeshstatus = 0; #ifdef NETGEN_NEW - occgeo.face_maxh.SetSize(occgeo.fmap.Extent()); - occgeo.face_maxh = netgen::mparam.maxh; occgeo.face_maxh_modified.SetSize(occgeo.fmap.Extent()); occgeo.face_maxh_modified = 0; #endif @@ -1806,8 +1804,14 @@ bool NETGENPlugin_Mesher::Compute() mparams.maxh = _simpleHyp->GetLocalLength(); } + if ( mparams.maxh == 0.0 ) + mparams.maxh = occgeo.boundingbox.Diam(); if ( _simpleHyp || mparams.minh == 0.0 ) mparams.minh = GetDefaultMinSize( _shape, mparams.maxh ); +#ifdef NETGEN_NEW + occgeo.face_maxh.SetSize(occgeo.fmap.Extent()); + occgeo.face_maxh = mparams.maxh; +#endif // Let netgen create ngMesh and calculate element size on not meshed shapes char *optstr = 0; -- 2.39.2