Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Nektar::Utilities::Point Class Reference

A 0-dimensional vertex. More...

#include <MeshElements.h>

Inheritance diagram for Nektar::Utilities::Point:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Utilities::Point:
Collaboration graph
[legend]

Public Member Functions

 Point (ElmtConfig pConf, std::vector< NodeSharedPtr > pNodeList, std::vector< int > pTagList)
 Create a point element.
 Point (const Point &pSrc)
virtual ~Point ()
- Public Member Functions inherited from Nektar::Utilities::Element
 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< NodeSharedPtrGetVertexList () const
 Access the list of vertex nodes.
std::vector< EdgeSharedPtrGetEdgeList () const
 Access the list of edges.
std::vector< FaceSharedPtrGetFaceList () const
 Access the list of faces.
std::vector< NodeSharedPtrGetVolumeNodes () 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::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 ()

Static Public Member Functions

static ElementSharedPtr create (ElmtConfig pConf, std::vector< NodeSharedPtr > pNodeList, std::vector< int > pTagList)
 Creates an instance of this class.
static unsigned int GetNumNodes (ElmtConfig pConf)
 Return the number of nodes defining a point (i.e. return 1).

Static Public Attributes

static LibUtilities::ShapeType m_type
 Element type.

Additional Inherited Members

- Protected Attributes inherited from Nektar::Utilities::Element
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< NodeSharedPtrm_vertex
 List of element vertex nodes.
std::vector< EdgeSharedPtrm_edge
 List of element edges.
std::vector< FaceSharedPtrm_face
 List of element faces.
std::vector< NodeSharedPtrm_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.

Detailed Description

A 0-dimensional vertex.

Definition at line 1134 of file MeshElements.h.

Constructor & Destructor Documentation

Nektar::Utilities::Point::Point ( ElmtConfig  pConf,
std::vector< NodeSharedPtr pNodeList,
std::vector< int >  pTagList 
)

Create a point element.

Definition at line 387 of file MeshElements.cpp.

References Nektar::Utilities::Element::m_dim, Nektar::Utilities::Element::m_tag, Nektar::Utilities::Element::m_taglist, and Nektar::Utilities::Element::m_vertex.

: Element(pConf, GetNumNodes(pConf), pNodeList.size())
{
m_tag = "";
m_dim = 0;
m_taglist = pTagList;
m_vertex.push_back(pNodeList[0]);
}
Nektar::Utilities::Point::Point ( const Point pSrc)
virtual Nektar::Utilities::Point::~Point ( )
inlinevirtual

Definition at line 1152 of file MeshElements.h.

{}

Member Function Documentation

static ElementSharedPtr Nektar::Utilities::Point::create ( ElmtConfig  pConf,
std::vector< NodeSharedPtr pNodeList,
std::vector< int >  pTagList 
)
inlinestatic

Creates an instance of this class.

Definition at line 1137 of file MeshElements.h.

{
return boost::shared_ptr<Element>(
new Point(pConf, pNodeList, pTagList));
}
unsigned int Nektar::Utilities::Point::GetNumNodes ( ElmtConfig  pConf)
static

Return the number of nodes defining a point (i.e. return 1).

Definition at line 401 of file MeshElements.cpp.

Referenced by Nektar::Utilities::InputGmsh::GetNnodes().

{
return 1;
}

Member Data Documentation

LibUtilities::ShapeType Nektar::Utilities::Point::m_type
static
Initial value:
RegisterCreatorFunction(LibUtilities::ePoint, Point::create, "Point")

Element type.

Definition at line 1146 of file MeshElements.h.