Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | 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]

Public Member Functions

 edge ()
 Null constructor for lists. More...
 
 edge (const label a, const label b)
 Construct from components. More...
 
 edge (const FixedList< label, 2 > &)
 Construct from FixedList. More...
 
 edge (Istream &)
 Construct from Istream. More...
 
label start () const
 Return start vertex label. More...
 
labelstart ()
 Return start vertex label. More...
 
label end () const
 Return end vertex label. More...
 
labelend ()
 Return end vertex label. More...
 
label otherVertex (const label a) const
 Given one vertex, return the other. More...
 
label commonVertex (const edge &a) const
 Return common vertex. More...
 
void flip ()
 Flip the edge in-place. More...
 
edge reverseEdge () const
 Return reverse edge. More...
 
point centre (const pointField &) const
 Return centre (centroid) More...
 
vector vec (const pointField &) const
 Return the vector (end - start) More...
 
scalar mag (const pointField &) const
 Return scalar magnitude. More...
 
linePointRef line (const pointField &) const
 Return edge line. More...
 
- Public Member Functions inherited from FixedList< label, 2 >
 FixedList ()
 Null constructor. More...
 
 FixedList (const labelv[Size])
 Construct from C-array. More...
 
 FixedList (const label &)
 Construct from value. More...
 
 FixedList (const UList< label > &)
 Construct from UList. More...
 
 FixedList (const SLList< label > &)
 Construct from SLList. More...
 
 FixedList (const FixedList< label, Size > &)
 Copy constructor. More...
 
 FixedList (Istream &)
 Construct from Istream. More...
 
autoPtr< FixedList< label, Size > > clone () const
 Clone. More...
 
label fcIndex (const label i) const
 Return the forward circular index, i.e. the next index. More...
 
label rcIndex (const label i) const
 Return the reverse circular index, i.e. the previous index. More...
 
const labelcdata () const
 Return a const pointer to the first data element,. More...
 
labeldata ()
 Return a pointer to the first data element,. More...
 
labelfirst ()
 Return the first element of the list. More...
 
const labelfirst () const
 Return first element of the list. More...
 
labellast ()
 Return the last element of the list. More...
 
const labellast () const
 Return the last element of the list. More...
 
void checkStart (const label start) const
 Check start is within valid range (0 ... size-1). More...
 
void checkSize (const label size) const
 Check size is within valid range (0 ... size). More...
 
void checkIndex (const label i) const
 Check index i is within valid range (0 ... size-1). More...
 
void resize (const label)
 Dummy resize function. More...
 
void setSize (const label)
 Dummy setSize function. More...
 
void transfer (const FixedList< label, Size > &)
 Copy (not transfer) the argument contents. More...
 
void writeEntry (Ostream &) const
 Write the FixedList as a dictionary entry. More...
 
void writeEntry (const word &keyword, Ostream &) const
 Write the FixedList as a dictionary entry with keyword. More...
 
labeloperator[] (const label)
 Return element of FixedList. More...
 
const labeloperator[] (const label) const
 Return element of constant FixedList. More...
 
void operator= (const labelv[Size])
 Assignment from array operator. Takes linear time. More...
 
void operator= (const UList< label > &)
 Assignment from UList operator. Takes linear time. More...
 
void operator= (const SLList< label > &)
 Assignment from SLList operator. Takes linear time. More...
 
void operator= (const label &)
 Assignment of all entries to the given value. More...
 
iterator begin ()
 Return an iterator to begin traversing the FixedList. More...
 
const_iterator begin () const
 Return const_iterator to begin traversing the constant FixedList. More...
 
iterator end ()
 Return an iterator to end traversing the FixedList. More...
 
const_iterator end () const
 Return const_iterator to end traversing the constant FixedList. More...
 
const_iterator cbegin () const
 Return const_iterator to begin traversing the constant FixedList. More...
 
const_iterator cend () const
 Return const_iterator to end traversing the constant FixedList. More...
 
reverse_iterator rbegin ()
 Return reverse_iterator to begin reverse traversing the FixedList. More...
 
const_reverse_iterator rbegin () const
 Return const_reverse_iterator to begin reverse traversing FixedList. More...
 
reverse_iterator rend ()
 Return reverse_iterator to end reverse traversing the FixedList. More...
 
const_reverse_iterator rend () const
 Return const_reverse_iterator to end reverse traversing FixedList. More...
 
const_reverse_iterator crbegin () const
 Return const_reverse_iterator to begin reverse traversing FixedList. More...
 
const_reverse_iterator crend () const
 Return const_reverse_iterator to end reverse traversing FixedList. More...
 
label size () const
 Return the number of elements in the FixedList. More...
 
label max_size () const
 Return size of the largest possible FixedList. More...
 
bool empty () const
 Return true if the FixedList is empty (ie, size() is zero). More...
 
void swap (FixedList< label, Size > &)
 Swap two FixedLists of the same type in constant time. More...
 
bool operator== (const FixedList< label, Size > &) const
 Equality operation on FixedLists of the same type. More...
 
bool operator!= (const FixedList< label, Size > &) const
 The opposite of the equality operation. Takes linear time. More...
 
bool operator< (const FixedList< label, Size > &) const
 Compare two FixedLists lexicographically. Takes linear time. More...
 
bool operator> (const FixedList< label, Size > &) const
 Compare two FixedLists lexicographically. Takes linear time. More...
 
bool operator<= (const FixedList< label, Size > &) const
 Return true if !(a > b). Takes linear time. More...
 
bool operator>= (const FixedList< label, Size > &) const
 Return true if !(a < b). Takes linear time. More...
 

Static Public Member Functions

static int compare (const edge &, const edge &)
 Compare edges. More...
 
- Static Public Member Functions inherited from FixedList< label, 2 >
static const FixedList< label, Size > & null ()
 Return a null FixedList. More...
 

Static Public Attributes

static const char *const typeName = "edge"
 

Friends

bool operator== (const edge &a, const edge &b)
 
bool operator!= (const edge &a, const edge &b)
 

Additional Inherited Members

- Public Types inherited from FixedList< label, 2 >
typedef label value_type
 Type of values the FixedList contains. More...
 
typedef labelreference
 Type that can be used for storing into. More...
 
typedef const labelconst_reference
 Type that can be used for storing into. More...
 
typedef label difference_type
 The type that can represent the difference between any two. More...
 
typedef label size_type
 The type that can represent the size of a FixedList. More...
 
typedef labeliterator
 Random access iterator for traversing FixedList. More...
 
typedef const labelconst_iterator
 Random access iterator for traversing FixedList. More...
 
typedef labelreverse_iterator
 Reverse iterator for reverse traversal of FixedList. More...
 
typedef const labelconst_reverse_iterator
 Reverse iterator for reverse traversal of constant FixedList. More...
 

Detailed Description

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

Source files

Definition at line 58 of file edge.H.

Constructor & Destructor Documentation

edge ( )
inline

Null constructor for lists.

Definition at line 55 of file edgeI.H.

Referenced by edge::reverseEdge().

Here is the caller graph for this function:

edge ( const label  a,
const label  b 
)
inline

Construct from components.

Definition at line 59 of file edgeI.H.

References Foam::constant::physicoChemical::b, edge::end(), and edge::start().

Here is the call graph for this function:

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

Construct from FixedList.

Definition at line 66 of file edgeI.H.

References edge::end(), and edge::start().

Here is the call graph for this function:

edge ( Istream is)
inline

Construct from Istream.

Definition at line 73 of file edgeI.H.

Member Function Documentation

Foam::label start ( ) const
inline

Return start vertex label.

Definition at line 81 of file edgeI.H.

References FixedList< label, 2 >::operator[]().

