SMDS_VolumeTool Class Reference

#include <SMDS_VolumeTool.hxx>

Classes

struct  SaveFacet
 Saver/restorer of a SMDS_VolumeTool::myCurFace. More...
 

Public Types

enum  VolumeType {
  UNKNOWN = -1 , TETRA = 0 , PYRAM , PENTA ,
  HEXA , HEX_PRISM , QUAD_TETRA , QUAD_PYRAM ,
  QUAD_PENTA , QUAD_HEXA , POLYHEDA , NB_VOLUME_TYPES
}
 

Public Member Functions

const SMDS_MeshVolumeElement () const
 
int GetAllExistingEdges (std::vector< const SMDS_MeshElement * > &edges) const
 Fill vector with boundary edges existing in the mesh. More...
 
int GetAllExistingFaces (std::vector< const SMDS_MeshElement * > &faces) const
 Fill vector with boundary faces existing in the mesh. More...
 
bool GetBaryCenter (double &X, double &Y, double &Z) const
 
int GetCenterNodeIndex (int faceIndex) const
 Return index of the node located at face center of a quadratic element like HEX27. More...
 
double GetFaceArea (int faceIndex) const
 
bool GetFaceBaryCenter (int faceIndex, double &X, double &Y, double &Z) const
 Return barycenter of a face. More...
 
int GetFaceIndex (const std::set< const SMDS_MeshNode * > &theFaceNodes, const int theFaceIndexHint=-1) const
 
const SMDS_MeshNode ** GetFaceNodes (int faceIndex) const
 
bool GetFaceNodes (int faceIndex, std::set< const SMDS_MeshNode * > &theFaceNodes) const
 
const intGetFaceNodesIndices (int faceIndex) const
 
bool GetFaceNormal (int faceIndex, double &X, double &Y, double &Z) const
 
int GetNodeIndex (const SMDS_MeshNode *theNode) const
 
const SMDS_MeshNode ** GetNodes ()
 
int GetOppFaceIndex (int faceIndex) const
 
double GetSize () const
 
VolumeType GetVolumeType () const
 
int ID () const
 
void Inverse ()
 
bool IsFaceExternal (int faceIndex) const
 
bool IsForward () const
 
bool IsFreeFace (int faceIndex, const SMDS_MeshElement **otherVol=0) const
 fast check that only one volume is build on the face nodes This check is valid for conformal meshes only More...
 
bool IsFreeFaceAdv (int faceIndex, const SMDS_MeshElement **otherVol=0) const
 Thorough check that only one volume is build on the face nodes. More...
 
bool IsLinked (const int theNode1Index, const int theNode2Index, bool theIgnoreMediumNodes=false) const
 
bool IsLinked (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2, const bool theIgnoreMediumNodes=false) const
 
bool IsOut (double X, double Y, double Z, double tol) const
 Classify a point. More...
 
bool IsPoly () const
 
double MaxLinearSize2 () const
 Return maximal square distance between connected corner nodes. More...
 
double MinLinearSize2 () const
 Return minimal square distance between connected corner nodes. More...
 
int NbFaceNodes (int faceIndex) const
 
int NbFaces () const
 
int NbNodes ()
 
bool Set (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true)
 
void SetExternalNormal ()
 
 SMDS_VolumeTool ()
 
 SMDS_VolumeTool (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true)
 
 ~SMDS_VolumeTool ()
 

Static Public Member Functions

static const intGetFaceNodesIndices (VolumeType type, int faceIndex, bool external)
 
static int GetOppFaceIndexOfHex (int faceIndex)
 
static VolumeType GetType (int nbNodes)
 
static int NbCornerNodes (VolumeType type)
 Useful to know nb of corner nodes of a quadratic volume. More...
 
static int NbFaceNodes (VolumeType type, int faceIndex)
 
static int NbFaces (VolumeType type)
 

Member Enumeration Documentation

◆ VolumeType

Enumerator
UNKNOWN 
TETRA 
PYRAM 
PENTA 
HEXA 
HEX_PRISM 
QUAD_TETRA 
QUAD_PYRAM 
QUAD_PENTA 
QUAD_HEXA 
POLYHEDA 
NB_VOLUME_TYPES 

Constructor & Destructor Documentation

◆ SMDS_VolumeTool() [1/2]

SMDS_VolumeTool::SMDS_VolumeTool ( )

References Set().

◆ ~SMDS_VolumeTool()

SMDS_VolumeTool::~SMDS_VolumeTool ( )

◆ SMDS_VolumeTool() [2/2]

SMDS_VolumeTool::SMDS_VolumeTool ( const SMDS_MeshElement theVolume,
const bool  ignoreCentralNodes = true 
)

References Set().

Member Function Documentation

◆ Element()

const SMDS_MeshVolume * SMDS_VolumeTool::Element ( ) const

◆ GetAllExistingEdges()

int SMDS_VolumeTool::GetAllExistingEdges ( std::vector< const SMDS_MeshElement * > &  edges) const

Fill vector with boundary edges existing in the mesh.

Parameters
edges- vector of found edges
Return values
int- nb of found faces

References SMDS_Mesh::FindEdge(), and IsLinked().

◆ GetAllExistingFaces()

int SMDS_VolumeTool::GetAllExistingFaces ( std::vector< const SMDS_MeshElement * > &  faces) const

Fill vector with boundary faces existing in the mesh.

Parameters
faces- vector of found nodes
Return values
int- nb of found faces

References SMDS_Mesh::FindFace(), GetFaceNodes(), IsPoly(), NbFaceNodes(), and NbFaces().

◆ GetBaryCenter()

bool SMDS_VolumeTool::GetBaryCenter ( double &  X,
double &  Y,
double &  Z 
) const

◆ GetCenterNodeIndex()

int SMDS_VolumeTool::GetCenterNodeIndex ( int  faceIndex) const

Return index of the node located at face center of a quadratic element like HEX27.

Referenced by SMESH_MesherHelper::AddTLinks(), SMESH_MeshEditor::MakeBoundaryMesh(), and SMESH_MeshEditor::SplitVolumes().

◆ GetFaceArea()

double SMDS_VolumeTool::GetFaceArea ( int  faceIndex) const

◆ GetFaceBaryCenter()

bool SMDS_VolumeTool::GetFaceBaryCenter ( int  faceIndex,
double &  X,
double &  Y,
double &  Z 
) const

Return barycenter of a face.

Referenced by SMESH_MeshAlgos::GetDistance(), and SMESH_MeshEditor::SplitVolumes().

◆ GetFaceIndex()

int SMDS_VolumeTool::GetFaceIndex ( const std::set< const SMDS_MeshNode * > &  theFaceNodes,
const int  theFaceIndexHint = -1 
) const

◆ GetFaceNodes() [1/2]

◆ GetFaceNodes() [2/2]

bool SMDS_VolumeTool::GetFaceNodes ( int  faceIndex,
std::set< const SMDS_MeshNode * > &  theFaceNodes 
) const

◆ GetFaceNodesIndices() [1/2]

◆ GetFaceNodesIndices() [2/2]

const int * SMDS_VolumeTool::GetFaceNodesIndices ( VolumeType  type,
int  faceIndex,
bool  external 
)
static

◆ GetFaceNormal()

bool SMDS_VolumeTool::GetFaceNormal ( int  faceIndex,
double &  X,
double &  Y,
double &  Z 
) const

◆ GetNodeIndex()

int SMDS_VolumeTool::GetNodeIndex ( const SMDS_MeshNode theNode) const

◆ GetNodes()

◆ GetOppFaceIndex()

int SMDS_VolumeTool::GetOppFaceIndex ( int  faceIndex) const

◆ GetOppFaceIndexOfHex()

int SMDS_VolumeTool::GetOppFaceIndexOfHex ( int  faceIndex)
static

◆ GetSize()

double SMDS_VolumeTool::GetSize ( ) const

◆ GetType()

◆ GetVolumeType()

SMDS_VolumeTool::VolumeType SMDS_VolumeTool::GetVolumeType ( ) const

◆ ID()

int SMDS_VolumeTool::ID ( ) const

◆ Inverse()

void SMDS_VolumeTool::Inverse ( )

◆ IsFaceExternal()

bool SMDS_VolumeTool::IsFaceExternal ( int  faceIndex) const

◆ IsForward()

◆ IsFreeFace()

◆ IsFreeFaceAdv()

bool SMDS_VolumeTool::IsFreeFaceAdv ( int  faceIndex,
const SMDS_MeshElement **  otherVol = 0 
) const

Thorough check that only one volume is build on the face nodes.

References GetBaryCenter(), GetFaceNodes(), GetFaceNormal(), SMDS_MeshNode::GetInverseElementIterator(), and IsFaceExternal().

◆ IsLinked() [1/2]

bool SMDS_VolumeTool::IsLinked ( const int  theNode1Index,
const int  theNode2Index,
bool  theIgnoreMediumNodes = false 
) const

◆ IsLinked() [2/2]

◆ IsOut()

bool SMDS_VolumeTool::IsOut ( double  X,
double  Y,
double  Z,
double  tol 
) const

Classify a point.

Parameters
tol- thickness of faces

References GetFaceNormal(), and IsFaceExternal().

Referenced by SMESH_MeshAlgos::IsOut().

◆ IsPoly()

bool SMDS_VolumeTool::IsPoly ( ) const

Referenced by GetAllExistingFaces(), and IsFreeFace().

◆ MaxLinearSize2()

double SMDS_VolumeTool::MaxLinearSize2 ( ) const

Return maximal square distance between connected corner nodes.

References SMDS_MeshElement::IsQuadratic().

◆ MinLinearSize2()

double SMDS_VolumeTool::MinLinearSize2 ( ) const

Return minimal square distance between connected corner nodes.

References SMDS_MeshElement::IsQuadratic().

Referenced by SMESH_MesherHelper::FixQuadraticElements().

◆ NbCornerNodes()

int SMDS_VolumeTool::NbCornerNodes ( VolumeType  type)
static

Useful to know nb of corner nodes of a quadratic volume.

Parameters
type- volume type
Return values
int- nb of corner nodes

References HEX_PRISM, HEXA, PENTA, PYRAM, QUAD_HEXA, QUAD_PENTA, QUAD_PYRAM, QUAD_TETRA, and TETRA.

Referenced by StdMeshers_Projection_3D::Compute().

◆ NbFaceNodes() [1/2]

◆ NbFaceNodes() [2/2]

int SMDS_VolumeTool::NbFaceNodes ( VolumeType  type,
int  faceIndex 
)
static

◆ NbFaces() [1/2]

◆ NbFaces() [2/2]

int SMDS_VolumeTool::NbFaces ( VolumeType  type)
static

◆ NbNodes()

◆ Set()

◆ SetExternalNormal()


The documentation for this class was generated from the following files: