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

Public Types | |
| using | ElementListPtr = MeshElementVectorPtr |
Public Member Functions | |
| Point | centroid () const override |
| Return the centroid of the element. | |
| bool | containsPoint (const Point &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. | |
| Point | coord () const override final |
| Return the coordinates of the vertex (only applies to vertices) | |
| double | coord (int i) const |
| Return the coordinate of the vertex. | |
| 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. | |
| virtual ElementListPtr | getElements (const GeomType type) const |
| Return the elements composing the current element. | |
| ElementListPtr | getElements (const GeomType) const override |
| Return the elements composing the current element. | |
| int | getElementsID (const GeomType, MeshElementID *) const override |
| Return the IDs of the elements composing the current element. | |
| const auto & | getIndex () const |
| Return the index of the element. | |
| int | getNeighborIndex (BoxMesh::MeshElementIndex *index) const |
| virtual ElementListPtr | getNeighbors () const |
| ElementListPtr | getNeighbors () const override |
| virtual void | getNeighborVertices (std::vector< Point > &vertices) const |
| ElementListPtr | getParents (GeomType type) const |
| Get the parents of the given element. | |
| const typeID & | getTypeID () const override |
| Return the typeID of the underlying element. | |
| void | getVertices (std::vector< Point > &vertices) const override |
| 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. | |
| Point | 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 |
| structuredMeshElement & | operator= (const structuredMeshElement &) |
| 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 | reset () |
| Reset the internal data to an empty element. | |
| void | reset (const BoxMesh::MeshElementIndex &index, const AMP::Mesh::BoxMesh *mesh) |
| Reset the internal data to the given element. | |
| structuredMeshElement () | |
| Empty constructor for a MeshElement. | |
| structuredMeshElement (const BoxMesh::MeshElementIndex &index, const AMP::Mesh::BoxMesh *mesh) | |
| structuredMeshElement (const structuredMeshElement &) | |
| Copy constructor. | |
| double | volume () const override |
| Return the volume of the current element (does not apply to vertices) | |
| virtual | ~structuredMeshElement () |
| De-constructor for a MeshElement. | |
Protected Member Functions | |
| std::unique_ptr< MeshElement > | clone () const override |
| Clone the element. | |
| std::array< int8_t, 3 > | getBC () const |
| void | getElementIndex (const GeomType type, int &N, BoxMesh::MeshElementIndex *index) const |
| void | reset (const BoxMesh::MeshElementIndex &index) |
Protected Attributes | |
| BoxMesh::MeshElementIndex | d_index |
| const AMP::Mesh::BoxMesh * | d_mesh |
| GeomType | d_meshType |
| unsigned char | d_physicalDim |
Friends | |
| class | AMP::Mesh::BoxMesh |
| class | AMP::Mesh::structuredMeshIterator |
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 type of GeomType. This class is derived to store a libMesh element.
Definition at line 19 of file structuredMeshElement.h.
|
inherited |
Definition at line 29 of file MeshElement.h.
| AMP::Mesh::structuredMeshElement::structuredMeshElement | ( | ) |
Empty constructor for a MeshElement.
| AMP::Mesh::structuredMeshElement::structuredMeshElement | ( | const structuredMeshElement & | ) |
Copy constructor.
|
virtual |
De-constructor for a MeshElement.
| AMP::Mesh::structuredMeshElement::structuredMeshElement | ( | const BoxMesh::MeshElementIndex & | index, |
| const AMP::Mesh::BoxMesh * | mesh | ||
| ) |
Default constructor
| index | Index for the current elements |
| mesh | Underlying 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.
|
overrideprotectedvirtual |
Clone the element.
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. |
|
inlinefinaloverridevirtual |
Return the coordinates of the vertex (only applies to vertices)
Reimplemented from AMP::Mesh::MeshElement.
Definition at line 67 of file structuredMeshElement.h.
References AMP::Mesh::BoxMesh::coord(), d_index, d_mesh, d_physicalDim, AMP::Mesh::MeshPoint< TYPE >::data(), and AMP::Mesh::MeshPoint< TYPE >::setNdim().
|
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.
|
inlineoverridevirtual |
Return the element class.
Reimplemented from AMP::Mesh::MeshElement.
Definition at line 60 of file structuredMeshElement.h.
|
inlineinherited |
Return the element type.
Definition at line 39 of file MeshElement.h.
References AMP::Mesh::MeshElement::globalID(), and AMP::Mesh::MeshElementID::type().
|
protected |
|
protected |
|
virtual |
Return the elements composing the current element.
Reimplemented from AMP::Mesh::MeshElement.
|
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.
|
inline |
Return the index of the element.
Definition at line 54 of file structuredMeshElement.h.
References d_index.
| int AMP::Mesh::structuredMeshElement::getNeighborIndex | ( | BoxMesh::MeshElementIndex * | index | ) | const |
|
virtual |
Return the elements neighboring the current element. One neighbor is returned for each side of the element. If the side is on the surface, then it's neighbor is null. For Verticies, a list of all vertices that share an element is returned. This list is in unsorted order.
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
Return the elements neighboring the current element. One neighbor is returned for each side of the element. If the side is on the surface, then it's neighbor is null. For Verticies, a list of all vertices that share an element is returned. This list is in unsorted order.
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
| ElementListPtr AMP::Mesh::structuredMeshElement::getParents | ( | GeomType | type | ) | const |
Get the parents of the given element.
This function will get the parent elements of the current element
| type | The desired type of the parents to get |
|
overridevirtual |
Return the typeID of the underlying element.
Reimplemented from AMP::Mesh::MeshElement.
|
overridevirtual |
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 from AMP::Mesh::MeshElement.
|
inlineoverridevirtual |
Return the unique global ID of the element.
Reimplemented from AMP::Mesh::MeshElement.
Definition at line 59 of file structuredMeshElement.h.
References AMP::Mesh::BoxMesh::convert(), d_index, and d_mesh.
|
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().
| structuredMeshElement & AMP::Mesh::structuredMeshElement::operator= | ( | const structuredMeshElement & | ) |
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 |
| void AMP::Mesh::structuredMeshElement::reset | ( | ) |
Reset the internal data to an empty element.
|
inlineprotected |
Definition at line 102 of file structuredMeshElement.h.
References d_index.
| void AMP::Mesh::structuredMeshElement::reset | ( | const BoxMesh::MeshElementIndex & | index, |
| const AMP::Mesh::BoxMesh * | mesh | ||
| ) |
Reset the internal data to the given element.
|
overridevirtual |
Return the volume of the current element (does not apply to vertices)
Reimplemented from AMP::Mesh::MeshElement.
|
friend |
Definition at line 104 of file structuredMeshElement.h.
|
friend |
Definition at line 105 of file structuredMeshElement.h.
|
protected |
Definition at line 94 of file structuredMeshElement.h.
Referenced by coord(), getIndex(), globalID(), and reset().
|
protected |
Definition at line 95 of file structuredMeshElement.h.
Referenced by coord(), and globalID().
|
protected |
Definition at line 92 of file structuredMeshElement.h.
|
protected |
Definition at line 93 of file structuredMeshElement.h.
Referenced by coord().
|
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 |