Referenced by edgeSurface::addIntersectionEdges(), edge::centre(), edgeCollapser::checkMeshQuality(), PatchTools::checkOrientation(), PrimitivePatch< Face, FaceList, PointField, PointType >::checkTopology(), triSurfaceTools::collapseEdges(), edge::commonVertex(), curvedEdge::compare(), edgeVertex::coord(), polyMeshFilter::copyMesh(), twoDPointCorrector::correctDisplacement(), particle< Type >::crossEdgeConnectedFace(), geomCellLooper::cut(), edge::edge(), triFace::edgeDirection(), face::edgeDirection(), extendedEdgeMesh::edgeDirection(), edgeSurface::edgeSurface(), directionInfo::edgeToFaceIndex(), searchablePlateFeatures::features(), Foam::meshTools::findEdge(), triSurfaceTools::getEdge(), cellLooper::getFirstVertEdge(), triSurfaceTools::getVertexTriangles(), triSurfaceTools::getVertexVertices(), treeDataFace::getVolumeType(), triSurfaceTools::greenRefine(), intersectedSurface::intersectedSurface(), cellFeatures::isFeaturePoint(), edge::line(), edgeCollapser::markSmallEdges(), triSurfaceTools::maxEdge(), triSurfaceTools::minEdge(), slidingInterface::modifyMotionPoints(), motionSmootherAlgo::modifyMotionPoints(), surfaceFeatures::nearestEdges(), surfaceFeatures::nearestFeatEdge(), surfaceFeatures::nearestSamples(), surfaceFeatures::nearestSurfEdge(), cellCuts::nonAnchorPoints(), triSurfaceTools::oppositeEdge(), triSurfaceTools::oppositeVertex(), Foam::meshTools::otherEdge(), edge::otherVertex(), treeDataEdge::overlaps(), Foam::polyMeshZipUpCells(), edge::reverseEdge(), boundaryMesh::setFeatureEdges(), faceCollapser::setRefinement(), boundaryCutter::setRefinement(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), PatchTools::sortedEdgeFaces(), PatchTools::sortedPointEdges(), extendedEdgeMesh::sortPointsAndEdges(), surfaceIntersection::surfaceIntersection(), directionInfo::updateCell(), patchEdgeFaceRegions::updateEdge(), patchEdgeFaceRegions::updateFace(), boundaryCutter::updateMesh(), meshCutAndRemove::updateMesh(), meshCutter::updateMesh(), edge::vec(), PrimitivePatch< Face, FaceList, PointField, PointType >::whichEdge(), extendedEdgeMesh::writeObj(), and blockMesh::writeTopology().

Here is the call graph for this function:

Foam::label & start ( )
inline

Return start vertex label.

Definition at line 86 of file edgeI.H.

References FixedList< label, 2 >::operator[]().

Here is the call graph for this function:

Foam::label end ( ) const
inline

Return end vertex label.

Definition at line 92 of file edgeI.H.

References FixedList< label, 2 >::operator[]().

