A derived class used to define a mesh element. More...
#include <TriangleMeshElement.h>

Public Types | |
| using | ElementListPtr = MeshElementVectorPtr |
Public Member Functions | |
| MeshPoint< double > | centroid () const override |
| Return the centroid of the element. | |
| std::unique_ptr< MeshElement > | clone () const override |
| Clone the iterator. | |
| bool | containsPoint (const MeshPoint< double > &pos, double TOL=1e-12) const override |
| Return true if the element contains the point. | |
| bool | containsPoint (const std::vector< double > &pos, double TOL=1e-12) const |
| Return true if the element contains the point. | |
| MeshPoint< double > | coord () const override |
| Return the coordinates of all vertices composing the element. | |
| double | coord (int i) const |
| Return the coordinate of the vertex. | |
| virtual double | distance (const MeshPoint< double > &pos, const MeshPoint< double > &dir) const override |
| Calculate the distance to the element given a ray. | |
| std::string | elementClass () const override |
| Return the element class. | |
| GeomType | elementType () const |
| Return the element type. | |
| ElementListPtr | getElements (const GeomType type) const override |
| Return the elements composing the current element. | |
| int | getElementsID (const GeomType type, MeshElementID *ID) const override |
| Return the IDs of the elements composing the current element. | |
| ElementListPtr | getNeighbors () const override |
| Return the elements neighboring the current element. | |
| virtual void | getNeighborVertices (std::vector< Point > &vertices) const |
| const typeID & | getTypeID () const override |
| Get the typeID. | |
| virtual void | getVertices (std::vector< Point > &vertices) const |
| MeshElementID | globalID () const override |
| Return the unique global ID of the element. | |
| unsigned int | globalOwnerRank (const Mesh &mesh) const |
| Return the owner rank according to AMP_COMM_WORLD. | |
| bool | isInBlock (int id) const override |
| Check if the current element is in the given block. | |
| bool | isNull () const |
| Is the mesh element null. | |
| bool | isOnBoundary (int id) const override |
| Check if the current element is on the given boundary. | |
| bool | isOnSurface () const override |
| Check if the element is on the surface. | |
| MeshPoint< double > | nearest (const MeshPoint< double > &pos) const override |
| Calculate the nearest point on the element. | |
| MeshPoint< double > | norm () const override |
| Return the normal to the current element (does not apply to all elements) | |
| bool | operator!= (const MeshElement &rhs) const |
| bool | operator!= (const MeshElementID &rhs) const |
| bool | operator< (const MeshElement &rhs) const |
| bool | operator< (const MeshElementID &rhs) const |
| bool | operator<= (const MeshElement &rhs) const |
| bool | operator<= (const MeshElementID &rhs) const |
| TriangleMeshElement & | operator= (const TriangleMeshElement &) |
| Assignment operator. | |
| TriangleMeshElement & | operator= (TriangleMeshElement &&) |
| Move assignment operator. | |
| bool | operator== (const MeshElement &rhs) const |
| bool | operator== (const MeshElementID &rhs) const |
| bool | operator> (const MeshElement &rhs) const |
| bool | operator> (const MeshElementID &rhs) const |
| bool | operator>= (const MeshElement &rhs) const |
| bool | operator>= (const MeshElementID &rhs) const |
| std::string | print (uint8_t indent=0) const |
| Print info about the element. | |
| void | resetElemId (const ElementID &id) |
| TriangleMeshElement () | |
| Empty constructor for a MeshElement. | |
| TriangleMeshElement (const MeshElementID &id, const TriangleMesh< NG > *mesh) | |
| TriangleMeshElement (const TriangleMeshElement &) | |
| Copy constructor. | |
| TriangleMeshElement (TriangleMeshElement &&) | |
| Move operator. | |
| double | volume () const override |
| Return the volume of the current element (does not apply to vertices) | |
| virtual | ~TriangleMeshElement ()=default |
| De-constructor for a MeshElement. | |
Private Attributes | |
| MeshElementID | d_globalID |
| const TriangleMesh< NG > * | d_mesh |
A derived class used to define a mesh element.
This class provides routines for accessing and using a mesh element. A mesh element can be thought of as the smallest unit of a mesh. It is of a typeof GeomType. This class is derived to store a TriangleMesh element.
Definition at line 26 of file TriangleMeshElement.h.
|
inherited |
Definition at line 29 of file MeshElement.h.
| AMP::Mesh::TriangleMeshElement< NG >::TriangleMeshElement | ( | ) |
Empty constructor for a MeshElement.
| AMP::Mesh::TriangleMeshElement< NG >::TriangleMeshElement | ( | const TriangleMeshElement< NG > & | ) |
Copy constructor.
| AMP::Mesh::TriangleMeshElement< NG >::TriangleMeshElement | ( | TriangleMeshElement< NG > && | ) |
Move operator.
|
virtualdefault |
De-constructor for a MeshElement.
| AMP::Mesh::TriangleMeshElement< NG >::TriangleMeshElement | ( | const MeshElementID & | id, |
| const TriangleMesh< NG > * | mesh | ||
| ) |
|
overridevirtual |
Return the centroid of the element.
This function returns the centroid of the element. The centroid is defined as the average of the coordinates of the vertices. The centroid of a vertex is the vertex and will return the same result as coord().
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Clone the iterator.
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Return true if the element contains the point.
This function checks if the given point is inside or within TOL of the given element. If the current element is a vertex, this function checks if the point is with TOL of the vertex.
| pos | The coordinates of the point to check. |
| TOL | The tolerance to use for the computation. |
Reimplemented from AMP::Mesh::MeshElement.
|
inherited |
Return true if the element contains the point.
This function checks if the given point is inside or within TOL of the given element. If the current element is a vertex, this function checks if the point is with TOL of the vertex.
| pos | The coordinates of the point to check. |
| TOL | The tolerance to use for the computation. |
|
overridevirtual |
Return the coordinates of all vertices composing the element.
Reimplemented from AMP::Mesh::MeshElement.
|
inlineinherited |
Return the coordinate of the vertex.
This function returns the coordinates of the vertex in the given direction (only applies to vertices).
| i | The direction requested. Equivalent to coord()[i] |
Definition at line 61 of file MeshElement.h.
References AMP::Mesh::MeshElement::coord().
Referenced by AMP::Mesh::MeshElement::coord().
|
overridevirtual |
Calculate the distance to the element given a ray.
This function computes the distance to the element given a ray. If the ray will never intersect the element, this distance is inf.
| [in] | pos | Current position of ray |
| [in] | dir | Direction of ray (should be normalized for most uses) |
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Return the element class.
Reimplemented from AMP::Mesh::MeshElement.
|
inlineinherited |
Return the element type.
Definition at line 39 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID(), and AMP::Mesh::MeshElementID::type().
|
overridevirtual |
Return the elements composing the current element.
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Return the IDs of the elements composing the current element.
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Return the elements neighboring the current element.
Reimplemented from AMP::Mesh::MeshElement.
|
virtualinherited |
Return the vertex coordinates for all neighboring elements excluding verticies composing the current element. Note the default implementation will call getNeighbors followed by getVertices, derived classes may implement a more efficient alternative
|
overridevirtual |
Get the typeID.
Reimplemented from AMP::Mesh::MeshElement.
|
virtualinherited |
Return the vertex coordinates composing the current element. For a node, this will return the equivalent to coord(). For an element, this will return the equivalent to getElements(Vertex)->coord(). Note the default implementation will call getElements followed by coord, derived classes may implement a more efficient alternative
Reimplemented in AMP::Mesh::structuredMeshElement.
|
inlineoverridevirtual |
Return the unique global ID of the element.
Reimplemented from AMP::Mesh::MeshElement.
Definition at line 48 of file TriangleMeshElement.h.
References AMP::Mesh::TriangleMeshElement< NG >::d_globalID.
|
inherited |
Return the owner rank according to AMP_COMM_WORLD.
|
overridevirtual |
Check if the current element is in the given block.
Check if the current element is in the block specified by the given id
| id | The block id to check |
Reimplemented from AMP::Mesh::MeshElement.
|
inlineinherited |
Is the mesh element null.
Definition at line 36 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID(), and AMP::Mesh::MeshElementID::isNull().
|
overridevirtual |
Check if the current element is on the given boundary.
Check if the current element is on the boundary specified by the given id
| id | The boundary id to check |
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Check if the element is on the surface.
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Calculate the nearest point on the element.
This function computes nearest point on/in the element to the given point
| [in] | pos | Current position of the point |
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Return the normal to the current element (does not apply to all elements)
Reimplemented from AMP::Mesh::MeshElement.
|
inlineinherited |
Definition at line 43 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 49 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 44 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 50 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 46 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 52 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
| TriangleMeshElement & AMP::Mesh::TriangleMeshElement< NG >::operator= | ( | const TriangleMeshElement< NG > & | ) |
Assignment operator.
| TriangleMeshElement & AMP::Mesh::TriangleMeshElement< NG >::operator= | ( | TriangleMeshElement< NG > && | ) |
Move assignment operator.
|
inlineinherited |
Definition at line 42 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 48 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 45 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 51 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 47 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inlineinherited |
Definition at line 53 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID().
|
inherited |
Print info about the element.
This function returns debug info about the element
| indent | The number of spaces to indent new lines |
|
inline |
Definition at line 133 of file TriangleMeshElement.h.
References AMP::Mesh::TriangleMeshElement< NG >::d_globalID, and AMP::Mesh::MeshElementID::resetElemID().
|
overridevirtual |
Return the volume of the current element (does not apply to vertices)
Reimplemented from AMP::Mesh::MeshElement.
|
private |
Definition at line 140 of file TriangleMeshElement.h.
Referenced by AMP::Mesh::TriangleMeshElement< NG >::globalID(), and AMP::Mesh::TriangleMeshElement< NG >::resetElemId().
|
private |
Definition at line 141 of file TriangleMeshElement.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:43. Comments on this page |