Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
edge Class Reference

An edge is a list of two point labels. The functionality it provides supports the discretisation on a 2-D flat mesh. More...

Inheritance diagram for edge:
Inheritance graph
[legend]
Collaboration diagram for edge:
Collaboration graph
[legend]

Classes

struct  Hash
 
struct  hasher
 

Public Member Functions

 edge ()
 
 edge (const label from, const label to)
 
 edge (const labelPair &pair)
 
 edge (const FixedList< label, 2 > &list)
 
 edge (const label from, const label to, const bool doSort)
 
 edge (const FixedList< label, 2 > &list, const bool doSort)
 
 edge (const UList< label > &list, const FixedList< label, 2 > &indices)
 
 edge (Istream &is)
 
label start () const
 
label & start ()
 
label end () const
 
label & end ()
 
edge reverseEdge () const
 
label minVertex () const
 
label maxVertex () const
 
bool valid () const
 
bool found (const label pointLabel) const
 
label which (const label pointLabel) const
 
bool connects (const edge &other) const
 
label commonVertex (const edge &other) const
 
label otherVertex (const label pointLabel) const
 
label collapse ()
 
label count () const
 
bool empty () const
 
void clear ()
 
bool insert (const label index)
 
template<class InputIterator >
label insert (InputIterator begIter, InputIterator endIter)
 
label insert (std::initializer_list< label > list)
 
template<unsigned N>
label insert (const FixedList< label, N > &list)
 
label insert (const labelUList &list)
 
label erase (const label index)
 
template<class InputIterator >
label erase (InputIterator begIter, InputIterator endIter)
 
label erase (std::initializer_list< label > list)
 
template<unsigned N>
label erase (const FixedList< label, N > &list)
 
label erase (const labelUList &list)
 
point centre (const UList< point > &pts) const
 
vector vec (const UList< point > &pts) const
 
vector unitVec (const UList< point > &pts) const
 
scalar mag (const UList< point > &pts) const
 
linePointRef line (const UList< point > &pts) const
 
label & operator[] (const label i)
 
const label & operator[] (const label i) const
 
unsigned hash_code (unsigned seed=0) const
 
template<class InputIterator >
Foam::label insert (InputIterator begIter, InputIterator endIter)
 
template<unsigned N>
Foam::label insert (const FixedList< label, N > &list)
 
template<class InputIterator >
Foam::label erase (InputIterator begIter, InputIterator endIter)
 
template<unsigned N>
Foam::label erase (const FixedList< label, N > &list)
 
const Tsecond () const noexcept
 
Tsecond () noexcept
 
- Public Member Functions inherited from Pair
 Pair ()=default
 
 Pair (const T &f, const T &s)
 
 Pair (T &&f, T &&s)
 
 Pair (const std::pair< T, T > &vals)
 
 Pair (std::pair< T, T > &&vals)
 
 Pair (const FixedList< T, 2 > &list)
 
 Pair (const T &f, const T &s, const bool doSort)
 
 Pair (const FixedList< T, 2 > &list, const bool doSort)
 
 Pair (Istream &is)
 
const Tsecond () const noexcept
 
Tsecond () noexcept
 
const Tother (const T &a) const
 
bool sorted () const
 
void flip ()
 
void sort ()
 

Static Public Member Functions

static int compare (const edge &a, const edge &b)
 
- Static Public Member Functions inherited from Pair
static int compare (const Pair< T > &a, const Pair< T > &b)
 

Static Public Attributes

static const char *const typeName = "edge"
 

Detailed Description

An edge is a list of two point labels. The functionality it provides supports the discretisation on a 2-D flat mesh.

The edge is implemented as a Pair/FixedList of labels. As well as geometrically relevant methods, it also provides methods similar to HashSet for additional convenience. Valid point labels are always non-negative (since they correspond to addressing within the mesh). The value '-1' is used to tag invalid point labels that correspond conceptually to open 'slots', which can be filled with a HashSet-like functionality.

Source files

Definition at line 59 of file edge.H.

Constructor & Destructor Documentation

◆ edge() [1/8]

edge ( )
inline

Definition at line 34 of file edgeI.H.

Referenced by cellShape::edge().

Here is the caller graph for this function:

◆ edge() [2/8]

edge ( const label  from,
const label  to 
)
inline

Definition at line 40 of file edgeI.H.

◆ edge() [3/8]

edge ( const labelPair pair)
inline

Definition at line 46 of file edgeI.H.

◆ edge() [4/8]

edge ( const FixedList< label, 2 > &  list)
inline

Definition at line 52 of file edgeI.H.

◆ edge() [5/8]

edge ( const label  from,
const label  to,
const bool  doSort 
)
inline

Definition at line 58 of file edgeI.H.

◆ edge() [6/8]

edge ( const FixedList< label, 2 > &  list,
const bool  doSort 
)
inline

Definition at line 64 of file edgeI.H.

◆ edge() [7/8]

edge ( const UList< label > &  list,
const FixedList< label, 2 > &  indices 
)
inline

Definition at line 71 of file edgeI.H.

◆ edge() [8/8]

edge ( Istream is)
inline

Definition at line 80 of file edgeI.H.

Member Function Documentation

◆ start() [1/2]

Foam::label & start ( ) const
inline

◆ start() [2/2]

label& start ( )
inline

◆ end() [1/2]

Foam::label & end ( ) const
inline

◆ end() [2/2]

label& end ( )
inline

◆ reverseEdge()

Foam::edge reverseEdge ( ) const
inline

Definition at line 218 of file edgeI.H.

Referenced by hexCell::reverseEdge(), and tetCell::reverseEdge().

Here is the caller graph for this function:

◆ minVertex()

Foam::label minVertex ( ) const
inline

Definition at line 111 of file edgeI.H.

◆ maxVertex()

Foam::label maxVertex ( ) const
inline

Definition at line 117 of file edgeI.H.

◆ valid()

bool valid ( ) const
inline

◆ found()

bool found ( const label  pointLabel) const
inline

Definition at line 129 of file edgeI.H.

Referenced by edge::commonVertex(), edge::connects(), intersectedSurface::intersectedSurface(), patchEdgeFaceRegions::updateEdge(), and patchEdgeFaceRegions::updateFace().

Here is the caller graph for this function:

◆ which()

Foam::label which ( const label  pointLabel) const
inline

Definition at line 140 of file edgeI.H.

◆ connects()

bool connects ( const edge other) const
inline

Definition at line 159 of file edgeI.H.

References edge::found().

Referenced by Foam::calcProximityOfFeatureEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ commonVertex()

Foam::label commonVertex ( const edge other) const
inline

Definition at line 165 of file edgeI.H.

References edge::found().

Referenced by removePoints::countPointUsage(), and GTSsurfaceFormat< Face >::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ otherVertex()

Foam::label otherVertex ( const label  pointLabel) const
inline

Definition at line 181 of file edgeI.H.

Referenced by removePoints::countPointUsage(), searchableExtrudedCircle::findParametricNearest(), and GTSsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ collapse()

Foam::label collapse ( )
inline

Definition at line 197 of file edgeI.H.

References n.

◆ count()

Foam::label count ( ) const
inline

Definition at line 231 of file edgeI.H.

References n.

◆ empty()

bool empty ( ) const
inline

Definition at line 247 of file edgeI.H.

◆ clear()

void clear ( )
inline

Definition at line 224 of file edgeI.H.

◆ insert() [1/7]

bool insert ( const label  index)
inline

Definition at line 253 of file edgeI.H.

◆ insert() [2/7]

label insert ( InputIterator  begIter,
InputIterator  endIter 
)
inline

◆ insert() [3/7]

Foam::label insert ( std::initializer_list< label >  list)
inline

Definition at line 308 of file edgeI.H.

References insert().

Here is the call graph for this function:

◆ insert() [4/7]

label insert ( const FixedList< label, N > &  list)
inline

◆ insert() [5/7]

Foam::label insert ( const labelUList list)
inline

Definition at line 321 of file edgeI.H.

References UList::begin(), UList::end(), and insert().

Here is the call graph for this function:

◆ erase() [1/7]

Foam::label erase ( const label  index)
inline

Definition at line 327 of file edgeI.H.

References n.

◆ erase() [2/7]

label erase ( InputIterator  begIter,
InputIterator  endIter 
)
inline

◆ erase() [3/7]

Foam::label erase ( std::initializer_list< label >  list)
inline

Definition at line 374 of file edgeI.H.

References erase().

Here is the call graph for this function:

◆ erase() [4/7]

label erase ( const FixedList< label, N > &  list)
inline

◆ erase() [5/7]

Foam::label erase ( const labelUList list)
inline

Definition at line 387 of file edgeI.H.

References UList::begin(), UList::end(), and erase().

Here is the call graph for this function:

◆ centre()

Foam::point centre ( const UList< point > &  pts) const
inline

Definition at line 395 of file edgeI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by surfaceFeatures::nearestEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vec()

Foam::vector vec ( const UList< point > &  pts) const
inline

◆ unitVec()

Foam::vector unitVec ( const UList< point > &  pts) const
inline

Definition at line 425 of file edgeI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), s, and Foam::Zero.

Referenced by cellFeatures::isFeaturePoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mag()

Foam::scalar mag ( const UList< point > &  pts) const
inline

Definition at line 443 of file edgeI.H.

References Foam::mag().

Referenced by face::longestEdge(), and surfaceFeatures::trimFeatures().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ line()

Foam::linePointRef line ( const UList< point > &  pts) const
inline

Definition at line 449 of file edgeI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by slidingInterface::modifyMotionPoints(), and syncTools::syncEdgeList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare()

int compare ( const edge a,
const edge b 
)
inlinestatic

Definition at line 26 of file edgeI.H.

References Foam::constant::physicoChemical::b, and Pair::compare().

Referenced by Foam::operator!=(), Foam::operator==(), and syncTools::syncEdgeList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator[]() [1/2]

Foam::label & operator[] ( const label  i)
inline

Definition at line 466 of file edgeI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ operator[]() [2/2]

const Foam::label & operator[] ( const label  i) const
inline

Definition at line 479 of file edgeI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ hash_code()

unsigned hash_code ( unsigned  seed = 0) const
inline

Definition at line 284 of file edge.H.

References Pair::second().

Referenced by edge::hasher::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insert() [6/7]

Foam::label insert ( InputIterator  begIter,
InputIterator  endIter 
)
inline

Definition at line 286 of file edgeI.H.

References insert().

Here is the call graph for this function:

◆ insert() [7/7]

Foam::label insert ( const FixedList< label, N > &  list)
inline

Definition at line 315 of file edgeI.H.

References FixedList::begin(), FixedList::end(), and insert().

Here is the call graph for this function:

◆ erase() [6/7]

Foam::label erase ( InputIterator  begIter,
InputIterator  endIter 
)
inline

Definition at line 355 of file edgeI.H.

References erase().

Here is the call graph for this function:

◆ erase() [7/7]

Foam::label erase ( const FixedList< label, N > &  list)
inline

Definition at line 381 of file edgeI.H.

References FixedList::begin(), FixedList::end(), and erase().

Here is the call graph for this function:

◆ second() [1/2]

const T& second
inlinenoexcept

◆ second() [2/2]

T& second
inlinenoexcept

Member Data Documentation

◆ typeName

const char *const typeName = "edge"
static

Definition at line 67 of file edge.H.


The documentation for this class was generated from the following files: