22483: EDF 2772 SMESH: Define several 3D viscous layer hypotheses on the same Geometry

This commit is contained in:
eap 2014-08-22 15:38:59 +04:00
parent 56779ee521
commit 0a380c9757
3 changed files with 10 additions and 2 deletions

View File

@ -112,6 +112,9 @@ bool NETGENPlugin_NETGEN_2D::CheckHypothesis (SMESH_Mesh& aMesh,
_hypothesis = theHyp; _hypothesis = theHyp;
} }
if ( aStatus == HYP_OK && _isViscousLayers2D )
error( StdMeshers_ViscousLayers2D::CheckHypothesis( aMesh, aShape, aStatus ));
return aStatus == SMESH_Hypothesis::HYP_OK; return aStatus == SMESH_Hypothesis::HYP_OK;
} }

View File

@ -141,6 +141,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh,
aStatus = HYP_MISSING; aStatus = HYP_MISSING;
bool hasVL = false;
list<const SMESHDS_Hypothesis*>::const_iterator ith; list<const SMESHDS_Hypothesis*>::const_iterator ith;
for (ith = hyps.begin(); ith != hyps.end(); ++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" ) else if ( hypName == "NETGEN_Parameters_2D" )
_hypParameters = static_cast<const NETGENPlugin_Hypothesis_2D*>(hyp); _hypParameters = static_cast<const NETGENPlugin_Hypothesis_2D*>(hyp);
else if ( hypName == StdMeshers_ViscousLayers2D::GetHypType() ) else if ( hypName == StdMeshers_ViscousLayers2D::GetHypType() )
continue; hasVL = true;
else { else {
aStatus = HYP_INCOMPATIBLE; aStatus = HYP_INCOMPATIBLE;
return false; return false;
@ -167,6 +168,8 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh& aMesh,
int nbHyps = bool(_hypMaxElementArea) + bool(_hypLengthFromEdges) + bool(_hypParameters ); int nbHyps = bool(_hypMaxElementArea) + bool(_hypLengthFromEdges) + bool(_hypParameters );
if ( nbHyps > 1 ) if ( nbHyps > 1 )
aStatus = HYP_CONCURENT; aStatus = HYP_CONCURENT;
else if ( hasVL )
error( StdMeshers_ViscousLayers2D::CheckHypothesis( aMesh, aShape, aStatus ));
else else
aStatus = HYP_OK; aStatus = HYP_OK;

View File

@ -162,7 +162,7 @@ bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh,
{ {
if ( !_hypMaxElementVolume ) if ( !_hypMaxElementVolume )
_hypMaxElementVolume = dynamic_cast< const StdMeshers_MaxElementVolume*> ( *h ); _hypMaxElementVolume = dynamic_cast< const StdMeshers_MaxElementVolume*> ( *h );
if ( !_viscousLayersHyp ) // if ( !_viscousLayersHyp ) several _viscousLayersHyp's allowed
_viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h ); _viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h );
if ( ! _hypParameters ) if ( ! _hypParameters )
_hypParameters = dynamic_cast< const NETGENPlugin_Hypothesis*> ( *h ); _hypParameters = dynamic_cast< const NETGENPlugin_Hypothesis*> ( *h );
@ -174,6 +174,8 @@ bool NETGENPlugin_NETGEN_3D::CheckHypothesis (SMESH_Mesh& aMesh,
} }
if ( _hypMaxElementVolume && _hypParameters ) if ( _hypMaxElementVolume && _hypParameters )
aStatus = HYP_INCOMPATIBLE; aStatus = HYP_INCOMPATIBLE;
else if ( aStatus == HYP_OK && _viscousLayersHyp )
error( _viscousLayersHyp->CheckHypothesis( aMesh, aShape, aStatus ));
if ( _hypMaxElementVolume ) if ( _hypMaxElementVolume )
_maxElementVolume = _hypMaxElementVolume->GetMaxVolume(); _maxElementVolume = _hypMaxElementVolume->GetMaxVolume();