Salome HOME
4c885e4d6e3f3bd60391a60379c3b819234409f1
[modules/smesh.git] / src / StdMeshers / StdMeshers_ViscousLayers2D.hxx
1 // Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // File      : StdMeshers_ViscousLayers2D.hxx
21 // Created   : 23 Jul 2012
22 // Author    : Edward AGAPOV (eap)
23
24 #ifndef __StdMeshers_ViscousLayers2D_HXX__
25 #define __StdMeshers_ViscousLayers2D_HXX__
26
27 #include "StdMeshers_ViscousLayers.hxx"
28
29 class TopoDS_Face;
30
31 /*!
32  * \brief Hypothesis defining parameters of viscous layers
33  */
34 class STDMESHERS_EXPORT StdMeshers_ViscousLayers2D : public StdMeshers_ViscousLayers
35 {
36 public:
37   StdMeshers_ViscousLayers2D(int hypId, int studyId, SMESH_Gen* gen);
38   /*!
39    * \brief Computes temporary 2D mesh to be used by 2D algorithm.
40    *        Return SMESH_ProxyMesh for the given FACE, or NULL in case of error
41    */
42   static SMESH_ProxyMesh::Ptr Compute(SMESH_Mesh&        theMesh,
43                                       const TopoDS_Face& theShape);
44   /*!
45    * \brief At study restoration, restore event listeners used to clear an inferior
46    *  dim sub-mesh modified by viscous layers
47    */
48   void RestoreListeners() const;
49
50   /*!
51    * \brief Checks compatibility of assigned StdMeshers_ViscousLayers2D hypotheses
52    */
53   static SMESH_ComputeErrorPtr CheckHypothesis(SMESH_Mesh&         aMesh,
54                                                const TopoDS_Shape& aShape,
55                                                Hypothesis_Status&  aStatus);
56   /*!
57    * \brief Initialize my parameter values by the mesh built on the geometry
58    * \param theMesh - the built mesh
59    * \param theShape - the geometry of interest
60    * \retval bool - true if parameter values have been successfully defined
61    *
62    * Just return false as this hypothesis does not have parameters values
63    */
64   virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
65
66   /*!
67    * \brief Initialize my parameter values by default parameters.
68    *  \retval bool - true if parameter values have been successfully defined
69    */
70   virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0)
71   { return false; }
72
73   static const char* GetHypType() { return "ViscousLayers2D"; }
74
75  private:
76 };
77
78 #endif