Version: 9.16.0
StdMeshers_ViscousLayers Class Reference

Hypothesis defining parameters of viscous layers. More...

#include <StdMeshers_ViscousLayers.hxx>

Inheritance diagram for StdMeshers_ViscousLayers:

Public Types

enum  ExtrusionMethod { SURF_OFFSET_SMOOTH , FACE_OFFSET , NODE_OFFSET }
 
enum  Hypothesis_Status {
  HYP_OK = 0 , HYP_MISSING , HYP_CONCURRENT , HYP_BAD_PARAMETER ,
  HYP_HIDDEN_ALGO , HYP_HIDING_ALGO , HYP_UNKNOWN_FATAL , HYP_INCOMPATIBLE ,
  HYP_NOTCONFORM , HYP_ALREADY_EXIST , HYP_BAD_DIM , HYP_BAD_SUBSHAPE ,
  HYP_BAD_GEOMETRY , HYP_NEED_SHAPE , HYP_INCOMPAT_HYPS
}
 
enum  InitWay { BY_MESH , BY_GEOM , BY_AVERAGE_LENGTH }
 
enum  hypothesis_type {
  PARAM_ALGO , ALGO_0D , ALGO_1D , ALGO_2D ,
  ALGO_3D
}
 

Public Member Functions

 StdMeshers_ViscousLayers (int hypId, SMESH_Gen *gen)
 
void SetBndShapes (const std::vector< int > &shapeIds, bool toIgnore)
 
std::vector< int > GetBndShapes () const
 
bool IsToIgnoreShapes () const
 
void SetTotalThickness (double thickness)
 
double GetTotalThickness () const
 
void SetNumberLayers (int nb)
 
int GetNumberLayers () const
 
void SetStretchFactor (double factor)
 
double GetStretchFactor () const
 
void SetMethod (ExtrusionMethod how)
 
ExtrusionMethod GetMethod () const
 
void SetGroupName (const std::string &name)
 
const std::string & GetGroupName () const
 
SMESH_ProxyMesh::Ptr Compute (SMESH_Mesh &theMesh, const TopoDS_Shape &theShape, const bool toMakeN2NMap=false) const
 
bool IsShapeWithLayers (int shapeIndex) const
 
virtual std::ostream & SaveTo (std::ostream &save)
 
virtual std::istream & LoadFrom (std::istream &load)
 
virtual bool SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)
 Initialize my parameter values by the mesh built on the geometry. More...
 
virtual bool SetParametersByDefaults (const TDefaults &, const SMESH_Mesh *=0)
 Initialize my parameter values by default parameters. More...
 
virtual int GetDim () const
 
SMESH_GenGetGen () const
 
virtual int GetShapeType () const
 
virtual const char * GetLibName () const
 
virtual void NotifySubMeshesHypothesisModification ()
 
void SetLibName (const char *theLibName)
 
virtual bool DataDependOnParams () const
 The returned value is used by NotifySubMeshesHypothesisModification() to decide to call subMesh->AlgoStateEngine( MODIF_HYP, hyp ) or not if subMesh is ready to be computed (algo+hyp==OK) but not yet computed. More...
 
virtual bool IsAuxiliary () const
 Return true if me is an auxiliary hypothesis. More...
 
SMESH_MeshGetMeshByPersistentID (int id) const
 Find a mesh with given persistent ID. More...
 
const char * GetName () const
 
int GetID () const
 
int GetType () const
 
bool IsSameName (const SMESHDS_Hypothesis &other) const
 Compare types of hypotheses. More...
 
virtual bool operator== (const SMESHDS_Hypothesis &other) const
 Equality. More...
 
bool operator!= (const SMESHDS_Hypothesis &other) const
 

Static Public Member Functions

static SMDS_MeshGroupCreateGroup (const std::string &theName, SMESH_Mesh &theMesh, SMDSAbs_ElementType theType)
 
static SMESH_ComputeErrorPtr CheckHypothesis (SMESH_Mesh &aMesh, const TopoDS_Shape &aShape, SMESH_Hypothesis::Hypothesis_Status &aStatus)
 
