97 return (first() < second() ? first() : second());
103 return (first() > second() ? first() : second());
109 return (first() != second() && first() >= 0 && second() >= 0);
119 && (pointLabel == first() || pointLabel == second())
129 if (pointLabel == first())
133 if (pointLabel == second())
145 return (other.
found(first()) || other.
found(second()));
151 if (other.
found(first()))
155 if (other.
found(second()))
167 if (pointLabel == first())
171 if (pointLabel == second())
188 if (first() == second() || second() < 0)
218 if (first() == second() || second() < 0)
233 return (first() < 0 && second() < 0);
248 if (index != second())
254 else if (second() < 0)
257 if (index != first())
268 template<
class InputIterator>
271 InputIterator begIter,
272 InputIterator endIter
277 const int maxChange = ((first() < 0 ? 1 : 0) + (second() < 0 ? 1 : 0));
280 for (; changed < maxChange && begIter != endIter; ++begIter)
294 return insert(list.begin(), list.end());
320 if (index == first())
327 if (index == second())
337 template<
class InputIterator>
340 InputIterator begIter,
341 InputIterator endIter
346 const int maxChange = ((first() >= 0 ? 1 : 0) + (second() >= 0 ? 1 : 0));
349 for (; changed < maxChange && begIter != endIter; ++begIter)
360 return erase(list.begin(), list.end());
382 if (first() < 0 || second() < 0)
385 <<
"negative point index on edge " << *
this 390 return 0.5*(
pts[first()] +
pts[second()]);
397 if (first() < 0 || second() < 0)
400 <<
"negative point index on edge " << *
this 405 return pts[second()] -
pts[first()];
412 if (first() < 0 || second() < 0)
415 <<
"negative point index on edge " << *
this 423 return s < ROOTVSMALL ?
Zero : v/
s;
437 if (first() < 0 || second() < 0)
440 <<
"negative point index on edge " << *
this 452 if (first() < 0 || second() < 0)
455 <<
"negative point index on edge " << *
this 475 return (i ? second() : first());
488 return (i ? second() : first());
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
label count() const
Return the number of unique, valid (non -1) point labels.
label which(const label pointLabel) const
Return local index (0,1) of point label in edge -1 on failure.
bool found(const label pointLabel) const
Return true if point label is found in edge.
scalar mag(const UList< point > &pts) const
Return scalar magnitude of the edge.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
iterator begin() noexcept
Return an iterator to begin traversing the FixedList.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
edge reverseEdge() const
Return reverse edge as copy.
bool empty() const
Return true if edge has no valid point labels.
linePointRef line(const UList< point > &pts) const
Return edge line.
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
iterator end() noexcept
Return an iterator to end traversing the FixedList.
label b() const noexcept
The second vertex.
label otherVertex(const label pointLabel) const
Given the point label for one vertex, return the other one.
bool connected(const edge &other) const
True if the edge has at least one vertex in common with other.
Pair< Point > box() const
The enclosing (bounding) box for the line.
vector unitVec(const UList< point > &pts) const
Return the unit vector (end - start)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
label erase(const label index)
Remove an existing index from the edge and set its location to '-1'.
void clear()
'Clears' edge by setting both ends to invalid point labels.
bool insert(const label index)
Fill any open slot with the index if it did not previously exist.
line< point, const point & > linePointRef
A line using referred points.
label commonVertex(const edge &other) const
Return vertex common with other edge or -1 on failure.
static int compare(const Pair< label > &a, const Pair< label > &b)
Compare Pairs.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
label minVertex() const
Return the smallest point label used by the edge.
label collapse()
'Collapse' edge by marking duplicate point labels as '-1', the lower vertex is retained.
vector vec(const UList< point > &pts) const
Return the vector (end - start)
errorManip< error > abort(error &err)
iterator begin() noexcept
Return an iterator to begin traversing the UList.
Pair< point > box(const UList< point > &pts) const
The enclosing (bounding) box for the edge.
bool good() const noexcept
True if the vertices are unique and non-negative.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
label maxVertex() const
Return the largest point label used by the edge.
label a() const noexcept
The first vertex.
edge()
Default construct, with invalid point labels (-1)
point centre(const UList< point > &pts) const
Return centre point (centroid) of the edge.
bool operator!=(const eddy &a, const eddy &b)
iterator end() noexcept
Return an iterator to end traversing the UList.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
label & operator[](const label i)
Return edge element. Index should be limited to 0/1.
static int compare(const edge &a, const edge &b)
Compare edges.
static constexpr const zero Zero
Global zero (0)