Referenced by edgeSurface::addIntersectionEdges(), edge::centre(), edgeCollapser::checkMeshQuality(), PatchTools::checkOrientation(), PrimitivePatch< Face, FaceList, PointField, PointType >::checkTopology(), triSurfaceTools::collapseEdges(), edge::commonVertex(), curvedEdge::compare(), edgeVertex::coord(), polyMeshFilter::copyMesh(), twoDPointCorrector::correctDisplacement(), particle< Type >::crossEdgeConnectedFace(), geomCellLooper::cut(), edge::edge(), triFace::edgeDirection(), face::edgeDirection(), extendedEdgeMesh::edgeDirection(), edgeSurface::edgeSurface(), directionInfo::edgeToFaceIndex(), searchablePlateFeatures::features(), Foam::meshTools::findEdge(), triSurfaceTools::getEdge(), cellLooper::getFirstVertEdge(), triSurfaceTools::getVertexTriangles(), triSurfaceTools::getVertexVertices(), treeDataFace::getVolumeType(), triSurfaceTools::greenRefine(), intersectedSurface::intersectedSurface(), cellFeatures::isFeaturePoint(), edge::line(), edgeCollapser::markSmallEdges(), triSurfaceTools::maxEdge(), triSurfaceTools::minEdge(), slidingInterface::modifyMotionPoints(), motionSmootherAlgo::modifyMotionPoints(), surfaceFeatures::nearestSurfEdge(), cellCuts::nonAnchorPoints(), triSurfaceTools::oppositeEdge(), triSurfaceTools::oppositeVertex(), Foam::meshTools::otherEdge(), edge::otherVertex(), treeDataEdge::overlaps(), Foam::polyMeshZipUpCells(), edge::reverseEdge(), boundaryMesh::setFeatureEdges(), meshCutAndRemove::setRefinement(), meshCutter::setRefinement(), PatchTools::sortedPointEdges(), extendedEdgeMesh::sortPointsAndEdges(), surfaceIntersection::surfaceIntersection(), boundaryCutter::updateMesh(), meshCutAndRemove::updateMesh(), meshCutter::updateMesh(), edge::vec(), and blockMesh::writeTopology().

Here is the call graph for this function:

Foam::label & end ( )
inline

Return end vertex label.

Definition at line 97 of file edgeI.H.

References FixedList< label, 2 >::operator[]().

Here is the call graph for this function:

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

Given one vertex, return the other.

Definition at line 103 of file edgeI.H.

References edge::end(), and edge::start().

Referenced by edgeCollapser::checkMeshQuality(), removePoints::countPointUsage(), hexRef8::faceLevel(), triSurfaceTools::getVertexVertices(), listPlusEqOp< T >::operator()(), GTSsurfaceFormat< Face >::read(), surfaceFeatures::setFromStatus(), and triSurfaceTools::surfaceSide().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Return common vertex.

Definition at line 121 of file edgeI.H.

References edge::end(), and edge::start().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void flip ( )
inline

Flip the edge in-place.

Definition at line 139 of file edgeI.H.

References Foam::Swap().

Referenced by patchEdgeFaceRegions::updateEdge(), and patchEdgeFaceRegions::updateFace().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::edge reverseEdge ( ) const
inline

Return reverse edge.

Definition at line 145 of file edgeI.H.

References edge::edge(), edge::end(), and edge::start().

Here is the call graph for this function:

Foam::point centre ( const pointField p) const
inline

Return centre (centroid)

Definition at line 151 of file edgeI.H.

References edge::end(), and edge::start().

Referenced by surfaceFeatures::nearestEdges(), surfaceFeatures::nearestFeatEdge(), hexRef8::setRefinement(), treeDataEdge::shapePoints(), pointEdgePoint::updateEdge(), and externalPointEdgePoint::updateEdge().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::vector vec ( const pointField p) const
inline
Foam::scalar mag ( const pointField p) const
inline

Return scalar magnitude.

Definition at line 163 of file edgeI.H.

References Foam::mag(), and edge::vec().

Referenced by snappySnapDriver::calcSnapDistance(), layerAdditionRemoval::changeTopology(), edgeCollapser::markSmallEdges(), surfaceFeatures::setFromStatus(), surfaceIntersection::surfaceIntersection(), and surfaceFeatures::trimFeatures().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::linePointRef line ( const pointField p) const
inline
int compare ( const edge a,
const edge b 
)
inlinestatic

Compare edges.

Returns:

  • 0: different
  • +1: identical
  • -1: same edge, but different orientation

Definition at line 36 of file edgeI.H.

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

Here is the caller graph for this function:

Friends And Related Function Documentation

bool operator== ( const edge a,
const edge b 
)
friend
bool operator!= ( const edge a,
const edge b 
)
friend

Member Data Documentation

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: