36 #ifndef NekMeshUtils_MESHELEMENTS_EDGE
37 #define NekMeshUtils_MESHELEMENTS_EDGE
49 namespace NekMeshUtils
67 std::vector<NodeSharedPtr> pEdgeNodes,
72 #ifdef NEKTAR_USE_MESHGEN
81 #ifdef NEKTAR_USE_MESHGEN
104 std::vector<NodeSharedPtr> &nodeList)
const
106 nodeList.push_back(
m_n1);
111 nodeList.push_back(
m_n2);
118 std::vector<NodeSharedPtr> nodeList;
126 for (
int k = 0; k < nodeList.size(); ++k)
128 s << std::scientific << std::setprecision(8) <<
" "
129 << nodeList[k]->m_x <<
" " << nodeList[k]->m_y <<
" "
130 << nodeList[k]->m_z <<
" ";
143 p[0] =
m_n1->GetGeom(coordDim);
144 p[1] =
m_n2->GetGeom(coordDim);
153 c->m_points.push_back(p[0]);
158 c->m_points.push_back(p[1]);
161 m_id, coordDim, p, c);
183 std::vector<std::pair<ElementSharedPtr, int> >
m_elLink;
185 #ifdef NEKTAR_USE_MESHGEN
199 EdgeSharedPtr
const &p2);
201 EdgeSharedPtr
const &p2);
210 struct EdgeHash : std::unary_function<EdgeSharedPtr, std::size_t>
214 std::size_t seed = 0;
215 unsigned int id1 = p->m_n1->m_id;
216 unsigned int id2 = p->m_n2->m_id;
217 boost::hash_combine(seed, id1 < id2 ? id1 : id2);
218 boost::hash_combine(seed, id2 < id1 ? id1 : id2);
222 typedef boost::unordered_set<EdgeSharedPtr, EdgeHash>
EdgeSet;
bool operator<(NodeSharedPtr const &p1, NodeSharedPtr const &p2)
Defines ordering between two NodeSharedPtr objects.
NEKMESHUTILS_EXPORT Edge(NodeSharedPtr pVertex1, NodeSharedPtr pVertex2, std::vector< NodeSharedPtr > pEdgeNodes, LibUtilities::PointsType pCurveType)
Creates a new edge.
NEKMESHUTILS_EXPORT std::string GetXmlCurveString() const
Creates a Nektar++ string listing the coordinates of all the nodes.
NodeSharedPtr m_n1
First vertex node.
Represents an edge which joins two points.
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
Defines a hash function for edges.
boost::shared_ptr< Curve > CurveSharedPtr
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
std::vector< NodeSharedPtr > m_edgeNodes
List of control nodes between the first and second vertices.
NEKMESHUTILS_EXPORT unsigned int GetNodeCount() const
Returns the total number of nodes defining the edge.
unsigned int m_id
ID of edge.
std::size_t operator()(EdgeSharedPtr const &p) const
NEKMESHUTILS_EXPORT Edge(NodeSharedPtr pVertex1, NodeSharedPtr pVertex2)
Creates a new linear edge.
boost::shared_ptr< SegGeom > SegGeomSharedPtr
NEKMESHUTILS_EXPORT SpatialDomains::SegGeomSharedPtr GetGeom(int coordDim)
Generate a SpatialDomains::SegGeom object for this edge.
NEKMESHUTILS_EXPORT void GetCurvedNodes(std::vector< NodeSharedPtr > &nodeList) const
LibUtilities::PointsType m_curveType
Distributions of points along edge.
boost::shared_ptr< Node > NodeSharedPtr
NEKMESHUTILS_EXPORT ~Edge()
NodeSharedPtr m_n2
Second vertex node.
boost::shared_ptr< Edge > EdgeSharedPtr
Shared pointer to an edge.
NEKMESHUTILS_EXPORT Edge(const Edge &pSrc)
Copies an existing edge.
std::vector< std::pair< ElementSharedPtr, int > > m_elLink
Element(s) which are linked to this edge.
#define NEKMESHUTILS_EXPORT
boost::shared_ptr< Element > ElementSharedPtr
boost::unordered_set< EdgeSharedPtr, EdgeHash > EdgeSet
SpatialDomains::SegGeomSharedPtr m_geom
boost::shared_ptr< PointGeom > PointGeomSharedPtr
boost::shared_ptr< CADCurve > CADCurveSharedPtr
Base class for element definitions.