36 #ifndef NEKMESHUTILS_MESHELEMENTS_ELEMENT
37 #define NEKMESHUTILS_MESHELEMENTS_ELEMENT
49 namespace NekMeshUtils
63 ElmtConfig pConf,
unsigned int pNumNodes,
unsigned int pGotNodes);
260 std::vector<NodeSharedPtr> &nodeList)
const
263 "This function should be implemented at a shape level.");
274 "This function should be implemented at a shape level.");
275 return boost::shared_ptr<SpatialDomains::Geometry>();
306 bool justConfig =
false)
309 "This function should be implemented at a shape level.");
320 "This function should be implemented at a shape level.");
330 "This function should be implemented at a shape level.");
337 for (i = 0; i <
m_vertex.size(); ++i)
342 for (i = 0; i <
m_edge.size(); ++i)
344 for (j = 0; j <
m_edge[i]->m_edgeNodes.size(); ++j)
347 std::cout << n->m_x <<
" " << n->m_y <<
" " << n->m_z
351 for (i = 0; i <
m_face.size(); ++i)
353 for (j = 0; j <
m_face[i]->m_faceNodes.size(); ++j)
356 std::cout << n->m_x <<
" " << n->m_y <<
" " << n->m_z
368 "This function should be implemented at a shape level.");
409 typedef std::map<unsigned int, std::vector<ElementSharedPtr> >
ElementMap;
414 std::vector<NodeSharedPtr>,
420 ElementSharedPtr
const &e2);
425 typedef boost::shared_ptr<Element>
pT;
435 else if (b.get() == 0)
441 return a->GetId() < b->GetId();
virtual NEKMESHUTILS_EXPORT void GetCurvedNodes(std::vector< NodeSharedPtr > &nodeList) const
get list of volume interior nodes
CADObjectSharedPtr m_parentCAD
NEKMESHUTILS_EXPORT unsigned int GetDim() const
Returns the expansion dimension of the element.
NEKMESHUTILS_EXPORT std::string GetTag() const
Returns the tag which defines the element shape.
#define ASSERTL0(condition, msg)
Basic information about an element.
NEKMESHUTILS_EXPORT unsigned int GetEdgeCount() const
Returns the number of edges.
virtual NEKMESHUTILS_EXPORT SpatialDomains::GeometrySharedPtr GetGeom(int coordDim)
Generate a Nektar++ geometry object for this element.
NEKMESHUTILS_EXPORT void SetBoundaryLink(int i, int j)
Set a correspondence between edge or face i and its representative boundary element m->element[expDim...
NEKMESHUTILS_EXPORT std::string GetXmlCurveString()
Generates a string listing the coordinates of all nodes associated with this element.
NEKMESHUTILS_EXPORT int GetMaxOrder()
Obtain the order of an element by looking at edges.
NEKMESHUTILS_EXPORT LibUtilities::PointsType GetCurveType() const
Define element ordering based on ID.
NEKMESHUTILS_EXPORT void SetEdgeLink(EdgeSharedPtr pLink)
Set a correspondence between this element and an edge (2D boundary element).
ElementFactory & GetElementFactory()
ElmtConfig m_conf
Contains configuration of the element.
NEKMESHUTILS_EXPORT unsigned int GetId() const
Returns the ID of the element (or associated edge or face for boundary elements). ...
NEKMESHUTILS_EXPORT void SetFace(unsigned int p, FaceSharedPtr pNew)
Replace a face in the element.
FaceSharedPtr m_faceLink
Pointer to the corresponding face if element is a 3D boundary.
NEKMESHUTILS_EXPORT EdgeSharedPtr GetEdge(unsigned int i) const
Access an edge.
std::vector< int > m_taglist
List of integers specifying properties of the element.
bool operator()(const pT a, const pT b) const
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
Compares two element config structs.
NEKMESHUTILS_EXPORT void SetVertex(unsigned int p, NodeSharedPtr pNew, bool descend=true)
Replace a vertex in the element.
NEKMESHUTILS_EXPORT unsigned int GetFaceCount() const
Returns the number of faces.
NEKMESHUTILS_EXPORT unsigned int GetNodeCount()
Returns the total number of nodes (vertices, edge nodes and face nodes and volume nodes)...
std::map< int, int > m_boundaryLinks
Array mapping faces/edges to the location of the appropriate boundary elements in m->element...
NEKMESHUTILS_EXPORT void SetCurveType(LibUtilities::PointsType cT)
boost::shared_ptr< Element > pT
EdgeSharedPtr m_edgeLink
Pointer to the corresponding edge if element is a 2D boundary.
NEKMESHUTILS_EXPORT void SetTagList(const std::vector< int > &tags)
Set the list of tags associated with this element.
NEKMESHUTILS_EXPORT std::vector< NodeSharedPtr > GetVertexList() const
Access the list of vertex nodes.
std::vector< NodeSharedPtr > m_vertex
List of element vertex nodes.
unsigned int m_dim
Dimension of the element.
NEKMESHUTILS_EXPORT NodeSharedPtr GetVertex(unsigned int i) const
Access a vertex node.
NEKMESHUTILS_EXPORT FaceSharedPtr GetFace(unsigned int i) const
Access a face.
virtual NEKMESHUTILS_EXPORT Array< OneD, NekDouble > Normal(bool inward=false)
returns the normal to the element
std::vector< EdgeSharedPtr > m_edge
List of element edges.
boost::shared_ptr< Node > NodeSharedPtr
NEKMESHUTILS_EXPORT int GetBoundaryLink(int i)
Get the location of the boundary face/edge i for this element.
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...
std::vector< NodeSharedPtr > m_volumeNodes
List of element volume nodes.
NEKMESHUTILS_EXPORT void SetVolumeNodes(std::vector< NodeSharedPtr > &nodes)
boost::shared_ptr< CADObject > CADObjectSharedPtr
std::string m_tag
Tag character describing the element.
NEKMESHUTILS_EXPORT EdgeSharedPtr GetEdgeLink()
Get correspondence between this element and an edge.
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
SpatialDomains::GeometrySharedPtr m_geom
Nektar++ geometry object for this element.
virtual NEKMESHUTILS_EXPORT std::string GetXmlString()
Generate a list of vertices (1D), edges (2D), or faces (3D).
NEKMESHUTILS_EXPORT void SetEdge(unsigned int p, EdgeSharedPtr pNew, bool descend=true)
Replace an edge in the element.
NEKMESHUTILS_EXPORT void SetFaceLink(FaceSharedPtr pLink)
Set a correspondence between this element and a face (3D boundary element).
NEKMESHUTILS_EXPORT std::vector< EdgeSharedPtr > GetEdgeList() const
Access the list of edges.
NEKMESHUTILS_EXPORT Element(ElmtConfig pConf, unsigned int pNumNodes, unsigned int pGotNodes)
unsigned int m_id
ID of the element.
NEKMESHUTILS_EXPORT std::vector< NodeSharedPtr > GetVolumeNodes() const
Access the list of volume nodes.
#define NEKMESHUTILS_EXPORT
std::map< unsigned int, std::vector< ElementSharedPtr > > ElementMap
Container for elements; key is expansion dimension, value is vector of elements of that dimension...
NEKMESHUTILS_EXPORT void SetId(unsigned int p)
Change the ID of the element.
virtual NEKMESHUTILS_EXPORT void MakeOrder(int order, SpatialDomains::GeometrySharedPtr geom, LibUtilities::PointsType edgeType, int coordDim, int &id, bool justConfig=false)
Insert interior (i.e. volume) points into this element to make the geometry an order order representa...
LibUtilities::PointsType m_curveType
Volume curve type.
std::vector< FaceSharedPtr > m_face
List of element faces.
NEKMESHUTILS_EXPORT std::vector< FaceSharedPtr > GetFaceList() const
Access the list of faces.
NEKMESHUTILS_EXPORT void Print()
NEKMESHUTILS_EXPORT std::vector< int > GetTagList() const
Access the list of tags associated with this element.
boost::shared_ptr< Element > ElementSharedPtr
NEKMESHUTILS_EXPORT ElmtConfig GetConf() const
Returns the configuration of the element.
boost::shared_ptr< Face > FaceSharedPtr
Nektar::LibUtilities::NekFactory< LibUtilities::ShapeType, Element, ElmtConfig, std::vector< NodeSharedPtr >, std::vector< int > > ElementFactory
Element factory definition.
NEKMESHUTILS_EXPORT LibUtilities::ShapeType GetShapeType() const
returns the shapetype
boost::shared_ptr< Geometry > GeometrySharedPtr
NEKMESHUTILS_EXPORT FaceSharedPtr GetFaceLink()
Get correspondence between this element and a face.
LibUtilities::ShapeType m_e
Element type (e.g. triangle, quad, etc).
virtual NEKMESHUTILS_EXPORT int GetFaceVertex(int i, int j)
Returns the local index of vertex j of face i.
Base class for element definitions.
Provides a generic Factory class.
NEKMESHUTILS_EXPORT unsigned int GetVertexCount() const
Returns the number of vertices.