static double Get1stLayerThickness (double thickTotal, double factor, int nbLayers)
 
static const char * GetHypType ()
 
static bool IsStatusFatal (Hypothesis_Status theStatus)
 
static void SaveStringToStream (std::ostream &save, const std::string &txt)
 Save a string to a stream. More...
 
static bool LoadStringFromStream (std::istream &load, std::string &txt)
 Load a string from a stream. More...
 

Protected Attributes

SMESH_Gen_gen
 
int _shapeType
 
int _param_algo_dim
 
std::string _name
 
int _hypId
 
hypothesis_type _type
 

Private Attributes

std::vector< int > _shapeIds
 
bool _isToIgnoreShapes
 
int _nbLayers
 
double _thickness
 
double _stretchFactor
 
ExtrusionMethod _method
 
std::string _groupName
 
std::string _libName
 

Detailed Description

Hypothesis defining parameters of viscous layers.

Member Enumeration Documentation

◆ ExtrusionMethod

Enumerator
SURF_OFFSET_SMOOTH 
FACE_OFFSET 
NODE_OFFSET 

◆ Hypothesis_Status

Enumerator
HYP_OK 
HYP_MISSING 
HYP_CONCURRENT 
HYP_BAD_PARAMETER 
HYP_HIDDEN_ALGO 
HYP_HIDING_ALGO 
HYP_UNKNOWN_FATAL 
HYP_INCOMPATIBLE 
HYP_NOTCONFORM 
HYP_ALREADY_EXIST 
HYP_BAD_DIM 
HYP_BAD_SUBSHAPE 
HYP_BAD_GEOMETRY 
HYP_NEED_SHAPE 
HYP_INCOMPAT_HYPS 

◆ hypothesis_type

Enumerator
PARAM_ALGO 
ALGO_0D 
ALGO_1D 
ALGO_2D 
ALGO_3D 

◆ InitWay

enum SMESH_Hypothesis::InitWay
inherited
Enumerator
BY_MESH 
BY_GEOM 
BY_AVERAGE_LENGTH 

Constructor & Destructor Documentation

◆ StdMeshers_ViscousLayers()

StdMeshers_ViscousLayers::StdMeshers_ViscousLayers ( int  hypId,
SMESH_Gen gen 
)

Member Function Documentation

◆ CheckHypothesis()

◆ Compute()

◆ CreateGroup()

◆ DataDependOnParams()

virtual bool SMESH_Hypothesis::DataDependOnParams ( ) const
virtualinherited

The returned value is used by NotifySubMeshesHypothesisModification() to decide to call subMesh->AlgoStateEngine( MODIF_HYP, hyp ) or not if subMesh is ready to be computed (algo+hyp==OK) but not yet computed.

True result is reasonable for example if EventListeners depend on parameters of hypothesis.

Reimplemented in StdMeshers_ImportSource1D.

Referenced by SMESH_Mesh::NotifySubMeshesHypothesisModification().

◆ Get1stLayerThickness()

double StdMeshers_ViscousLayers::Get1stLayerThickness ( double  thickTotal,
double  factor,
int  nbLayers 
)
static

◆ GetBndShapes()

◆ GetDim()

◆ GetGen()

SMESH_Gen * SMESH_Hypothesis::GetGen ( ) const
inherited

◆ GetGroupName()

const std::string & StdMeshers_ViscousLayers::GetGroupName ( ) const

◆ GetHypType()

◆ GetID()

◆ GetLibName()

const char * SMESH_Hypothesis::GetLibName ( ) const
virtualinherited

◆ GetMeshByPersistentID()

SMESH_Mesh * SMESH_Hypothesis::GetMeshByPersistentID ( int  id) const
inherited

◆ GetMethod()

ExtrusionMethod StdMeshers_ViscousLayers::GetMethod ( ) const

◆ GetName()

◆ GetNumberLayers()

◆ GetShapeType()

int SMESH_Hypothesis::GetShapeType ( ) const
virtualinherited

◆ GetStretchFactor()

◆ GetTotalThickness()

double StdMeshers_ViscousLayers::GetTotalThickness ( ) const

◆ GetType()

◆ IsAuxiliary()

virtual bool SMESH_Hypothesis::IsAuxiliary ( ) const
virtualinherited

Return true if me is an auxiliary hypothesis.

Return values
bool- auxiliary or not

An auxiliary hypothesis is optional, i.e. an algorithm can work without it and another hypothesis of the same dimension can be assigned to the shape

References SMESHDS_Hypothesis::GetType().

Referenced by SMESH_subMesh::AlgoStateEngine(), StdMeshers_Regular_1D::CheckHypothesis(), SMESH_Mesh::GetHypotheses(), SMESH_subMesh::getSimilarAttached(), SMESH_HypoFilter::IsAuxiliaryPredicate::IsOk(), SMESH_Mesh::IsUsedHypothesis(), and SMESH_Mesh::NotifySubMeshesHypothesisModification().

◆ IsSameName()

bool SMESHDS_Hypothesis::IsSameName ( const SMESHDS_Hypothesis other) const
inherited

Compare types of hypotheses.

References SMESHDS_Hypothesis::_name.

Referenced by StdMeshers_Regular_1D::CheckHypothesis(), and SMESH_subMesh::getCollection().

◆ IsShapeWithLayers()

bool StdMeshers_ViscousLayers::IsShapeWithLayers ( int  shapeIndex) const

◆ IsStatusFatal()

◆ IsToIgnoreShapes()

◆ LoadFrom()

std::istream & StdMeshers_ViscousLayers::LoadFrom ( std::istream &  load)
virtual

◆ LoadStringFromStream()

bool SMESHDS_Hypothesis::LoadStringFromStream ( std::istream &  load,
std::string &  txt 
)
staticinherited

Load a string from a stream.

◆ NotifySubMeshesHypothesisModification()

void SMESH_Hypothesis::NotifySubMeshesHypothesisModification ( )
virtualinherited

References SMESH_Hypothesis::_gen, SMESH_Gen::GetStudyContext(), studyContextStruct::mapMesh, and SMESH_Mesh::NotifySubMeshesHypothesisModification().

Referenced by SMESH_Hypothesis_i::LoadFrom(), StdMeshers_CartesianParameters3D::SetAxisDirs(), StdMeshers_BlockRenumber::SetBlocksOrientation(), SetBndShapes(), StdMeshers_Geometric1D::SetCommonRatio(), StdMeshers_ImportSource1D::SetCopySourceMesh(), StdMeshers_Adaptive1D::SetDeflection(), StdMeshers_Deflection1D::SetDeflection(), StdMeshers_QuadrangleParams::SetEnforcedNodes(), StdMeshers_AutomaticLength::SetFineness(), StdMeshers_CartesianParameters3D::SetFixedPoint(), StdMeshers_CartesianParameters3D::SetGrid(), StdMeshers_CartesianParameters3D::SetGridSpacing(), SetGroupName(), StdMeshers_ImportSource1D::SetGroups(), StdMeshers_LayerDistribution::SetLayerDistribution(), StdMeshers_LocalLength::SetLength(), StdMeshers_MaxLength::SetLength(), StdMeshers_SegmentLengthAroundVertex::SetLength(), StdMeshers_Arithmetic1D::SetLength(), StdMeshers_StartEndLength::SetLength(), StdMeshers_MaxElementArea::SetMaxArea(), StdMeshers_Adaptive1D::SetMaxSize(), StdMeshers_MaxElementVolume::SetMaxVolume(), SetMethod(), StdMeshers_Adaptive1D::SetMinSize(), StdMeshers_LengthFromEdges::SetMode(), StdMeshers_FixedPoints1D::SetNbSegments(), SetNumberLayers(), StdMeshers_NumberOfLayers::SetNumberOfLayers(), StdMeshers_FixedPoints1D::SetPoints(), StdMeshers_LocalLength::SetPrecision(), StdMeshers_QuadrangleParams::SetQuadType(), StdMeshers_CartesianParameters3D::SetQuanta(), StdMeshers_Reversible1D::SetReversedEdges(), StdMeshers_CartesianParameters3D::SetSizeThreshold(), StdMeshers_ProjectionSource3D::SetSource3DShape(), StdMeshers_ProjectionSource1D::SetSourceEdge(), StdMeshers_ProjectionSource2D::SetSourceFace(), StdMeshers_ProjectionSource1D::SetSourceMesh(), StdMeshers_ProjectionSource2D::SetSourceMesh(), StdMeshers_ProjectionSource3D::SetSourceMesh(), StdMeshers_Geometric1D::SetStartLength(), SetStretchFactor(), StdMeshers_CartesianParameters3D::SetToAddEdges(), StdMeshers_CartesianParameters3D::SetToConsiderInternalFaces(), StdMeshers_CartesianParameters3D::SetToCreateFaces(), SetTotalThickness(), StdMeshers_CartesianParameters3D::SetToUseQuanta(), StdMeshers_CartesianParameters3D::SetToUseThresholdForInternalFaces(), StdMeshers_QuadrangleParams::SetTriaVertex(), StdMeshers_ProjectionSource1D::SetVertexAssociation(), StdMeshers_ProjectionSource2D::SetVertexAssociation(), and StdMeshers_ProjectionSource3D::SetVertexAssociation().

