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::vector< NodeSharedPtr > | tensorNodeOrdering (const std::vector< NodeSharedPtr > &nodes, int n) const |
Reorders Gmsh ordered nodes into a row-by-row ordering required for Nektar++ curve tags. | |
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 628 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 1009 of file MeshElements.h.
References ASSERTL0.
|
inline |
Get the location of the boundary face/edge i for this element.
Definition at line 762 of file MeshElements.h.
References Nektar::iterator.
|
inline |
Returns the configuration of the element.
Definition at line 646 of file MeshElements.h.
|
inline |
Definition at line 686 of file MeshElements.h.
References Nektar::Utilities::Face::m_curveType.
|
inline |
Returns the expansion dimension of the element.
Definition at line 642 of file MeshElements.h.
|
inline |
|
inline |
Returns the number of edges.
Definition at line 721 of file MeshElements.h.
|
inline |
Get correspondence between this element and an edge.
Definition at line 744 of file MeshElements.h.
|
inline |
Access the list of edges.
Definition at line 672 of file MeshElements.h.
Referenced by Nektar::Utilities::Triangle::create(), and Nektar::Utilities::Quadrilateral::create().
|
inline |
Access a face.
Definition at line 664 of file MeshElements.h.
Referenced by Nektar::Utilities::InputNek::Process().
|
inline |
Returns the number of faces.
Definition at line 725 of file MeshElements.h.
|
inline |
Get correspondence between this element and a face.
Definition at line 753 of file MeshElements.h.
|
inline |
Access the list of faces.
Definition at line 676 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 1002 of file MeshElements.h.
References ASSERTL0.
|
inline |
Returns the ID of the element (or associated edge or face for boundary elements).
Definition at line 636 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 694 of file MeshElements.h.
|
inline |
Returns the tag which defines the element shape.
Definition at line 650 of file MeshElements.h.
|
inline |
Access the list of tags associated with this element.
Definition at line 713 of file MeshElements.h.
|
inline |
|
inline |
Returns the number of vertices.
Definition at line 717 of file MeshElements.h.
|
inline |
Access the list of vertex nodes.
Definition at line 668 of file MeshElements.h.
|
inline |
Access the list of volume nodes.
Definition at line 680 of file MeshElements.h.
|
inline |
Generates a string listing the coordinates of all nodes associated with this element.
Definition at line 918 of file MeshElements.h.
|
inlinevirtual |
Generate a list of vertices (1D), edges (2D), or faces (3D).
Definition at line 779 of file MeshElements.h.
|
inline |
Definition at line 1013 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 758 of file MeshElements.h.
|
inline |
Definition at line 689 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 740 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 749 of file MeshElements.h.
|
inline |
Change the ID of the element.
Definition at line 729 of file MeshElements.h.
References Nektar::Utilities::Face::m_id.
|
inline |
Set the list of tags associated with this element.
Definition at line 774 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 683 of file MeshElements.h.
|
inline |
Reorders Gmsh ordered nodes into a row-by-row ordering required for Nektar++ curve tags.
The interior nodes of elements in the Gmsh format are ordered as for a lower-order element of the same type. This promotes the recursive approach to the reordering algorithm.
Definition at line 814 of file MeshElements.h.
|
protected |
Array mapping faces/edges to the location of the appropriate boundary elements in m->element.
Definition at line 1065 of file MeshElements.h.
|
protected |
Contains configuration of the element.
Definition at line 1044 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 1058 of file MeshElements.h.
Referenced by Nektar::Utilities::Line::GetGeom(), and Nektar::Utilities::Triangle::Triangle().
|
protected |
Dimension of the element.
Definition at line 1042 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 1052 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 1060 of file MeshElements.h.
|
protected |
List of element faces.
Definition at line 1054 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 1062 of file MeshElements.h.
|
protected |
Nektar++ geometry object for this element.
Definition at line 1067 of file MeshElements.h.
Referenced by Nektar::Utilities::Pyramid::GetGeom().
|
protected |
ID of the element.
Definition at line 1040 of file MeshElements.h.
Referenced by Nektar::Utilities::Line::GetGeom(), Nektar::Utilities::Triangle::GetGeom(), and Nektar::Utilities::Quadrilateral::GetGeom().
|
protected |
Tag character describing the element.
Definition at line 1046 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 1048 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 1050 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 1056 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().