Nektar++
|
Base class for element definitions. More...
#include <MeshElements.h>
Public Member Functions | |
Element (ElmtConfig pConf, unsigned int pNumNodes, unsigned int pGotNodes) | |
unsigned int | GetId () const |
Returns the ID of the element (or associated edge or face for boundary elements). | |
unsigned int | GetDim () const |
Returns the expansion dimension of the element. | |
ElmtConfig | GetConf () const |
Returns the configuration of the element. | |
std::string | GetTag () const |
Returns the tag which defines the element shape. | |
NodeSharedPtr | GetVertex (unsigned int i) const |
Access a vertex node. | |
EdgeSharedPtr | GetEdge (unsigned int i) const |
Access an edge. | |
FaceSharedPtr | GetFace (unsigned int i) const |
Access a face. | |
std::vector< NodeSharedPtr > | GetVertexList () const |
Access the list of vertex nodes. | |
std::vector< EdgeSharedPtr > | GetEdgeList () const |
Access the list of edges. | |
std::vector< FaceSharedPtr > | GetFaceList () const |
Access the list of faces. | |
std::vector< NodeSharedPtr > | GetVolumeNodes () const |
Access the list of volume nodes. | |
void | SetVolumeNodes (std::vector< NodeSharedPtr > &nodes) |
LibUtilities::PointsType | GetCurveType () const |
void | SetCurveType (LibUtilities::PointsType cT) |
unsigned int | GetNodeCount () const |
Returns the total number of nodes (vertices, edge nodes and face nodes and volume nodes). | |
std::vector< int > | GetTagList () const |
Access the list of tags associated with this element. | |
unsigned int | GetVertexCount () const |
Returns the number of vertices. | |
unsigned int | GetEdgeCount () const |
Returns the number of edges. | |
unsigned int | GetFaceCount () const |
Returns the number of faces. | |
void | SetId (unsigned int p) |
Change the ID of the element. | |
void | SetVertex (unsigned int p, NodeSharedPtr pNew) |
Replace a vertex with another vertex object. | |
void | SetEdge (unsigned int p, EdgeSharedPtr pNew) |
Replace an edge with another edge object. | |
void | SetFace (unsigned int p, FaceSharedPtr pNew) |
Replace a face with another face object. | |
void | SetEdgeLink (EdgeSharedPtr pLink) |
Set a correspondence between this element and an edge (2D boundary element). | |
EdgeSharedPtr | GetEdgeLink () |
Get correspondence between this element and an edge. | |
void | SetFaceLink (FaceSharedPtr pLink) |
Set a correspondence between this element and a face (3D boundary element). | |
FaceSharedPtr | GetFaceLink () |
Get correspondence between this element and a face. | |
void | SetBoundaryLink (int i, int j) |
Set a correspondence between edge or face i and its representative boundary element m->element[expDim-1][j]. | |
int | GetBoundaryLink (int i) |
Get the location of the boundary face/edge i for this element. | |
void | SetTagList (const std::vector< int > &tags) |
Set the list of tags associated with this element. | |
virtual std::string | GetXmlString () const |
Generate a list of vertices (1D), edges (2D), or faces (3D). | |
std::string | GetXmlCurveString () const |
Generates a string listing the coordinates of all nodes associated with this element. | |
virtual SpatialDomains::GeometrySharedPtr | GetGeom (int coordDim) |
Generate a Nektar++ geometry object for this element. | |
int | GetMaxOrder () |
Obtain the order of an element by looking at edges. | |
virtual void | Complete (int order) |
Complete this object. | |
void | Print () |
Protected Attributes | |
unsigned int | m_id |
ID of the element. | |
unsigned int | m_dim |
Dimension of the element. | |
ElmtConfig | m_conf |
Contains configuration of the element. | |
std::string | m_tag |
Tag character describing the element. | |
std::vector< int > | m_taglist |
List of integers specifying properties of the element. | |
std::vector< NodeSharedPtr > | m_vertex |
List of element vertex nodes. | |
std::vector< EdgeSharedPtr > | m_edge |
List of element edges. | |
std::vector< FaceSharedPtr > | m_face |
List of element faces. | |
std::vector< NodeSharedPtr > | m_volumeNodes |
List of element volume nodes. | |
LibUtilities::PointsType | m_curveType |
Volume curve type. | |
EdgeSharedPtr | m_edgeLink |
Pointer to the corresponding edge if element is a 2D boundary. | |
FaceSharedPtr | m_faceLink |
Pointer to the corresponding face if element is a 3D boundary. | |
std::map< int, int > | m_boundaryLinks |
Array mapping faces/edges to the location of the appropriate boundary elements in m->element. | |
SpatialDomains::GeometrySharedPtr | m_geom |
Nektar++ geometry object for this element. |
Base class for element definitions.
An element is defined by a list of vertices, edges and faces (depending on the dimension of the problem). This base class provides the underlying structure.
Definition at line 647 of file MeshElements.h.
Element::Element | ( | ElmtConfig | pConf, |
unsigned int | pNumNodes, | ||
unsigned int | pGotNodes | ||
) |
Definition at line 68 of file MeshElements.cpp.
References Nektar::Utilities::ElmtConfig::m_e.
|
inlinevirtual |
Complete this object.
Reimplemented in Nektar::Utilities::Prism, Nektar::Utilities::Tetrahedron, Nektar::Utilities::Quadrilateral, and Nektar::Utilities::Triangle.
Definition at line 932 of file MeshElements.h.
References ASSERTL0.
|
inline |
Get the location of the boundary face/edge i for this element.
Definition at line 781 of file MeshElements.h.
References Nektar::iterator.
|
inline |
Returns the configuration of the element.
Definition at line 665 of file MeshElements.h.
|
inline |
Definition at line 705 of file MeshElements.h.
References Nektar::Utilities::Face::m_curveType.
|
inline |
Returns the expansion dimension of the element.
Definition at line 661 of file MeshElements.h.
|
inline |
|
inline |
Returns the number of edges.
Definition at line 740 of file MeshElements.h.
|
inline |
Get correspondence between this element and an edge.
Definition at line 763 of file MeshElements.h.
|
inline |
Access the list of edges.
Definition at line 691 of file MeshElements.h.
Referenced by Nektar::Utilities::Triangle::create(), and Nektar::Utilities::Quadrilateral::create().
|
inline |
|
inline |
Returns the number of faces.
Definition at line 744 of file MeshElements.h.
|
inline |
Get correspondence between this element and a face.
Definition at line 772 of file MeshElements.h.
|
inline |
Access the list of faces.
Definition at line 695 of file MeshElements.h.
Referenced by Nektar::Utilities::Tetrahedron::create(), Nektar::Utilities::Pyramid::create(), Nektar::Utilities::Prism::create(), and Nektar::Utilities::Hexahedron::create().
|
inlinevirtual |
Generate a Nektar++ geometry object for this element.
Reimplemented in Nektar::Utilities::Hexahedron, Nektar::Utilities::Prism, Nektar::Utilities::Pyramid, Nektar::Utilities::Tetrahedron, Nektar::Utilities::Quadrilateral, Nektar::Utilities::Triangle, and Nektar::Utilities::Line.
Definition at line 925 of file MeshElements.h.
References ASSERTL0.
|
inline |
Returns the ID of the element (or associated edge or face for boundary elements).
Definition at line 655 of file MeshElements.h.
References Nektar::Utilities::Face::m_id.
int Element::GetMaxOrder | ( | ) |
Obtain the order of an element by looking at edges.
Definition at line 308 of file MeshElements.cpp.
References m_edge.
|
inline |
Returns the total number of nodes (vertices, edge nodes and face nodes and volume nodes).
Definition at line 713 of file MeshElements.h.
|
inline |
Returns the tag which defines the element shape.
Definition at line 669 of file MeshElements.h.
|
inline |
Access the list of tags associated with this element.
Definition at line 732 of file MeshElements.h.
|
inline |
Access a vertex node.
Definition at line 675 of file MeshElements.h.
Referenced by Nektar::Utilities::InputNek::Process().
|
inline |
Returns the number of vertices.
Definition at line 736 of file MeshElements.h.
|
inline |
Access the list of vertex nodes.
Definition at line 687 of file MeshElements.h.
|
inline |
Access the list of volume nodes.
Definition at line 699 of file MeshElements.h.
|
inline |
Generates a string listing the coordinates of all nodes associated with this element.
Definition at line 827 of file MeshElements.h.
|
inlinevirtual |
Generate a list of vertices (1D), edges (2D), or faces (3D).
Definition at line 798 of file MeshElements.h.
|
inline |
Definition at line 936 of file MeshElements.h.
|
inline |
Set a correspondence between edge or face i and its representative boundary element m->element[expDim-1][j].
Definition at line 777 of file MeshElements.h.
|
inline |
Definition at line 708 of file MeshElements.h.
References Nektar::Utilities::Face::m_curveType.
void Element::SetEdge | ( | unsigned int | p, |
EdgeSharedPtr | pNew | ||
) |
Replace an edge with another edge object.
Replace an edge in the element.
When an edge is replaced, the element faces are also searched and the corresponding face edges are updated to maintain consistency.
p | Index of the edge to replace. |
pNew | New edge. |
Definition at line 276 of file MeshElements.cpp.
|
inline |
Set a correspondence between this element and an edge (2D boundary element).
Definition at line 759 of file MeshElements.h.
void Element::SetFace | ( | unsigned int | p, |
FaceSharedPtr | pNew | ||
) |
Replace a face with another face object.
Replace a face in the element.
When a face is replaced, no other consistency checks are required.
p | Index of the face to replace. |
pNew | New face. |
Definition at line 300 of file MeshElements.cpp.
References m_face.
|
inline |
Set a correspondence between this element and a face (3D boundary element).
Definition at line 768 of file MeshElements.h.
|
inline |
Change the ID of the element.
Definition at line 748 of file MeshElements.h.
References Nektar::Utilities::Face::m_id.
|
inline |
Set the list of tags associated with this element.
Definition at line 793 of file MeshElements.h.
void Element::SetVertex | ( | unsigned int | p, |
NodeSharedPtr | pNew | ||
) |
Replace a vertex with another vertex object.
Replace a vertex in the element.
When a vertex is replaced, the element edges and faces are also searched and the corresponding edge/face nodes are updated to maintain consistency.
p | Index of the vertex to replace. |
pNew | New vertex. |
Definition at line 228 of file MeshElements.cpp.
References m_edge, m_face, and m_vertex.
|
inline |
Definition at line 702 of file MeshElements.h.
|
protected |
Array mapping faces/edges to the location of the appropriate boundary elements in m->element.
Definition at line 988 of file MeshElements.h.
|
protected |
Contains configuration of the element.
Definition at line 967 of file MeshElements.h.
Referenced by Nektar::Utilities::Triangle::Complete(), Nektar::Utilities::Quadrilateral::Complete(), Nektar::Utilities::Tetrahedron::Complete(), Nektar::Utilities::Prism::Complete(), Nektar::Utilities::Hexahedron::Hexahedron(), Nektar::Utilities::Line::Line(), Nektar::Utilities::Prism::Prism(), Nektar::Utilities::Pyramid::Pyramid(), Nektar::Utilities::Quadrilateral::Quadrilateral(), Nektar::Utilities::Tetrahedron::Tetrahedron(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
Volume curve type.
Definition at line 981 of file MeshElements.h.
Referenced by Nektar::Utilities::Line::GetGeom(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
Dimension of the element.
Definition at line 965 of file MeshElements.h.
Referenced by Nektar::Utilities::Hexahedron::Hexahedron(), Nektar::Utilities::Line::Line(), Nektar::Utilities::Point::Point(), Nektar::Utilities::Prism::Prism(), Nektar::Utilities::Pyramid::Pyramid(), Nektar::Utilities::Quadrilateral::Quadrilateral(), Nektar::Utilities::Tetrahedron::Tetrahedron(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
List of element edges.
Definition at line 975 of file MeshElements.h.
Referenced by Nektar::Utilities::Triangle::Complete(), Nektar::Utilities::Quadrilateral::Complete(), Nektar::Utilities::Tetrahedron::Complete(), Nektar::Utilities::Prism::Complete(), Nektar::Utilities::Line::GetGeom(), Nektar::Utilities::Triangle::GetGeom(), Nektar::Utilities::Quadrilateral::GetGeom(), GetMaxOrder(), Nektar::Utilities::Hexahedron::Hexahedron(), Nektar::Utilities::Line::Line(), Nektar::Utilities::Prism::Prism(), Nektar::Utilities::Pyramid::Pyramid(), Nektar::Utilities::Quadrilateral::Quadrilateral(), SetEdge(), SetVertex(), Nektar::Utilities::Tetrahedron::Tetrahedron(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
Pointer to the corresponding edge if element is a 2D boundary.
Definition at line 983 of file MeshElements.h.
|
protected |
List of element faces.
Definition at line 977 of file MeshElements.h.
Referenced by Nektar::Utilities::Tetrahedron::Complete(), Nektar::Utilities::Prism::Complete(), Nektar::Utilities::Tetrahedron::GetGeom(), Nektar::Utilities::Pyramid::GetGeom(), Nektar::Utilities::Prism::GetGeom(), Nektar::Utilities::Hexahedron::GetGeom(), Nektar::Utilities::Hexahedron::Hexahedron(), Nektar::Utilities::Prism::Prism(), Nektar::Utilities::Pyramid::Pyramid(), SetEdge(), SetFace(), SetVertex(), and Nektar::Utilities::Tetrahedron::Tetrahedron().
|
protected |
Pointer to the corresponding face if element is a 3D boundary.
Definition at line 985 of file MeshElements.h.
|
protected |
Nektar++ geometry object for this element.
Definition at line 990 of file MeshElements.h.
Referenced by Nektar::Utilities::Pyramid::GetGeom().
|
protected |
ID of the element.
Definition at line 963 of file MeshElements.h.
Referenced by Nektar::Utilities::Line::GetGeom(), Nektar::Utilities::Triangle::GetGeom(), Nektar::Utilities::Quadrilateral::GetGeom(), and Nektar::Utilities::Tetrahedron::OrientTet().
|
protected |
Tag character describing the element.
Definition at line 969 of file MeshElements.h.
Referenced by Nektar::Utilities::Hexahedron::Hexahedron(), Nektar::Utilities::Line::Line(), Nektar::Utilities::Point::Point(), Nektar::Utilities::Prism::Prism(), Nektar::Utilities::Pyramid::Pyramid(), Nektar::Utilities::Quadrilateral::Quadrilateral(), Nektar::Utilities::Tetrahedron::Tetrahedron(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
List of integers specifying properties of the element.
Definition at line 971 of file MeshElements.h.
Referenced by Nektar::Utilities::Hexahedron::Hexahedron(), Nektar::Utilities::Line::Line(), Nektar::Utilities::Point::Point(), Nektar::Utilities::Prism::Prism(), Nektar::Utilities::Pyramid::Pyramid(), Nektar::Utilities::Quadrilateral::Quadrilateral(), Nektar::Utilities::Tetrahedron::Tetrahedron(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
List of element vertex nodes.
Definition at line 973 of file MeshElements.h.
Referenced by Nektar::Utilities::Line::GetGeom(), Nektar::Utilities::Triangle::GetGeom(), Nektar::Utilities::Quadrilateral::GetGeom(), Nektar::Utilities::Hexahedron::Hexahedron(), Nektar::Utilities::Line::Line(), Nektar::Utilities::Prism::OrientPrism(), Nektar::Utilities::Tetrahedron::OrientTet(), Nektar::Utilities::Point::Point(), Nektar::Utilities::Prism::Prism(), Nektar::Utilities::Pyramid::Pyramid(), Nektar::Utilities::Quadrilateral::Quadrilateral(), SetVertex(), Nektar::Utilities::Tetrahedron::Tetrahedron(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
List of element volume nodes.
Definition at line 979 of file MeshElements.h.
Referenced by Nektar::Utilities::Triangle::Complete(), Nektar::Utilities::Quadrilateral::Complete(), Nektar::Utilities::Tetrahedron::Complete(), Nektar::Utilities::Prism::Complete(), Nektar::Utilities::Quadrilateral::Quadrilateral(), and Nektar::Utilities::Triangle::Triangle().