X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_ViscousLayers.hxx;h=9c26048b637c2fa135218649d179e8e0de887db9;hb=a55e1001a657f030116c13e82cf4c2bfcd088133;hp=42c1871304effa3104e648a6f2da9af835bf86f3;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.hxx b/src/StdMeshers/StdMeshers_ViscousLayers.hxx index 42c187130..9c26048b6 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.hxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,6 +28,7 @@ #include "SMESH_Hypothesis.hxx" #include "SMESH_ProxyMesh.hxx" +#include "SMESH_ComputeError.hxx" #include @@ -39,9 +40,11 @@ class STDMESHERS_EXPORT StdMeshers_ViscousLayers : public SMESH_Hypothesis public: StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen); - // Set faces to exclude from treatment - void SetIgnoreFaces(const std::vector& faceIds); - std::vector GetIgnoreFaces() const { return _ignoreFaceIds; } + // Set boundary shapes (faces in 3D, edges in 2D) either to exclude from + // treatment or to make the Viscous Layers on + void SetBndShapes(const std::vector& shapeIds, bool toIgnore); + std::vector GetBndShapes() const { return _shapeIds; } + bool IsToIgnoreShapes() const { return _isToIgnoreShapes; } // Set total thickness of layers of prisms void SetTotalThickness(double thickness); @@ -61,6 +64,15 @@ public: const TopoDS_Shape& theShape, const bool toMakeN2NMap=false) const; + // Checks compatibility of assigned StdMeshers_ViscousLayers hypotheses + static SMESH_ComputeErrorPtr + CheckHypothesis(SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + SMESH_Hypothesis::Hypothesis_Status& aStatus); + + // Checks if viscous layers should be constructed on a shape + bool IsShapeWithLayers(int shapeIndex) const; + virtual std::ostream & SaveTo(std::ostream & save); virtual std::istream & LoadFrom(std::istream & load); @@ -85,10 +97,21 @@ public: private: - std::vector _ignoreFaceIds; + std::vector _shapeIds; + bool _isToIgnoreShapes; int _nbLayers; double _thickness; double _stretchFactor; }; +class SMESH_subMesh; +namespace VISCOUS_3D +{ + // sets a sub-mesh event listener to clear sub-meshes of sub-shapes of + // the main shape when sub-mesh of the main shape is cleared, + // for example to clear sub-meshes of FACEs when sub-mesh of a SOLID + // is cleared + void ToClearSubWithMain( SMESH_subMesh* sub, const TopoDS_Shape& main); +} + #endif