Nektar++
|
Base class for element definitions. More...
#include <Element.h>
Public Member Functions | |
NEKMESHUTILS_EXPORT | Element (ElmtConfig pConf, unsigned int pNumNodes, unsigned int pGotNodes) |
NEKMESHUTILS_EXPORT unsigned int | GetId () const |
Returns the ID of the element (or associated edge or face for boundary elements). More... | |
NEKMESHUTILS_EXPORT unsigned int | GetDim () const |
Returns the expansion dimension of the element. More... | |
NEKMESHUTILS_EXPORT ElmtConfig | GetConf () const |
Returns the configuration of the element. More... | |
NEKMESHUTILS_EXPORT std::string | GetTag () const |
Returns the tag which defines the element shape. More... | |
NEKMESHUTILS_EXPORT NodeSharedPtr | GetVertex (unsigned int i) const |
Access a vertex node. More... | |
NEKMESHUTILS_EXPORT EdgeSharedPtr | GetEdge (unsigned int i) const |
Access an edge. More... | |
NEKMESHUTILS_EXPORT FaceSharedPtr | GetFace (unsigned int i) const |
Access a face. More... | |
NEKMESHUTILS_EXPORT std::vector< NodeSharedPtr > | GetVertexList () const |
Access the list of vertex nodes. More... | |
NEKMESHUTILS_EXPORT std::vector< EdgeSharedPtr > | GetEdgeList () const |
Access the list of edges. More... | |
NEKMESHUTILS_EXPORT std::vector< FaceSharedPtr > | GetFaceList () const |
Access the list of faces. More... | |
NEKMESHUTILS_EXPORT std::vector< NodeSharedPtr > | GetVolumeNodes () const |
Access the list of volume nodes. More... | |
NEKMESHUTILS_EXPORT void | SetVolumeNodes (std::vector< NodeSharedPtr > &nodes) |
NEKMESHUTILS_EXPORT LibUtilities::PointsType | GetCurveType () const |
NEKMESHUTILS_EXPORT void | SetCurveType (LibUtilities::PointsType cT) |
NEKMESHUTILS_EXPORT unsigned int | GetNodeCount () const |
Returns the total number of nodes (vertices, edge nodes and face nodes and volume nodes). More... | |
NEKMESHUTILS_EXPORT std::vector< int > | GetTagList () const |
Access the list of tags associated with this element. More... | |
NEKMESHUTILS_EXPORT unsigned int | GetVertexCount () const |
Returns the number of vertices. More... | |
NEKMESHUTILS_EXPORT unsigned int | GetEdgeCount () const |
Returns the number of edges. More... | |
NEKMESHUTILS_EXPORT unsigned int | GetFaceCount () const |
Returns the number of faces. More... | |
NEKMESHUTILS_EXPORT void | SetId (unsigned int p) |
Change the ID of the element. More... | |
NEKMESHUTILS_EXPORT void | SetVertex (unsigned int p, NodeSharedPtr pNew) |
Replace a vertex with another vertex object. More... | |
NEKMESHUTILS_EXPORT void | SetEdge (unsigned int p, EdgeSharedPtr pNew) |
Replace an edge with another edge object. More... | |
NEKMESHUTILS_EXPORT void | SetFace (unsigned int p, FaceSharedPtr pNew) |
Replace a face with another face object. More... | |
NEKMESHUTILS_EXPORT void | SetEdgeLink (EdgeSharedPtr pLink) |
Set a correspondence between this element and an edge (2D boundary element). More... | |
NEKMESHUTILS_EXPORT EdgeSharedPtr | GetEdgeLink () |
Get correspondence between this element and an edge. More... | |
NEKMESHUTILS_EXPORT void | SetFaceLink (FaceSharedPtr pLink) |
Set a correspondence between this element and a face (3D boundary element). More... | |
NEKMESHUTILS_EXPORT FaceSharedPtr | GetFaceLink () |
Get correspondence between this element and a face. More... | |
NEKMESHUTILS_EXPORT 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... | |
NEKMESHUTILS_EXPORT int | GetBoundaryLink (int i) |
Get the location of the boundary face/edge i for this element. More... | |
NEKMESHUTILS_EXPORT void | SetTagList (const std::vector< int > &tags) |
Set the list of tags associated with this element. More... | |
virtual NEKMESHUTILS_EXPORT std::string | GetXmlString () const |
Generate a list of vertices (1D), edges (2D), or faces (3D). More... | |
NEKMESHUTILS_EXPORT void | GetCurvedNodes (std::vector< NodeSharedPtr > &nodeList) const |
NEKMESHUTILS_EXPORT std::string | GetXmlCurveString () const |
Generates a string listing the coordinates of all nodes associated with this element. More... | |
virtual NEKMESHUTILS_EXPORT SpatialDomains::GeometrySharedPtr | GetGeom (int coordDim) |
Generate a Nektar++ geometry object for this element. More... | |
NEKMESHUTILS_EXPORT int | GetMaxOrder () |
Obtain the order of an element by looking at edges. More... | |
virtual NEKMESHUTILS_EXPORT void | Complete (int order) |
Complete this object. More... | |
NEKMESHUTILS_EXPORT 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.
Element::Element | ( | ElmtConfig | pConf, |
unsigned int | pNumNodes, | ||
unsigned int | pGotNodes | ||
) |
Definition at line 54 of file Element.cpp.
References Nektar::NekMeshUtils::ElmtConfig::m_e.
|
inlinevirtual |
Complete this object.
Reimplemented in Nektar::NekMeshUtils::Triangle, Nektar::NekMeshUtils::Prism, Nektar::NekMeshUtils::Tetrahedron, and Nektar::NekMeshUtils::Quadrilateral.
Definition at line 453 of file Element.h.
References ASSERTL0.
|
inline |
Get the location of the boundary face/edge i for this element.
Definition at line 281 of file Element.h.
References Nektar::iterator, and m_boundaryLinks.
|
inline |
Returns the configuration of the element.
Definition at line 137 of file Element.h.
References m_conf.
|
inline |
Definition at line 326 of file Element.h.
References m_dim, m_edge, m_vertex, and m_volumeNodes.
Referenced by GetXmlCurveString().
|
inline |
Definition at line 189 of file Element.h.
References m_curveType.
|
inline |
Returns the expansion dimension of the element.
Definition at line 132 of file Element.h.
References m_dim.
|
inline |
Access an edge.
Definition at line 156 of file Element.h.
References m_edge.
|
inline |
Returns the number of edges.
Definition at line 232 of file Element.h.
References m_edge.
|
inline |
Get correspondence between this element and an edge.
Definition at line 259 of file Element.h.
References m_edgeLink.
|
inline |
Access the list of edges.
Definition at line 171 of file Element.h.
References m_edge.
|
inline |
Access a face.
Definition at line 161 of file Element.h.
References m_face.
|
inline |
Returns the number of faces.
Definition at line 237 of file Element.h.
References m_face.
|
inline |
Get correspondence between this element and a face.
Definition at line 270 of file Element.h.
References m_faceLink.
|
inline |
Access the list of faces.
Definition at line 176 of file Element.h.
References m_face.
|
inlinevirtual |
Generate a Nektar++ geometry object for this element.
Reimplemented in Nektar::NekMeshUtils::Triangle, Nektar::NekMeshUtils::Hexahedron, Nektar::NekMeshUtils::Prism, Nektar::NekMeshUtils::Tetrahedron, Nektar::NekMeshUtils::Pyramid, Nektar::NekMeshUtils::Quadrilateral, and Nektar::NekMeshUtils::Line.
Definition at line 444 of file Element.h.
References ASSERTL0.
|
inline |
Returns the ID of the element (or associated edge or face for boundary elements).
Definition at line 123 of file Element.h.
References m_edgeLink, m_faceLink, and m_id.
int Element::GetMaxOrder | ( | ) |
Obtain the order of an element by looking at edges.
Definition at line 157 of file Element.cpp.
References m_edge.
|
inline |
Returns the total number of nodes (vertices, edge nodes and face nodes and volume nodes).
Definition at line 199 of file Element.h.
References m_dim, m_edge, m_vertex, and m_volumeNodes.
|
inline |
Returns the tag which defines the element shape.
Definition at line 142 of file Element.h.
References m_edgeLink, m_faceLink, and m_tag.
|
inline |
Access the list of tags associated with this element.
Definition at line 222 of file Element.h.
References m_taglist.
|
inline |
Access a vertex node.
Definition at line 151 of file Element.h.
References m_vertex.
Referenced by Nektar::Utilities::InputNek::Process().
|
inline |
Returns the number of vertices.
Definition at line 227 of file Element.h.
References m_vertex.
|
inline |
Access the list of vertex nodes.
Definition at line 166 of file Element.h.
References m_vertex.
|
inline |
Access the list of volume nodes.
Definition at line 181 of file Element.h.
References m_volumeNodes.
|
inline |
Generates a string listing the coordinates of all nodes associated with this element.
Definition at line 423 of file Element.h.
References GetCurvedNodes().
|
inlinevirtual |
Generate a list of vertices (1D), edges (2D), or faces (3D).
Definition at line 299 of file Element.h.
References m_dim, m_edge, m_face, and m_vertex.
|
inline |
Definition at line 458 of file Element.h.
References m_edge, m_face, and m_vertex.
|
inline |
Set a correspondence between edge or face i and its representative boundary element m->element[expDim-1][j].
Definition at line 276 of file Element.h.
References m_boundaryLinks.
|
inline |
Definition at line 193 of file Element.h.
References 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 125 of file Element.cpp.
References m_edge, and m_face.
|
inline |
Set a correspondence between this element and an edge (2D boundary element).
Definition at line 254 of file Element.h.
References m_edgeLink.
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 149 of file Element.cpp.
References m_face.
|
inline |
Set a correspondence between this element and a face (3D boundary element).
Definition at line 265 of file Element.h.
References m_faceLink.
|
inline |
|
inline |
Set the list of tags associated with this element.
Definition at line 294 of file Element.h.
References m_taglist.
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 77 of file Element.cpp.
References m_edge, m_face, and m_vertex.
|
inline |
Definition at line 185 of file Element.h.
References m_volumeNodes.
|
protected |
Array mapping faces/edges to the location of the appropriate boundary elements in m->element.
Definition at line 517 of file Element.h.
Referenced by GetBoundaryLink(), and SetBoundaryLink().
|
protected |
Contains configuration of the element.
Definition at line 496 of file Element.h.
Referenced by Nektar::NekMeshUtils::Quadrilateral::Complete(), Nektar::NekMeshUtils::Prism::Complete(), Nektar::NekMeshUtils::Tetrahedron::Complete(), Nektar::NekMeshUtils::Triangle::Complete(), GetConf(), Nektar::NekMeshUtils::Hexahedron::Hexahedron(), Nektar::NekMeshUtils::Line::Line(), Nektar::NekMeshUtils::Prism::Prism(), Nektar::NekMeshUtils::Pyramid::Pyramid(), Nektar::NekMeshUtils::Quadrilateral::Quadrilateral(), Nektar::NekMeshUtils::Tetrahedron::Tetrahedron(), and Nektar::NekMeshUtils::Triangle::Triangle().
|
protected |
Volume curve type.
Definition at line 510 of file Element.h.
Referenced by GetCurveType(), Nektar::NekMeshUtils::Line::GetGeom(), SetCurveType(), and Nektar::NekMeshUtils::Triangle::Triangle().
|
protected |
Dimension of the element.
Definition at line 494 of file Element.h.
Referenced by GetCurvedNodes(), GetDim(), GetNodeCount(), GetXmlString(), Nektar::NekMeshUtils::Hexahedron::Hexahedron(), Nektar::NekMeshUtils::Line::Line(), Nektar::NekMeshUtils::Point::Point(), Nektar::NekMeshUtils::Prism::Prism(), Nektar::NekMeshUtils::Pyramid::Pyramid(), Nektar::NekMeshUtils::Quadrilateral::Quadrilateral(), Nektar::NekMeshUtils::Tetrahedron::Tetrahedron(), and Nektar::NekMeshUtils::Triangle::Triangle().
|
protected |
List of element edges.
Definition at line 504 of file Element.h.
Referenced by Nektar::NekMeshUtils::Quadrilateral::Complete(), Nektar::NekMeshUtils::Prism::Complete(), Nektar::NekMeshUtils::Tetrahedron::Complete(), Nektar::NekMeshUtils::Triangle::Complete(), GetCurvedNodes(), GetEdge(), GetEdgeCount(), GetEdgeList(), Nektar::NekMeshUtils::Line::GetGeom(), Nektar::NekMeshUtils::Quadrilateral::GetGeom(), Nektar::NekMeshUtils::Triangle::GetGeom(), GetMaxOrder(), GetNodeCount(), GetXmlString(), Nektar::NekMeshUtils::Hexahedron::Hexahedron(), Nektar::NekMeshUtils::Line::Line(), Print(), Nektar::NekMeshUtils::Prism::Prism(), Nektar::NekMeshUtils::Pyramid::Pyramid(), Nektar::NekMeshUtils::Quadrilateral::Quadrilateral(), SetEdge(), SetVertex(), Nektar::NekMeshUtils::Tetrahedron::Tetrahedron(), and Nektar::NekMeshUtils::Triangle::Triangle().
|
protected |
Pointer to the corresponding edge if element is a 2D boundary.
Definition at line 512 of file Element.h.
Referenced by GetEdgeLink(), GetId(), GetTag(), and SetEdgeLink().
|
protected |
List of element faces.
Definition at line 506 of file Element.h.
Referenced by Nektar::NekMeshUtils::Prism::Complete(), Nektar::NekMeshUtils::Tetrahedron::Complete(), GetFace(), GetFaceCount(), GetFaceList(), Nektar::NekMeshUtils::Pyramid::GetGeom(), Nektar::NekMeshUtils::Tetrahedron::GetGeom(), Nektar::NekMeshUtils::Hexahedron::GetGeom(), Nektar::NekMeshUtils::Prism::GetGeom(), GetXmlString(), Nektar::NekMeshUtils::Hexahedron::Hexahedron(), Print(), Nektar::NekMeshUtils::Prism::Prism(), Nektar::NekMeshUtils::Pyramid::Pyramid(), SetEdge(), SetFace(), SetVertex(), and Nektar::NekMeshUtils::Tetrahedron::Tetrahedron().
|
protected |
Pointer to the corresponding face if element is a 3D boundary.
Definition at line 514 of file Element.h.
Referenced by GetFaceLink(), GetId(), GetTag(), and SetFaceLink().
|
protected |
Nektar++ geometry object for this element.
Definition at line 519 of file Element.h.
Referenced by Nektar::NekMeshUtils::Pyramid::GetGeom().
|
protected |
ID of the element.
Definition at line 492 of file Element.h.
Referenced by Nektar::NekMeshUtils::Line::GetGeom(), Nektar::NekMeshUtils::Quadrilateral::GetGeom(), Nektar::NekMeshUtils::Triangle::GetGeom(), GetId(), Nektar::NekMeshUtils::Tetrahedron::OrientTet(), and SetId().
|
protected |
Tag character describing the element.
Definition at line 498 of file Element.h.
Referenced by GetTag(), Nektar::NekMeshUtils::Hexahedron::Hexahedron(), Nektar::NekMeshUtils::Line::Line(), Nektar::NekMeshUtils::Point::Point(), Nektar::NekMeshUtils::Prism::Prism(), Nektar::NekMeshUtils::Pyramid::Pyramid(), Nektar::NekMeshUtils::Quadrilateral::Quadrilateral(), Nektar::NekMeshUtils::Tetrahedron::Tetrahedron(), and Nektar::NekMeshUtils::Triangle::Triangle().
|
protected |
List of integers specifying properties of the element.
Definition at line 500 of file Element.h.
Referenced by GetTagList(), Nektar::NekMeshUtils::Hexahedron::Hexahedron(), Nektar::NekMeshUtils::Line::Line(), Nektar::NekMeshUtils::Point::Point(), Nektar::NekMeshUtils::Prism::Prism(), Nektar::NekMeshUtils::Pyramid::Pyramid(), Nektar::NekMeshUtils::Quadrilateral::Quadrilateral(), SetTagList(), Nektar::NekMeshUtils::Tetrahedron::Tetrahedron(), and Nektar::NekMeshUtils::Triangle::Triangle().
|
protected |
List of element vertex nodes.
Definition at line 502 of file Element.h.
Referenced by GetCurvedNodes(), Nektar::NekMeshUtils::Line::GetGeom(), Nektar::NekMeshUtils::Quadrilateral::GetGeom(), Nektar::NekMeshUtils::Triangle::GetGeom(), GetNodeCount(), GetVertex(), GetVertexCount(), GetVertexList(), GetXmlString(), Nektar::NekMeshUtils::Hexahedron::Hexahedron(), Nektar::NekMeshUtils::Line::Line(), Nektar::NekMeshUtils::Prism::OrientPrism(), Nektar::NekMeshUtils::Tetrahedron::OrientTet(), Nektar::NekMeshUtils::Point::Point(), Print(), Nektar::NekMeshUtils::Prism::Prism(), Nektar::NekMeshUtils::Pyramid::Pyramid(), Nektar::NekMeshUtils::Quadrilateral::Quadrilateral(), SetVertex(), Nektar::NekMeshUtils::Tetrahedron::Tetrahedron(), and Nektar::NekMeshUtils::Triangle::Triangle().
|
protected |
List of element volume nodes.
Definition at line 508 of file Element.h.
Referenced by Nektar::NekMeshUtils::Quadrilateral::Complete(), Nektar::NekMeshUtils::Tetrahedron::Complete(), Nektar::NekMeshUtils::Prism::Complete(), Nektar::NekMeshUtils::Triangle::Complete(), GetCurvedNodes(), GetNodeCount(), GetVolumeNodes(), Nektar::NekMeshUtils::Quadrilateral::Quadrilateral(), SetVolumeNodes(), and Nektar::NekMeshUtils::Triangle::Triangle().