36 #ifndef NEKMESHUTILS_MESHELEMENTS_EDGE
37 #define NEKMESHUTILS_MESHELEMENTS_EDGE
46 namespace NekMeshUtils
64 std::vector<NodeSharedPtr> pEdgeNodes,
92 std::vector<NodeSharedPtr> &nodeList)
const
94 nodeList.push_back(
m_n1);
99 nodeList.push_back(
m_n2);
127 std::vector<std::pair<ElementSharedPtr, int> >
m_elLink;
138 EdgeSharedPtr
const &p2);
140 EdgeSharedPtr
const &p2);
149 struct EdgeHash : std::unary_function<EdgeSharedPtr, std::size_t>
153 std::size_t seed = 0;
154 unsigned int id1 = p->m_n1->m_id;
155 unsigned int id2 = p->m_n2->m_id;
156 boost::hash_combine(seed, id1 < id2 ? id1 : id2);
157 boost::hash_combine(seed, id2 < id1 ? id1 : id2);
161 typedef boost::unordered_set<EdgeSharedPtr, EdgeHash>
EdgeSet;
bool operator<(NodeSharedPtr const &p1, NodeSharedPtr const &p2)
Defines ordering between two NodeSharedPtr objects.
NEKMESHUTILS_EXPORT SpatialDomains::SegGeomSharedPtr GetGeom(int coordDim)
Generate a SpatialDomains::SegGeom object for this edge.
NEKMESHUTILS_EXPORT Edge(NodeSharedPtr pVertex1, NodeSharedPtr pVertex2, std::vector< NodeSharedPtr > pEdgeNodes, LibUtilities::PointsType pCurveType)
Creates a new edge.
NodeSharedPtr m_n1
First vertex node.
Represents an edge which joins two points.
Defines a hash function for edges.
bool operator==(ElmtConfig const &c1, ElmtConfig const &c2)
Compares two element config structs.
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 std::string GetXmlCurveString()
Creates a Nektar++ string listing the coordinates of all the nodes.
CADObjectSharedPtr m_parentCAD
NEKMESHUTILS_EXPORT Edge(NodeSharedPtr pVertex1, NodeSharedPtr pVertex2)
Creates a new linear edge.
boost::shared_ptr< SegGeom > SegGeomSharedPtr
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< CADObject > CADObjectSharedPtr
void MakeOrder(int order, SpatialDomains::GeometrySharedPtr geom, LibUtilities::PointsType edgeType, int coordDim, int &id)
Make this edge an order order edge.
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< Geometry > GeometrySharedPtr
Base class for element definitions.