Back to index

salome-smesh  6.5.0
Public Member Functions | Public Attributes
VISCOUS::_Simplex Struct Reference

Simplex (triangle or tetrahedron) based on 1 (tria) or 2 (tet) nodes of _LayerEdge and 2 nodes of the mesh surface beening smoothed. More...

List of all members.

Public Member Functions

 _Simplex (const SMDS_MeshNode *nPrev=0, const SMDS_MeshNode *nNext=0)
bool IsForward (const SMDS_MeshNode *nSrc, const gp_XYZ *pntTgt) const
bool IsForward (const gp_XY &tgtUV, const SMDS_MeshNode *smoothedNode, const TopoDS_Face &face, SMESH_MesherHelper &helper, const double refSign) const
bool IsNeighbour (const _Simplex &other) const

Public Attributes

const SMDS_MeshNode * _nPrev
const SMDS_MeshNode * _nNext

Detailed Description

Simplex (triangle or tetrahedron) based on 1 (tria) or 2 (tet) nodes of _LayerEdge and 2 nodes of the mesh surface beening smoothed.

The class is used to check validity of face or volumes around a smoothed node; it stores only 2 nodes as the other nodes are stored by _LayerEdge.

Definition at line 215 of file StdMeshers_ViscousLayers.cxx.


Constructor & Destructor Documentation

VISCOUS::_Simplex::_Simplex ( const SMDS_MeshNode *  nPrev = 0,
const SMDS_MeshNode *  nNext = 0 
) [inline]

Definition at line 218 of file StdMeshers_ViscousLayers.cxx.

      : _nPrev(nPrev), _nNext(nNext) {}

Member Function Documentation

bool VISCOUS::_Simplex::IsForward ( const SMDS_MeshNode *  nSrc,
const gp_XYZ *  pntTgt 
) const [inline]

Definition at line 220 of file StdMeshers_ViscousLayers.cxx.

    {
      const double M[3][3] =
        {{ _nNext->X() - nSrc->X(), _nNext->Y() - nSrc->Y(), _nNext->Z() - nSrc->Z() },
         { pntTgt->X() - nSrc->X(), pntTgt->Y() - nSrc->Y(), pntTgt->Z() - nSrc->Z() },
         { _nPrev->X() - nSrc->X(), _nPrev->Y() - nSrc->Y(), _nPrev->Z() - nSrc->Z() }};
      double determinant = ( + M[0][0]*M[1][1]*M[2][2]
                             + M[0][1]*M[1][2]*M[2][0]
                             + M[0][2]*M[1][0]*M[2][1]
                             - M[0][0]*M[1][2]*M[2][1]
                             - M[0][1]*M[1][0]*M[2][2]
                             - M[0][2]*M[1][1]*M[2][0]);
      return determinant > 1e-100;
    }
bool VISCOUS::_Simplex::IsForward ( const gp_XY &  tgtUV,
const SMDS_MeshNode *  smoothedNode,
const TopoDS_Face &  face,
SMESH_MesherHelper &  helper,
const double  refSign 
) const [inline]

Definition at line 234 of file StdMeshers_ViscousLayers.cxx.

    {
      gp_XY prevUV = helper.GetNodeUV( face, _nPrev, smoothedNode );
      gp_XY nextUV = helper.GetNodeUV( face, _nNext, smoothedNode );
      gp_Vec2d v1( tgtUV, prevUV ), v2( tgtUV, nextUV );
      double d = v1 ^ v2;
      return d*refSign > 1e-100;
    }
bool VISCOUS::_Simplex::IsNeighbour ( const _Simplex other) const [inline]

Definition at line 246 of file StdMeshers_ViscousLayers.cxx.

    {
      return _nPrev == other._nNext || _nNext == other._nPrev;
    }

Member Data Documentation

const SMDS_MeshNode * VISCOUS::_Simplex::_nNext

Definition at line 217 of file StdMeshers_ViscousLayers.cxx.

const SMDS_MeshNode* VISCOUS::_Simplex::_nPrev

Definition at line 217 of file StdMeshers_ViscousLayers.cxx.


The documentation for this struct was generated from the following file: