Nektar++
|
A 3-dimensional four-faced element. More...
#include <Tetrahedron.h>
Public Member Functions | |
NEKMESHUTILS_EXPORT | Tetrahedron (ElmtConfig pConf, std::vector< NodeSharedPtr > pNodeList, std::vector< int > pTagList) |
Create a tetrahedron element. More... | |
NEKMESHUTILS_EXPORT | Tetrahedron (const Tetrahedron &pSrc) |
virtual NEKMESHUTILS_EXPORT | ~Tetrahedron () |
virtual NEKMESHUTILS_EXPORT SpatialDomains::GeometrySharedPtr | GetGeom (int coordDim) |
Generate a Nektar++ geometry object for this element. More... | |
virtual NEKMESHUTILS_EXPORT void | GetCurvedNodes (std::vector< NodeSharedPtr > &nodeList) const |
get list of volume interior nodes More... | |
virtual NEKMESHUTILS_EXPORT StdRegions::Orientation | GetEdgeOrient (int edgeId, EdgeSharedPtr edge) |
Get the edge orientation of edge with respect to the local element, which lies at edge index edgeId . More... | |
virtual NEKMESHUTILS_EXPORT void | MakeOrder (int order, SpatialDomains::GeometrySharedPtr geom, LibUtilities::PointsType pType, int coordDim, int &id, bool justConfig=false) |
Insert interior (i.e. volume) points into this element to make the geometry an order order representation. More... | |
virtual NEKMESHUTILS_EXPORT int | GetFaceVertex (int i, int j) |
Returns the local index of vertex j of face i . More... | |
![]() | |
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 LibUtilities::ShapeType | GetShapeType () const |
returns the shapetype 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 () |
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, bool descend=true) |
Replace a vertex in the element. More... | |
NEKMESHUTILS_EXPORT void | SetEdge (unsigned int p, EdgeSharedPtr pNew, bool descend=true) |
Replace an edge in the element. More... | |
NEKMESHUTILS_EXPORT void | SetFace (unsigned int p, FaceSharedPtr pNew) |
Replace a face in the element. 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 bool | HasBoundaryLinks () |
Is this element connected to a boundary. 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 () |
Generate a list of vertices (1D), edges (2D), or faces (3D). More... | |
NEKMESHUTILS_EXPORT std::string | GetXmlCurveString () |
Generates a string listing the coordinates of all nodes associated with this element. More... | |
NEKMESHUTILS_EXPORT int | GetMaxOrder () |
Obtain the order of an element by looking at edges. More... | |
NEKMESHUTILS_EXPORT bool | IsDeformed () |
Determines whether an element is deformed by inspecting whether there are any edge, face or volume interior nodes. More... | |
NEKMESHUTILS_EXPORT std::pair< Node, Node > | GetBoundingBox () |
Returns the approximate bounding box of this element based on the coordinates of all vertices, edges and faces of the element. Note that this does not robustly take into account the curvature of the element. More... | |
NEKMESHUTILS_EXPORT void | Print () |
virtual NEKMESHUTILS_EXPORT Array< OneD, NekDouble > | Normal (bool inward=false) |
returns the normal to the element More... | |
Static Public Member Functions | |
static ElementSharedPtr | create (ElmtConfig pConf, std::vector< NodeSharedPtr > pNodeList, std::vector< int > pTagList) |
Creates an instance of this class. More... | |
static NEKMESHUTILS_EXPORT unsigned int | GetNumNodes (ElmtConfig pConf) |
Return the number of nodes defining a tetrahedron. More... | |
Public Attributes | |
int | m_orientationMap [4] |
int | m_origVertMap [4] |
![]() | |
CADObjectSharedPtr | m_parentCAD |
Static Public Attributes | |
static LibUtilities::ShapeType | m_type |
Element type. More... | |
Protected Member Functions | |
void | OrientTet () |
Orient tetrahedron to align degenerate vertices. More... | |
Static Private Attributes | |
static int | m_edgeVertMap [6][2] |
Local vertices that make up each tetrahedral edge. More... | |
static int | m_faceVertMap [4][3] |
Local vertices that make up each tetrahedral face. More... | |
static int | m_faceEdgeMap [4][3] |
Local edges that make up each tetrahedral face. More... | |
Additional Inherited Members | |
![]() | |
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... | |
A 3-dimensional four-faced element.
Definition at line 49 of file Tetrahedron.h.
Nektar::NekMeshUtils::Tetrahedron::Tetrahedron | ( | ElmtConfig | pConf, |
std::vector< NodeSharedPtr > | pNodeList, | ||
std::vector< int > | pTagList | ||
) |
Create a tetrahedron element.
Definition at line 74 of file Tetrahedron.cpp.
References Nektar::NekMeshUtils::HOTriangle< T >::Align(), ASSERTL0, Nektar::NekMeshUtils::Element::m_conf, Nektar::NekMeshUtils::Element::m_dim, Nektar::NekMeshUtils::Element::m_edge, Nektar::NekMeshUtils::ElmtConfig::m_edgeCurveType, m_edgeVertMap, Nektar::NekMeshUtils::Element::m_face, Nektar::NekMeshUtils::ElmtConfig::m_faceCurveType, m_faceEdgeMap, Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, m_faceVertMap, Nektar::NekMeshUtils::ElmtConfig::m_order, m_orientationMap, m_origVertMap, Nektar::NekMeshUtils::ElmtConfig::m_reorient, Nektar::NekMeshUtils::Element::m_tag, Nektar::NekMeshUtils::Element::m_taglist, Nektar::NekMeshUtils::Element::m_vertex, Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes, Nektar::NekMeshUtils::Element::m_volumeNodes, OrientTet(), and Nektar::NekMeshUtils::HOTriangle< T >::surfVerts.
NEKMESHUTILS_EXPORT Nektar::NekMeshUtils::Tetrahedron::Tetrahedron | ( | const Tetrahedron & | pSrc | ) |
|
inlinevirtual |
Definition at line 66 of file Tetrahedron.h.
References GetCurvedNodes(), GetEdgeOrient(), GetGeom(), GetNumNodes(), MakeOrder(), and NEKMESHUTILS_EXPORT.
|
inlinestatic |
Creates an instance of this class.
Definition at line 53 of file Tetrahedron.h.
|
virtual |
get list of volume interior nodes
Reimplemented from Nektar::NekMeshUtils::Element.
Definition at line 359 of file Tetrahedron.cpp.
References Nektar::NekMeshUtils::HOTriangle< T >::Align(), CellMLToNektar.pycml::copy(), Nektar::NekMeshUtils::Element::m_edge, Nektar::NekMeshUtils::Element::m_face, Nektar::NekMeshUtils::Element::m_id, Nektar::NekMeshUtils::Element::m_vertex, Nektar::NekMeshUtils::Element::m_volumeNodes, and Nektar::NekMeshUtils::HOTriangle< T >::surfVerts.
Referenced by ~Tetrahedron().
|
virtual |
Get the edge orientation of edge
with respect to the local element, which lies at edge index edgeId
.
Reimplemented from Nektar::NekMeshUtils::Element.
Definition at line 252 of file Tetrahedron.cpp.
References ASSERTL1, Nektar::StdRegions::eBackwards, Nektar::StdRegions::eForwards, Nektar::StdRegions::eNoOrientation, m_edgeVertMap, and Nektar::NekMeshUtils::Element::m_vertex.
Referenced by ~Tetrahedron().
|
inlinevirtual |
Returns the local index of vertex j
of face i
.
Reimplemented from Nektar::NekMeshUtils::Element.
Definition at line 85 of file Tetrahedron.h.
References m_faceVertMap.
|
virtual |
Generate a Nektar++ geometry object for this element.
Reimplemented from Nektar::NekMeshUtils::Element.
Definition at line 234 of file Tetrahedron.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), Nektar::NekMeshUtils::Element::m_face, and Nektar::NekMeshUtils::Element::m_id.
Referenced by ~Tetrahedron().
|
static |
Return the number of nodes defining a tetrahedron.
Definition at line 348 of file Tetrahedron.cpp.
References Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, and Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes.
Referenced by Nektar::Utilities::InputGmsh::GetNnodes(), and ~Tetrahedron().
|
virtual |
Insert interior (i.e. volume) points into this element to make the geometry an order order
representation.
order | The desired polynomial order. |
geom | The geometry object used to describe the curvature mapping. |
edgeType | The points distribution to use on the volume. |
coordDim | The coordinate (i.e. space) dimension. |
id | Counter which should be incremented to supply consistent vertex IDs. |
justConfig | If true, then the configuration Element::m_conf will be updated but no nodes will be generated. This is used when considering boundary elements, which just require copying of face or edge interior nodes. |
Reimplemented from Nektar::NekMeshUtils::Element.
Definition at line 271 of file Tetrahedron.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL1, Nektar::LibUtilities::PointsKey::GetPointsDim(), Nektar::NekMeshUtils::Element::m_conf, Nektar::NekMeshUtils::Element::m_curveType, Nektar::NekMeshUtils::ElmtConfig::m_faceNodes, Nektar::NekMeshUtils::ElmtConfig::m_order, Nektar::NekMeshUtils::ElmtConfig::m_volumeNodes, Nektar::NekMeshUtils::Element::m_volumeNodes, and Nektar::LibUtilities::PointsManager().
Referenced by ~Tetrahedron().
|
protected |
Orient tetrahedron to align degenerate vertices.
Orientation of tetrahedral elements is required so that the singular vertices of triangular faces (which occur as a part of the collapsed co-ordinate system) align. The algorithm is based on that used in T. Warburton's thesis and in the original Nektar source.
First the vertices are ordered with the highest global vertex at the top degenerate point, and the base degenerate point has second lowest ID. These vertices are swapped if the element is incorrectly oriented.
Definition at line 465 of file Tetrahedron.cpp.
References CG_Iterations::ax, m_faceVertMap, Nektar::NekMeshUtils::Element::m_id, m_orientationMap, m_origVertMap, Nektar::NekMeshUtils::Element::m_vertex, and Nektar::NekMeshUtils::sort3().
Referenced by Tetrahedron().
|
staticprivate |
Local vertices that make up each tetrahedral edge.
Definition at line 97 of file Tetrahedron.h.
Referenced by GetEdgeOrient(), and Tetrahedron().
|
staticprivate |
Local edges that make up each tetrahedral face.
Definition at line 99 of file Tetrahedron.h.
Referenced by Tetrahedron().
|
staticprivate |
Local vertices that make up each tetrahedral face.
Definition at line 98 of file Tetrahedron.h.
Referenced by GetFaceVertex(), OrientTet(), and Tetrahedron().
int Nektar::NekMeshUtils::Tetrahedron::m_orientationMap[4] |
Definition at line 90 of file Tetrahedron.h.
Referenced by OrientTet(), Nektar::Utilities::InputNek::Process(), and Tetrahedron().
int Nektar::NekMeshUtils::Tetrahedron::m_origVertMap[4] |
Definition at line 91 of file Tetrahedron.h.
Referenced by OrientTet(), and Tetrahedron().
|
static |