Version: 6.3.1
Public Member Functions | Data Fields

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...

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 TopoDS_Face &face, SMESH_MesherHelper &helper, const double refSign) const

Data Fields

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 208 of file StdMeshers_ViscousLayers.cxx.


Constructor & Destructor Documentation

VISCOUS._Simplex._Simplex ( const SMDS_MeshNode nPrev = 0,
const SMDS_MeshNode nNext = 0 
)

Definition at line 211 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

Definition at line 213 of file StdMeshers_ViscousLayers.cxx.

References SMDS_MeshNode.X(), SMDS_MeshNode.Y(), and SMDS_MeshNode.Z().

    {
      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 TopoDS_Face &  face,
SMESH_MesherHelper helper,
const double  refSign 
) const

Definition at line 227 of file StdMeshers_ViscousLayers.cxx.

References ex13_hole1partial.d, and SMESH_MesherHelper.GetNodeUV().

    {
      gp_XY prevUV = helper.GetNodeUV( face, _nPrev );
      gp_XY nextUV = helper.GetNodeUV( face, _nNext );
      gp_Vec2d v1( tgtUV, prevUV ), v2( tgtUV, nextUV );
      double d = v1 ^ v2;
      return d*refSign > 1e-100;
    }

Field Documentation

Definition at line 210 of file StdMeshers_ViscousLayers.cxx.

Referenced by VISCOUS._ViscousBuilder.makeLayer().

Definition at line 210 of file StdMeshers_ViscousLayers.cxx.

Referenced by VISCOUS._ViscousBuilder.makeLayer().

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS