_hypothesis = theHyp;
}
+ if ( aStatus == HYP_OK && _isViscousLayers2D )
+ error( StdMeshers_ViscousLayers2D::CheckHypothesis( aMesh, aShape, aStatus ));
+
return aStatus == SMESH_Hypothesis::HYP_OK;
}
aStatus = HYP_MISSING;
+ bool hasVL = false;
list<const SMESHDS_Hypothesis*>::const_iterator ith;
for (ith = hyps.begin(); ith != hyps.end(); ++ith )
{
else if ( hypName == "NETGEN_Parameters_2D" )
_hypParameters = static_cast<const NETGENPlugin_Hypothesis_2D*>(hyp);
else if ( hypName == StdMeshers_ViscousLayers2D::GetHypType() )
- continue;
+ hasVL = true;
else {
aStatus = HYP_INCOMPATIBLE;
return false;
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;
{
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 );
}
if ( _hypMaxElementVolume && _hypParameters )
aStatus = HYP_INCOMPATIBLE;
+ else if ( aStatus == HYP_OK && _viscousLayersHyp )
+ error( _viscousLayersHyp->CheckHypothesis( aMesh, aShape, aStatus ));
if ( _hypMaxElementVolume )
_maxElementVolume = _hypMaxElementVolume->GetMaxVolume();