◆ operator!=()

bool SMESHDS_Hypothesis::operator!= ( const SMESHDS_Hypothesis other) const
inherited

◆ operator==()

bool SMESHDS_Hypothesis::operator== ( const SMESHDS_Hypothesis other) const
virtualinherited

Equality.

References SMESHDS_Hypothesis::_name.

◆ SaveStringToStream()

void SMESHDS_Hypothesis::SaveStringToStream ( std::ostream &  save,
const std::string &  txt 
)
staticinherited

Save a string to a stream.

◆ SaveTo()

std::ostream & StdMeshers_ViscousLayers::SaveTo ( std::ostream &  save)
virtual

◆ SetBndShapes()

◆ SetGroupName()

◆ SetLibName()

void SMESH_Hypothesis::SetLibName ( const char *  theLibName)
inherited

◆ SetMethod()

◆ SetNumberLayers()

◆ SetParametersByDefaults()

virtual bool StdMeshers_ViscousLayers::SetParametersByDefaults ( const TDefaults ,
const SMESH_Mesh = 0 
)
virtual

Initialize my parameter values by default parameters.

Return values
bool- true if parameter values have been successfully defined

Implements SMESH_Hypothesis.

Reimplemented in StdMeshers_ViscousLayers2D.

◆ SetParametersByMesh()

bool StdMeshers_ViscousLayers::SetParametersByMesh ( const SMESH_Mesh theMesh,
const TopoDS_Shape &  theShape 
)
virtual

Initialize my parameter values by the mesh built on the geometry.

Parameters
theMesh- the built mesh
theShape- the geometry of interest
Return values
bool- true if parameter values have been successfully defined

Implements SMESH_Hypothesis.

Reimplemented in StdMeshers_ViscousLayers2D.

◆ SetStretchFactor()

◆ SetTotalThickness()

Field Documentation

◆ _gen

◆ _groupName

std::string StdMeshers_ViscousLayers::_groupName
private

Referenced by LoadFrom(), SaveTo(), and SetGroupName().

◆ _hypId

int SMESHDS_Hypothesis::_hypId
protectedinherited

◆ _isToIgnoreShapes

bool StdMeshers_ViscousLayers::_isToIgnoreShapes
private

Referenced by LoadFrom(), SaveTo(), and SetBndShapes().

◆ _libName

std::string SMESH_Hypothesis::_libName
privateinherited

◆ _method

ExtrusionMethod StdMeshers_ViscousLayers::_method
private

Referenced by LoadFrom(), SaveTo(), and SetMethod().

◆ _name

std::string SMESHDS_Hypothesis::_name
protectedinherited

