From: eap Date: Fri, 22 Aug 2014 11:38:59 +0000 (+0400) Subject: 22483: EDF 2772 SMESH: Define several 3D viscous layer hypotheses on the same Geometry X-Git-Tag: V7_5_0a1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0a380c97575b8d661edbaa2b28a9e0133177bdf4;p=plugins%2Fnetgenplugin.git 22483: EDF 2772 SMESH: Define several 3D viscous layer hypotheses on the same Geometry --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx index e14961a..b46a47b 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx @@ -112,6 +112,9 @@ bool NETGENPlugin_NETGEN_2D::CheckHypothesis (SMESH_Mesh& aMesh, _hypothesis = theHyp; } + if ( aStatus == HYP_OK && _isViscousLayers2D ) + error( StdMeshers_ViscousLayers2D::CheckHypothesis( aMesh, aShape, aStatus )); + return aStatus == SMESH_Hypothesis::HYP_OK; } diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index 6c54aac..4cbe7be 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -141,6 +141,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh, aStatus = HYP_MISSING; + bool hasVL = false; list::const_iterator ith; for (ith = hyps.begin(); ith != hyps.end(); ++ith ) { @@ -157,7 +158,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh, else if ( hypName == "NETGEN_Parameters_2D" ) _hypParameters = static_cast(hyp); else if ( hypName == StdMeshers_ViscousLayers2D::GetHypType() ) - continue; + hasVL = true; else { aStatus = HYP_INCOMPATIBLE; return false; @@ -167,6 +168,8 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh, int nbHyps = bool(_hypMaxElementArea) + bool(_hypLengthFromEdges) + bool(_hypParameters ); if ( nbHyps > 1 ) aStatus = HYP_CONCURENT; + else if ( hasVL ) + error( StdMeshers_ViscousLayers2D::CheckHypothesis( aMesh, aShape, aStatus )); else aStatus = HYP_OK; diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 3b76646..103b077 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -162,7 +162,7 @@ bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh, { if ( !_hypMaxElementVolume ) _hypMaxElementVolume = dynamic_cast< const StdMeshers_MaxElementVolume*> ( *h ); - if ( !_viscousLayersHyp ) + // if ( !_viscousLayersHyp ) several _viscousLayersHyp's allowed _viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h ); if ( ! _hypParameters ) _hypParameters = dynamic_cast< const NETGENPlugin_Hypothesis*> ( *h ); @@ -174,6 +174,8 @@ bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh, } if ( _hypMaxElementVolume && _hypParameters ) aStatus = HYP_INCOMPATIBLE; + else if ( aStatus == HYP_OK && _viscousLayersHyp ) + error( _viscousLayersHyp->CheckHypothesis( aMesh, aShape, aStatus )); if ( _hypMaxElementVolume ) _maxElementVolume = _hypMaxElementVolume->GetMaxVolume();