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). More... | |
unsigned int | GetDim () const |
Returns the expansion dimension of the element. More... | |
ElmtConfig | GetConf () const |
Returns the configuration of the element. More... | |
std::string | GetTag () const |
Returns the tag which defines the element shape. More... | |
NodeSharedPtr | GetVertex (unsigned int i) const |
Access a vertex node. More... | |
EdgeSharedPtr | GetEdge (unsigned int i) const |
Access an edge. More... | |
FaceSharedPtr | GetFace (unsigned int i) const |
Access a face. More... | |
std::vector< NodeSharedPtr > | GetVertexList () const |
Access the list of vertex nodes. More... | |
std::vector< EdgeSharedPtr > | GetEdgeList () const |
Access the list of edges. More... | |
std::vector< FaceSharedPtr > | GetFaceList () const |
Access the list of faces. More... | |
std::vector< NodeSharedPtr > | GetVolumeNodes () const |
Access the list of volume nodes. More... | |
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). More... | |
std::vector< int > | GetTagList () const |
Access the list of tags associated with this element. More... | |
unsigned int | GetVertexCount () const |
Returns the number of vertices. More... | |
unsigned int | GetEdgeCount () const |
Returns the number of edges. More... | |
unsigned int | GetFaceCount () const |
Returns the number of faces. More... | |
void | SetId (unsigned int p) |
Change the ID of the element. More... | |
void | SetVertex (unsigned int p, NodeSharedPtr pNew) |
Replace a vertex with another vertex object. More... | |
void | SetEdge (unsigned int p, EdgeSharedPtr pNew) |
Replace an edge with another edge object. More... | |
void | SetFace (unsigned int p, FaceSharedPtr pNew) |
Replace a face with another face object. More... | |
void | SetEdgeLink (EdgeSharedPtr pLink) |
Set a correspondence between this element and an edge (2D boundary element). More... | |
EdgeSharedPtr | GetEdgeLink () |
Get correspondence between this element and an edge. More... | |
void | SetFaceLink (FaceSharedPtr pLink) |
Set a correspondence between this element and a face (3D boundary element). More... | |
FaceSharedPtr | GetFaceLink () |
Get correspondence between this element and a face. More... | |
void | SetBoundaryLink (int i, int j) |
Set a correspondence between edge or face i and its representative boundary element m->element[expDim-1][j]. More... | |
int | GetBoundaryLink (int i) |
Get the location of the boundary face/edge i for this element. More... | |
void | SetTagList (const std::vector< int > &tags) |
Set the list of tags associated with this element. More... | |
virtual std::string | GetXmlString () const |
Generate a list of vertices (1D), edges (2D), or faces (3D). More... | |
std::string | GetXmlCurveString () const |
Generates a string listing the coordinates of all nodes associated with this element. More... | |
virtual SpatialDomains::GeometrySharedPtr | GetGeom (int coordDim) |
Generate a Nektar++ geometry object for this element. More... | |
int | GetMaxOrder () |
Obtain the order of an element by looking at edges. More... | |
virtual void | Complete (int order) |
Complete this object. More... | |
void | Print () |
Protected Attributes | |
unsigned int | m_id |
ID of the element. More... | |
unsigned int | m_dim |
Dimension of the element. More... | |
ElmtConfig | m_conf |
Contains configuration of the element. More... | |
std::string | m_tag |
Tag character describing the element. More... | |
std::vector< int > | m_taglist |
List of integers specifying properties of the element. More... | |
std::vector< NodeSharedPtr > | m_vertex |
List of element vertex nodes. More... | |
std::vector< EdgeSharedPtr > | m_edge |
List of element edges. More... | |
std::vector< FaceSharedPtr > | m_face |
List of element faces. More... | |
std::vector< NodeSharedPtr > | m_volumeNodes |
List of element volume nodes. More... | |
LibUtilities::PointsType | m_curveType |
Volume curve type. More... | |
EdgeSharedPtr | m_edgeLink |
Pointer to the corresponding edge if element is a 2D boundary. More... | |
FaceSharedPtr | m_faceLink |
Pointer to the corresponding face if element is a 3D boundary. More... | |
std::map< int, int > | m_boundaryLinks |
Array mapping faces/edges to the location of the appropriate boundary elements in m->element. More... | |
SpatialDomains::GeometrySharedPtr | m_geom |
Nektar++ geometry object for this element. More... | |
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 945 of file MeshElements.h.
References ASSERTL0.
|
inline |
Get the location of the boundary face/edge i for this element.
Definition at line 785 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 |
Access an edge.
Definition at line 679 of file MeshElements.h.
|
inline |
Returns the number of edges.
Definition at line 744 of file MeshElements.h.
|
inline |
Get correspondence between this element and an edge.
Definition at line 767 of file MeshElements.h.
|
inline |
Access the list of edges.
Definition at line 691 of file MeshElements.h.
|
inline |
Access a face.
Definition at line 683 of file MeshElements.h.
|
inline |
Returns the number of faces.
Definition at line 748 of file MeshElements.h.
|
inline |
Get correspondence between this element and a face.
Definition at line 776 of file MeshElements.h.
|
inline |
Access the list of faces.
Definition at line 695 of file MeshElements.h.
|
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 938 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 736 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 740 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 831 of file MeshElements.h.
|
inlinevirtual |
Generate a list of vertices (1D), edges (2D), or faces (3D).
Definition at line 802 of file MeshElements.h.
|
inline |
Definition at line 949 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 781 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.
References m_edge, and m_face.
|
inline |
Set a correspondence between this element and an edge (2D boundary element).
Definition at line 763 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 772 of file MeshElements.h.
|
inline |
Change the ID of the element.
Definition at line 752 of file MeshElements.h.
References Nektar::Utilities::Face::m_id.
|
inline |
Set the list of tags associated with this element.
Definition at line 797 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 1001 of file MeshElements.h.
|
protected |
Contains configuration of the element.
Definition at line 980 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 994 of file MeshElements.h.
Referenced by Nektar::Utilities::Line::GetGeom(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
Dimension of the element.
Definition at line 978 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 988 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 996 of file MeshElements.h.
|
protected |
List of element faces.
Definition at line 990 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 998 of file MeshElements.h.
|
protected |
Nektar++ geometry object for this element.
Definition at line 1003 of file MeshElements.h.
Referenced by Nektar::Utilities::Pyramid::GetGeom().
|
protected |
ID of the element.
Definition at line 976 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 982 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 984 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 986 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 992 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().