MbWedgeCell Class Reference
[Cell]

MeshViz Defines an Wedge cell of a volume mesh. More...

#include <MeshVizXLM/mesh/cell/MbWedgeCell.h>

Inheritance diagram for MbWedgeCell:
MiVolumeCell MiCell

List of all members.

Public Member Functions

 MbWedgeCell (size_t n0, size_t n1, size_t n2, size_t n3, size_t n4, size_t n5)
double getVolume (const MiGeometryI *meshGeometry) const
virtual size_t getNumFacets () const
virtual size_t getNumEdges () const
virtual size_t getNumNodes () const
virtual size_t getNodeIndex (size_t nod) const
virtual size_t appendNodesIndexOfFacet (size_t facet, std::vector< size_t > &facetNodes) const
virtual void getIsosurfTopology (unsigned char caseId, std::vector< std::pair< size_t, size_t > > &edgeList) const
virtual unsigned char getMarchingCaseId (std::vector< bool > &nodesSign, size_t beginNodeId=0) const
virtual double getRelativeSize (const MiGeometryI *meshGeometry) const
virtual bool isPointInsideCell (const MiGeometryI &meshGeometry, const MbVec3d &point, std::vector< double > &weights) const

Detailed Description

MeshViz Defines an Wedge cell of a volume mesh.

An Wedge cell has 6 faces which can be in any plane of the 3D space. Each face is a quadrangle not necessarily a square. The 4 first indices defines the polygon of a face of the Wedge. The 4 last indices defines the polygon of the opposite face.

Facets and nodes are numbered as following :

                                    n2               facet 0 = 012
                                    x                facet 1 = 354
                                 . / \               facet 2 = 0253
                              .   /   \              facet 3 = 1452
                           .     /     \             facet 4 = 0341
                        .       /       \
                   n5          /         \
                   x          /           \
                  / \     n0 x-------------x n1
                 /   \    .             .
                /     \.             .
               /    .  \          .
              /  .      \      .
             /.          \  .
         n3 x-------------x n4

  

Thus, appendNodesIndexOfFacet(0,faceNodes) appends the first 4 nodes of the cell in the array faceNodes, and appendNodesIndexOfFacet(1,faceNodes) appends the 4 last nodes of the cell in the array faceNodes.


Constructor & Destructor Documentation

MbWedgeCell::MbWedgeCell ( size_t  n0,
size_t  n1,
size_t  n2,
size_t  n3,
size_t  n4,
size_t  n5 
) [inline]

Construct an Wedge.


Member Function Documentation

virtual size_t MbWedgeCell::appendNodesIndexOfFacet ( size_t  facet,
std::vector< size_t > &  facetNodes 
) const [virtual]

Gets the node ids of the given face.

For instance appendNodesIndexOfFacet(0,facetNodes) append in the array facetNodes the node ids of the first face of this cell. the first node id of this cell.

Parameters:
facet must be in the interval [0-4] because an Wedges contains 5 faces.
facetNodes the returned list of facet nodes indices

Implements MiVolumeCell.

virtual void MbWedgeCell::getIsosurfTopology ( unsigned char  caseId,
std::vector< std::pair< size_t, size_t > > &  edgeList 
) const [inline, virtual]

Gets the list of topological polygons defining the part of the isosurface topology in this cell.


This method is used during isosurface and slice extraction on an unstructured mesh (for instance MoMeshPlaneSlice, MoMeshIsosurface, MiIsosurfExtractUnstructured). Static implementations are provided for the most common basic volume cells:

For polyhedral cells and non linear cells (for which no static implementation is available), returning an empty list can produce a hole in the isosurface. To avoid such a hole, this kind of cell must provide a decomposition into sub tetrahedra by the method getSubTetrahedronNodesIndex(). In case of polyhedral cells, one can also simply provide a polyhedral tessellator (

See also:
MiTessellator::getNewTessellatorPolyhedron()) to the isosurface extractor. To summarize:
  • For basic cell shape (hexahedron, tetrahedron, wedge, pyramid), implement this method for example by calling MxXXXXCellExtract::getIsosurfTopology() and do not override getSubTetrahedronNodesIndex().
  • Otherwise, implement this method by giving an empty edgeList and either implement getSubTetrahedronNodesIndex() to provide a sub tetrahedra decomposition or for polyhedral cells only, provide a polyhedral tessellator to the isosurface extractor.
Parameters:
caseId the isosurf "marching cube" entry for this cell. This is the value returned by getMarchingCaseId
edgeList the list of pairs of nodes defining the isosurface topology in this cell. The given vector should not be cleared by this method. New pairs of node ids are appended to this vector. Each pair of nodes must correspond to an edge of the cell which is cut by the isosurface. An edge is cut by the isosurface when the two nodes of the edge have different signs. The pair of nodes must be correctly ordered to define a non manifold polygon. When the isosurface part is made up of several polygons, extra polygons must be separated by specific pairs (for instance <-1,-1> for mandatory polygons and <-1,0> for optional polygons).

Implements MiVolumeCell.

virtual unsigned char MbWedgeCell::getMarchingCaseId ( std::vector< bool > &  nodesSign,
size_t  beginNodeId = 0 
) const [virtual]

Gets the isosurface "marching cube" entry according to the sign of each node in the cell.

The return entry corresponds to the first argument of getIsosurfTopology(). This method is used during isosurface and slice extraction on an unstructured mesh (for instance MoMeshPlaneSlice, MoMeshIsosurface, MiIsosurfExtractUnstructured).

Parameters:
nodesSign A vector containing as many booleans as the number of nodes in the mesh. nodesSign[i] is relative to the sign of the (isovalue-i-th node's value) .
beginNodeId is the first node id used by the mesh topology.
See also:
MiVolumeTopologyExplicitI::getBeginNodeId.
Returns:
a binary word containing as many bits as the number of nodes in the cell. the i-th bit in the returned word equals nodesSign[getNodeIndex(i)].
Note:
MeshViz XLM assumes that the cell does not contain any part of an isosurf if and only if the "marching cube" entry equals 0. Thus if all the bits in this word are 1, the method returns 0.

Reimplemented from MiVolumeCell.

virtual size_t MbWedgeCell::getNodeIndex ( size_t  nod  )  const [inline, virtual]

Gets a node id of this cell.

For instance getNodeIndex(0) returns the first node id of this cell.

Parameters:
nod must be in the interval [0-7]

Implements MiCell.

virtual size_t MbWedgeCell::getNumEdges (  )  const [inline, virtual]

Gets the number of edges.

virtual size_t MbWedgeCell::getNumFacets (  )  const [inline, virtual]

Gets the number of facets.

Implements MiVolumeCell.

virtual size_t MbWedgeCell::getNumNodes (  )  const [inline, virtual]

Gets the number of nodes.

Implements MiCell.

virtual double MbWedgeCell::getRelativeSize ( const MiGeometryI meshGeometry  )  const [inline, virtual]

Gets the relative size of the cell.


This method is used only by the MoMeshCellShape to display node names if using the relative offset feature and the streamline extraction to adapt the step integration to the size of the cell. getRelativeSize() should return a value depending on the size of the cell even if the default implementation returns 1. For instance, getRelativeSize() can return the length of the longest edge of this cell, or the length of its diagonal.

If getRelativeSize() returns a constant value for any cell, the stream line extraction uses a constant number of step integration anywhere in the mesh. Returning a constant implies that all the cells are supposed to have the same size. getRelativeSize() must not return 0.

Parameters:
[in] meshGeometry the geometry of the mesh. Used to retrieve the node coordinates of this cell.
Returns:
1 by default.

Reimplemented from MiCell.

double MbWedgeCell::getVolume ( const MiGeometryI meshGeometry  )  const [inline]

Gets the volume of the cell.

virtual bool MbWedgeCell::isPointInsideCell ( const MiGeometryI meshGeometry,
const MbVec3d point,
std::vector< double > &  weights 
) const [inline, virtual]

Checks if a point is inside or outside a cell.


This method is not pure virtual because it is not used by all extraction classes. However using an extraction class that uses this method (i.e. streamline) will generate an exception. An application does not need to override this method if no such extraction class is used.

Parameters:
[in] meshGeometry The geometry of the mesh. Used to retrieve the node coordinates of this cell.
[in] point The point to be checked.
[out] weights Must contain at least as many elements as the number of nodes in this cell (see getWeight()).
Returns:
True if the point is inside the cell.
Note:
For extraction purpose only, it is not nessessary to resize the weight vector array since extraction classes are optimized such as weight vectors passed to this method are already allocated and large enough to retrieve all the computed weights. Thus the following assignment is then sufficient:
  weight[i] = wi
  
for each i with 0 <= i < getNumNodes()

Reimplemented from MiCell.


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

Open Inventor by FEI reference manual, generated on 20 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/