Utility class for quadratic triangle cells with 6 nodes.
More...
#include <MeshVizXLM/extractors/MxTriangle6CellExtract.h>
Static Public Member Functions | |
| static MbVec3d | getIsoParametricCoord (const MiGeometryI &meshGeometry, const MiSurfaceCell *triangleCell, const MbVec3d &point) |
| static MbVec3d | getIsoParametricCoord (size_t nodeIndex) |
| static void | getWeight (const MiGeometryI &meshGeometry, const MiSurfaceCell *triangleCell, const MbVec3d &point, std::vector< double > &weights) |
| static void | getWeight (const MbVec3d &ipcoord, std::vector< double > &weights) |
| static void | getDerivs (const MbVec3d &ipcoord, std::vector< double > &derivs) |
| static bool | isPointInsideCell (const MiGeometryI &meshGeometry, const MiSurfaceCell *triangleCell, const MbVec3d &point, std::vector< double > &weights) |
| static size_t | getSubTriangleNodesIndex (std::vector< size_t > &triangleNodeIds) |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const MxTriangle6CellExtract &cell) |
Utility class for quadratic triangle cells with 6 nodes.
Utility class that provides a static implementation of the MiSurfaceCell interface methods for a quadratic triangle cell of 6 nodes. This class is provided to make it easier to create a class that implements the MiSurfaceCell interface for a quadratic triangle of 6 nodes.
The following image shows the node numbering used by this class. The weights (see getWeight()), and parametric coordinates (see getIsoParametricCoord()) are defined according to this node numbering.
Nodes numbering
| static void MxTriangle6CellExtract::getDerivs | ( | const MbVec3d & | ipcoord, | |
| std::vector< double > & | derivs | |||
| ) | [static] |
Gets the value of the derivatives of the shape functions (aka weights) at the point given by its iso parametric coordinates.
| [in] | ipcoord | The iso parametric coordinates of the input point. The reference space for the iso parametric coordinates is assumed to be [0-1]. Thus any point inside the cell has iso parametric coordinates in the interval [0-1]. |
| [out] | derivs | This method computes the 27 values derivs[0-26]. It assumes the derivs vector array has been already allocated. Its size must be set to 27 (at least) before calling this method, using for instance the derivs::resize(27) |
| static MbVec3d MxTriangle6CellExtract::getIsoParametricCoord | ( | size_t | nodeIndex | ) | [inline, static] |
Returns the iso parametric coordinates of one of the 6 nodes of a triangle cell.
This static method helps to implement the method MiCell::getIsoParametricCoord().
| [in] | nodeIndex | Must be defined in the range [0-5] |
| static MbVec3d MxTriangle6CellExtract::getIsoParametricCoord | ( | const MiGeometryI & | meshGeometry, | |
| const MiSurfaceCell * | triangleCell, | |||
| const MbVec3d & | point | |||
| ) | [static] |
Computes the iso parametric coordinates of the given point in the given cell with the given geometry.
As computing the iso parametric coordinates of a point needs the coordinates of the cell's nodes, the given triangleCell is assumed to contain 6 nodes.
meshGeometry.getCoord(triangleCell->getNodeIndex(i))
| [in] | meshGeometry | The geometry of the mesh. |
| [in] | triangleCell | The input cell. |
| [in] | point | The input point given in the same space coordinate as meshGeometry. |
| static size_t MxTriangle6CellExtract::getSubTriangleNodesIndex | ( | std::vector< size_t > & | triangleNodeIds | ) | [inline, static] |
Gets a triangulation of a quadratic triangle of 6 nodes.
This static method helps to implement the method MiSurfaceCell::getSubTriangleNodesIndex() for a quadratic triangle of 6 nodes.
| [out] | triangleNodeIds | Sub triangle node ids (where: 0 <= triangleNodeIds[i] < 6 for each i). |
| void MxTriangle6CellExtract::getWeight | ( | const MbVec3d & | ipcoord, | |
| std::vector< double > & | weights | |||
| ) | [inline, static] |
Gets the weights of a point defined by its iso parametric coordinates.
This static method helps to implement the method MiCell::getWeight(ipcoord,weights) for a triangle cell.
| [in] | ipcoord | The iso parametric coordinates of the input point. The reference space for the iso parametric coordinates is assumed to be [0-1]. Thus any point inside the cell has iso parametric coordinates in the interval [0-1]. |
| [out] | weights | This method computes the 6 values weights[0-5]. It assumes the weights vector array has been already allocated. Its size must be set to 6 (at least) before calling this method, using for instance the weights::resize(6) |
| static void MxTriangle6CellExtract::getWeight | ( | const MiGeometryI & | meshGeometry, | |
| const MiSurfaceCell * | triangleCell, | |||
| const MbVec3d & | point, | |||
| std::vector< double > & | weights | |||
| ) | [inline, static] |
Gets the weights in the given cell of the given point.
This static method helps to implement the method MiCell::getWeight(meshGeometry,point,weights) for a triangle cell. As computing the weights of a point needs the coordinates of the cell's nodes, the given triangleCell is assumed to contain 6 nodes.
meshGeometry.getCoord(triangleCell->getNodeIndex(i))
| [in] | meshGeometry | The geometry of the mesh. |
| [in] | triangleCell | The input cell. |
| [in] | point | The input point given in the same space coordinate as meshGeometry. |
| [out] | weights | This method computes the 6 values weights[0-5]. It assumes the weights vector array has been already allocated. Its size must be set to 6 (at least) before calling this method, using for instance the weights.resize(6) |
| static bool MxTriangle6CellExtract::isPointInsideCell | ( | const MiGeometryI & | meshGeometry, | |
| const MiSurfaceCell * | triangleCell, | |||
| const MbVec3d & | point, | |||
| std::vector< double > & | weights | |||
| ) | [inline, static] |
Checks if a point is inside or outside a triangle cell.
This static method helps to implement the method MiCell::isPointInsideCell(meshGeometry,point,weights) for a triangle cell.
| [in] | meshGeometry | The geometry of the mesh. |
| [in] | triangleCell | The input cell. |
| [in] | point | The input point given in the same space coordinate as meshGeometry. |
| [out] | weights | This method computes the 6 values weights[0-5] if the point is inside the cell. It assumes the weights vector array has been already allocated. Its size must be set to 6 (at least) before calling this method, using for instance the weights::resize(6) |
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const MxTriangle6CellExtract & | cell | |||
| ) | [friend] |