X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_ViscousLayers.hxx;h=426257946e3b1458632d5d051a437b2885580f8f;hp=9c26048b637c2fa135218649d179e8e0de887db9;hb=cb55604f37e3d2583272fd436bb6557b041948b5;hpb=ae32dcd34f98b91cdb4f5800063a394feb0df408 diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.hxx b/src/StdMeshers/StdMeshers_ViscousLayers.hxx index 9c26048b6..426257946 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.hxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 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 @@ -32,39 +32,63 @@ #include +class SMDS_MeshGroup; + /*! * \brief Hypothesis defining parameters of viscous layers */ class STDMESHERS_EXPORT StdMeshers_ViscousLayers : public SMESH_Hypothesis { public: - StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_ViscousLayers(int hypId, SMESH_Gen* gen); // 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); + void SetBndShapes(const std::vector& shapeIds, bool toIgnore); std::vector GetBndShapes() const { return _shapeIds; } - bool IsToIgnoreShapes() const { return _isToIgnoreShapes; } + bool IsToIgnoreShapes() const { return _isToIgnoreShapes; } // Set total thickness of layers of prisms - void SetTotalThickness(double thickness); + void SetTotalThickness(double thickness); double GetTotalThickness() const { return _thickness; } // Set number of layers of prisms - void SetNumberLayers(int nb); - int GetNumberLayers() const { return _nbLayers; } + void SetNumberLayers(int nb); + int GetNumberLayers() const { return _nbLayers; } // Set factor (>1.0) of growth of layer thickness towards inside of mesh - void SetStretchFactor(double factor); + void SetStretchFactor(double factor); double GetStretchFactor() const { return _stretchFactor; } + // Method of computing node translation + enum ExtrusionMethod { + // node is translated along normal to a surface with possible further smoothing + SURF_OFFSET_SMOOTH, + // node is translated along the average normal of surrounding faces till + // intersection with a neighbor face translated along its own normal + // by the layers thickness + FACE_OFFSET, + // node is translated along the average normal of surrounding faces + // by the layers thickness + NODE_OFFSET + }; + void SetMethod( ExtrusionMethod how ); + ExtrusionMethod GetMethod() const { return _method; } + + // name of a group to create + void SetGroupName(const std::string& name); + const std::string& GetGroupName() const { return _groupName; } + static SMDS_MeshGroup* CreateGroup( const std::string& theName, + SMESH_Mesh& theMesh, + SMDSAbs_ElementType theType); + // Computes temporary 2D mesh to be used by 3D algorithm. // Return SMESH_ProxyMesh for each SOLID in theShape SMESH_ProxyMesh::Ptr Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theShape, const bool toMakeN2NMap=false) const; - // Checks compatibility of assigned StdMeshers_ViscousLayers hypotheses + // Checks compatibility of assigned StdMeshers_ViscousLayers hypotheses static SMESH_ComputeErrorPtr CheckHypothesis(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, @@ -81,8 +105,6 @@ public: * \param theMesh - the built mesh * \param theShape - the geometry of interest * \retval bool - true if parameter values have been successfully defined - * - * Just return false as this hypothesis does not have parameters values */ virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape); @@ -90,7 +112,7 @@ public: * \brief Initialize my parameter values by default parameters. * \retval bool - true if parameter values have been successfully defined */ - virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0) + virtual bool SetParametersByDefaults(const TDefaults& /*dflts*/, const SMESH_Mesh* /*theMesh*/=0) { return false; } static const char* GetHypType() { return "ViscousLayers"; } @@ -102,6 +124,8 @@ public: int _nbLayers; double _thickness; double _stretchFactor; + ExtrusionMethod _method; + std::string _groupName; }; class SMESH_subMesh;