From: gdd Date: Tue, 16 Oct 2012 14:18:59 +0000 (+0000) Subject: Quadratic mesh and viscous layer not compatible X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_meshgems;p=plugins%2Fblsurfplugin.git Quadratic mesh and viscous layer not compatible --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 6a91546..c9b964a 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -1431,7 +1431,8 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) SMESH_MesherHelper helper( aMesh ); // do not call helper.IsQuadraticSubMesh() because sub-meshes // may be cleaned and helper.myTLinkNodeMap gets invalid in such a case - const bool haveQuadraticSubMesh = SMESH_MesherHelper( aMesh ).IsQuadraticSubMesh( aShape ); + bool haveQuadraticSubMesh = SMESH_MesherHelper( aMesh ).IsQuadraticSubMesh( aShape ); + bool quadraticSubMeshAndViscousLayer = false; bool needMerge = false; set< SMESHDS_SubMesh* > edgeSubmeshes, proxySubmeshes; set< SMESHDS_SubMesh* >& mergeSubmeshes = edgeSubmeshes; @@ -1500,8 +1501,19 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) _hypothesis, css, pcs, aMesh, &use_precad); MESSAGE("END SetParameters"); - helper.SetIsQuadratic( haveQuadraticSubMesh || (_hypothesis != NULL && _hypothesis->GetQuadraticMesh()) ); + haveQuadraticSubMesh = haveQuadraticSubMesh || (_hypothesis != NULL && _hypothesis->GetQuadraticMesh()); + helper.SetIsQuadratic( haveQuadraticSubMesh ); + // To remove as soon as quadratic mesh is allowed - BEGIN + // GDD: Viscous layer is not allowed with quadratic mesh + if (_haveViscousLayers && haveQuadraticSubMesh ) { + quadraticSubMeshAndViscousLayer = true; + _haveViscousLayers = !haveQuadraticSubMesh; + _comment += "Warning: Viscous layer is not possible with a quadratic mesh, it is ignored."; + error(COMPERR_WARNING, _comment); + } + // To remove as soon as quadratic mesh is allowed - END + // needed to prevent the opencascade memory managmement from freeing things vector curves; vector surfaces; @@ -2399,7 +2411,7 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) */ MESSAGE("END OF BLSURFPlugin_BLSURF::Compute()"); - return ( status == STATUS_OK ); + return ( status == STATUS_OK && !quadraticSubMeshAndViscousLayer ); } //================================================================================