Referenced by SMESHDS_Hypothesis::GetName(), SMESHDS_Hypothesis::IsSameName(), SMESHDS_Hypothesis::operator==(), SMESHDS_Hypothesis::SMESHDS_Hypothesis(), StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(), StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(), StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(), StdMeshers_BlockRenumber::StdMeshers_BlockRenumber(), StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(), StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(), StdMeshers_CompositeHexa_3D::StdMeshers_CompositeHexa_3D(), StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(), StdMeshers_Deflection1D::StdMeshers_Deflection1D(), StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(), StdMeshers_Geometric1D::StdMeshers_Geometric1D(), StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(), StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(), StdMeshers_Import_1D::StdMeshers_Import_1D(), StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(), StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(), StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(), StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(), StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(), StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(), StdMeshers_LocalLength::StdMeshers_LocalLength(), StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(), StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(), StdMeshers_MaxLength::StdMeshers_MaxLength(), StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(), StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(), StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(), StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(), StdMeshers_PolygonPerFace_2D::StdMeshers_PolygonPerFace_2D(), StdMeshers_PolyhedronPerSolid_3D::StdMeshers_PolyhedronPerSolid_3D(), StdMeshers_Prism_3D::StdMeshers_Prism_3D(), StdMeshers_Projection_1D::StdMeshers_Projection_1D(), StdMeshers_Projection_1D2D::StdMeshers_Projection_1D2D(), StdMeshers_Projection_2D::StdMeshers_Projection_2D(), StdMeshers_Projection_3D::StdMeshers_Projection_3D(), StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(), StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(), StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(), StdMeshers_Propagation::StdMeshers_Propagation(), StdMeshers_PropagOfDistribution::StdMeshers_PropagOfDistribution(), StdMeshers_QuadFromMedialAxis_1D2D::StdMeshers_QuadFromMedialAxis_1D2D(), StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D(), StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(), StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(), StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(), StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(), StdMeshers_RadialQuadrangle_1D2D::StdMeshers_RadialQuadrangle_1D2D(), StdMeshers_Regular_1D::StdMeshers_Regular_1D(), StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D(), StdMeshers_SegmentLengthAroundVertex::StdMeshers_SegmentLengthAroundVertex(), StdMeshers_StartEndLength::StdMeshers_StartEndLength(), StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D(), StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D(), StdMeshers_ViscousLayerBuilder::StdMeshers_ViscousLayerBuilder(), StdMeshers_ViscousLayers(), and StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D().

◆ _nbLayers

int StdMeshers_ViscousLayers::_nbLayers
private

Referenced by LoadFrom(), SaveTo(), and SetNumberLayers().

◆ _param_algo_dim

int SMESH_Hypothesis::_param_algo_dim
protectedinherited

Referenced by SMESH_Hypothesis::GetDim(), SMESH_Hypothesis::SMESH_Hypothesis(), StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(), StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(), StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(), StdMeshers_BlockRenumber::StdMeshers_BlockRenumber(), StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(), StdMeshers_Deflection1D::StdMeshers_Deflection1D(), StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(), StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(), StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(), StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(), StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(), StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(), StdMeshers_LocalLength::StdMeshers_LocalLength(), StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(), StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(), StdMeshers_MaxLength::StdMeshers_MaxLength(), StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(), StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(), StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(), StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(), StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(), StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(), StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(), StdMeshers_Propagation::StdMeshers_Propagation(), StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(), StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(), StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(), StdMeshers_Reversible1D::StdMeshers_Reversible1D(), StdMeshers_SegmentLengthAroundVertex::StdMeshers_SegmentLengthAroundVertex(), StdMeshers_StartEndLength::StdMeshers_StartEndLength(), StdMeshers_ViscousLayers(), and StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D().

◆ _shapeIds

std::vector<int> StdMeshers_ViscousLayers::_shapeIds
private

◆ _shapeType

◆ _stretchFactor

double StdMeshers_ViscousLayers::_stretchFactor
private

Referenced by LoadFrom(), SaveTo(), and SetStretchFactor().

◆ _thickness

double StdMeshers_ViscousLayers::_thickness
private

Referenced by LoadFrom(), SaveTo(), and SetTotalThickness().

◆ _type