Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
MiLineCell Class Reference

MeshViz Defines an abstract cell of a line mesh. More...

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

+ Inheritance diagram for MiLineCell:

Public Member Functions

virtual size_t getSubEdgeNodesIndex (std::vector< size_t > &edgeNodeIds) const
 Get a decomposition of this cell into sub linear segments.
 
- Public Member Functions inherited from MiCell
virtual ~MiCell ()
 Virtual destructor.
 
virtual size_t getNumNodes () const =0
 Gets the number of nodes.
 
virtual size_t getNodeIndex (size_t node) const =0
 Gets the index (in the mesh) of a node.
 
virtual double getRelativeSize (const MiGeometryI *meshGeometry) const
 Gets the relative size of the cell.
 
virtual void getWeight (const MbVec3d &ipcoord, std::vector< double > &weight) const
 Gets the weights of a point defined by its iso parametric coordinates.
 
virtual MbVec3d getIsoParametricCoord (size_t nodeIndex) const
 Gets the iso parametric coordinates of a cell's node.
 
virtual MbVec3d getCenter (const MiGeometryI &geometry) const
 Gets the center of the cell.
 
virtual bool isPointInsideCell (const MiGeometryI &meshGeometry, const MbVec3d &point, std::vector< double > &weights) const
 Checks if a point is inside or outside a cell.
 

Additional Inherited Members

- Protected Member Functions inherited from MiCell
virtual std::ostream & toStream (std::ostream &s) const
 Performs an output operation on a stream which is returned afterward.
 

Detailed Description

MeshViz Defines an abstract cell of a line mesh.

A line cell is an edge element that connects adjacent nodes of a line mesh. This class defines the method getSubEdgeNodesIndex() that is only useful for non linear 1D cells. For linear 1D cells, the application must just provide the implementation of the methods defined in MiCell without overriding getSubEdgeNodesIndex().

When the result of getSubEdgeNodesIndex() is > 0, the cell is considered as a non linear cell. In that case, the given sub segments are used by the miscellaneous extractors (for instance MiTessellatedLineExtract). Furthermore if a MiTessellator is given, each sub segment is tessellated by the method MiTessellator::tessellateLineCell().

The implementation of all the methods of this class must be thread-safe because it might be called concurrently by multiple threads. If the implementation can't be thread-safe, MeshViz XLM must be forced to use only 1 thread. It can be done by calling MiMeshViz::init(1) or MoMeshViz::init(1) or setting the parallel argument to false for each extractor instantiation. For instance by calling MiSkinExtractUnstructured::getNewInstance(&mesh, false);

See also
MiTessellator, MbLineCell, MeXLineCell

Definition at line 59 of file MiLineCell.h.

Member Function Documentation

◆ getSubEdgeNodesIndex()

virtual size_t MiLineCell::getSubEdgeNodesIndex ( std::vector< size_t > &  edgeNodeIds) const
inlinevirtual

Get a decomposition of this cell into sub linear segments.


This method must be overridden to correctly handle non-linear cells. For instance an implementation of this method for a quadratic bar like the following one

Quadratic bar

should return 2, and edgeNodeIds = {0,2,2,1}. (provided that getNodeIndex(2) corresponds to the middle point of this bar).

By default it returns 0 and the argument edgeNodeIds is not modified.

Parameters
[out]edgeNodeIdssub edge node id (where: 0 <= edgeNodeIds[i] < getNumNodes() for each i).
Returns
the number of sub linear segments in this cell.

Definition at line 76 of file MiLineCell.h.


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