Defines an abstract cell of a line mesh. More...
#include <MeshVizXLM/mesh/cell/MiLineCell.h>
Public Member Functions | |
virtual size_t | getSubEdgeNodesIndex (std::vector< size_t > &edgeNodeIds) const |
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);
virtual size_t MiLineCell::getSubEdgeNodesIndex | ( | std::vector< size_t > & | edgeNodeIds | ) | const [inline, virtual] |
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.
[out] | edgeNodeIds | sub edge node id (where: 0 <= edgeNodeIds[i] < getNumNodes() for each i). |