1#ifndef included_AMP_TriangleMeshElement
2#define included_AMP_TriangleMeshElement
5#include "AMP/mesh/MeshElement.h"
136 std::unique_ptr<MeshElement>
clone()
const override;
A pointer class to wrap a MeshElementVector.
A derived class used to define a mesh element.
bool containsPoint(const MeshPoint< double > &pos, double TOL=1e-12) const override
Return true if the element contains the point.
void resetElemId(const ElementID &id)
MeshElementID globalID() const override
Return the unique global ID of the element.
TriangleMeshElement(const TriangleMeshElement &)
Copy constructor.
MeshPoint< double > centroid() const override
Return the centroid of the element.
ElementListPtr getNeighbors() const override
Return the elements neighboring the current element.
MeshPoint< double > coord() const override
Return the coordinates of all vertices composing the element.
TriangleMeshElement & operator=(TriangleMeshElement &&)
Move assignment operator.
bool isOnSurface() const override
Check if the element is on the surface.
double volume() const override
Return the volume of the current element (does not apply to vertices)
TriangleMeshElement & operator=(const TriangleMeshElement &)
Assignment operator.
bool isOnBoundary(int id) const override
Check if the current element is on the given boundary.
ElementListPtr getElements(const GeomType type) const override
Return the elements composing the current element.
MeshPoint< double > nearest(const MeshPoint< double > &pos) const override
Calculate the nearest point on the element.
TriangleMeshElement(TriangleMeshElement &&)
Move operator.
std::unique_ptr< MeshElement > clone() const override
Clone the iterator.
int getElementsID(const GeomType type, MeshElementID *ID) const override
Return the IDs of the elements composing the current element.
std::string elementClass() const override
Return the element class.
MeshPoint< double > norm() const override
Return the normal to the current element (does not apply to all elements)
virtual ~TriangleMeshElement()=default
De-constructor for a MeshElement.
bool isInBlock(int id) const override
Check if the current element is in the given block.
TriangleMeshElement(const MeshElementID &id, const TriangleMesh< NG > *mesh)
virtual double distance(const MeshPoint< double > &pos, const MeshPoint< double > &dir) const override
Calculate the distance to the element given a ray.
const TriangleMesh< NG > * d_mesh
const typeID & getTypeID() const override
Get the typeID.
TriangleMeshElement()
Empty constructor for a MeshElement.
A class used to represent an unstructured mesh of Triangles/Tetrahedrals.
GeomType
Enumeration for basic mesh-based quantities.
A structure used to identify an element within a mesh.
A structure used to identify the mesh element.
constexpr void resetElemID(ElementID elem_id)
Class to store type info.