43 template<
typename index_t>
class Edge{
50 edge.first = std::min(nid0, nid1);
51 edge.second = std::max(nid0, nid1);
73 return this->edge == in.edge;
78 return this->edge != in.edge;
83 return this->edge < in.edge;
87 if((edge.first==in.edge.first)||(edge.first==in.edge.second))
89 else if((edge.second==in.edge.first)||(edge.second==in.edge.second))
95 return (nid==edge.first)||(nid==edge.second);
98 template<
typename _real_t>
friend class Mesh;
99 template<
typename _real_t,
int _dim>
friend class Coarsen;
100 template<
typename _real_t,
int _dim>
friend class Swapping;
101 template<
typename _real_t,
int _dim>
friend class Refine;
105 std::pair<index_t, index_t> edge;
148 return this->edge == in.edge;
153 return this->edge != in.edge;
158 return this->edge < in.edge;
162 if((edge.first==in.edge.first)||(edge.first==in.edge.second))
164 else if((edge.second==in.edge.first)||(edge.second==in.edge.second))
170 return (nid==edge.first)||(nid==edge.second);
173 template<
typename _real_t>
friend class Mesh;
174 template<
typename _real_t,
int _dim>
friend class Coarsen;
175 template<
typename _real_t,
int _dim>
friend class Swapping;
176 template<
typename _real_t,
int _dim>
friend class Refine;
180 std::pair<index_t, index_t> edge;
DirectedEdge(const DirectedEdge &in)
DirectedEdge(index_t nid0, index_t nid1)
bool operator==(const Edge &in) const
Equality operator.
bool operator!=(const Edge &in) const
Inequality operator.
bool contains(index_t nid) const
Performs 2D mesh coarsening.
Performs edge/face swapping.
bool operator!=(const DirectedEdge &in) const
Inequality operator.
DirectedEdge(index_t nid0, index_t nid1, index_t nid)
bool contains(index_t nid) const
index_t connected(const Edge &in) const
index_t connected(const DirectedEdge &in) const
DirectedEdge & operator=(const DirectedEdge &in)
Assignment operator.
bool operator<(const DirectedEdge &in) const
Less-than operator.
bool operator==(const DirectedEdge &in) const
Equality operator.
bool operator<(const Edge &in) const
Less-than operator.
Edge & operator=(const Edge &in)
Assignment operator.
~DirectedEdge()
Destructor.
Edge(index_t nid0, index_t nid1)
Performs 2D mesh refinement.