83 labelPair(list[indices.first()], list[indices.last()])
120 return (first() < second() ? first() : second());
126 return (first() > second() ? first() : second());
132 return (first() != second() && first() >= 0 && second() >= 0);
142 && (pointLabel == first() || pointLabel == second())
152 if (pointLabel == first())
156 if (pointLabel == second())
168 return (other.
found(first()) || other.
found(second()));
174 if (other.
found(first()))
178 if (other.
found(second()))
190 if (pointLabel == first())
194 if (pointLabel == second())
211 if (first() == second() || second() < 0)
241 if (first() == second() || second() < 0)
256 return (first() < 0 && second() < 0);
271 if (index != second())
277 else if (second() < 0)
280 if (index != first())
291template<
class InputIterator>
294 InputIterator begIter,
295 InputIterator endIter
300 const int maxChange = ((first() < 0 ? 1 : 0) + (second() < 0 ? 1 : 0));
303 for (; changed < maxChange && begIter != endIter; ++begIter)
317 return insert(list.begin(), list.end());
343 if (index == first())
350 if (index == second())
360template<
class InputIterator>
363 InputIterator begIter,
364 InputIterator endIter
369 const int maxChange = ((first() >= 0 ? 1 : 0) + (second() >= 0 ? 1 : 0));
372 for (; changed < maxChange && begIter != endIter; ++begIter)
374 changed +=
erase(*begIter);
383 return erase(list.begin(), list.end());
405 if (first() < 0 || second() < 0)
408 <<
"negative point index on edge " << *
this
413 return 0.5*(pts[first()] + pts[second()]);
420 if (first() < 0 || second() < 0)
423 <<
"negative point index on edge " << *
this
428 return pts[second()] - pts[first()];
435 if (first() < 0 || second() < 0)
438 <<
"negative point index on edge " << *
this
443 const vector v = (pts[second()] - pts[first()]);
446 return s < ROOTVSMALL ?
Zero : v/
s;
452 return ::Foam::mag(vec(pts));
459 if (first() < 0 || second() < 0)
462 <<
"negative point index on edge " << *
this
482 return (i ? second() : first());
495 return (i ? second() : first());
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A 1D vector of objects of type <T> with a fixed length <N>.
iterator end() noexcept
Return an iterator to end traversing the FixedList.
iterator begin() noexcept
Return an iterator to begin traversing the FixedList.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
scalar centre() const
Mid-point location, zero for an empty list.
static int compare(const Pair< label > &a, const Pair< label > &b)
Compare Pairs.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
iterator end() noexcept
Return an iterator to end traversing the UList.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
static int compare(const edge &a, const edge &b)
Compare edges.
bool valid() const
Return true if the vertices are unique and non-negative.
bool insert(const label index)
Fill any open slot with the index if it did not previously exist.
label otherVertex(const label pointLabel) const
Given the point label for one vertex, return the other one.
edge reverseEdge() const
Return reverse edge as copy.
label end() const
Return end (last/second) vertex label.
bool empty() const
Return true if edge has no valid point labels.
label which(const label pointLabel) const
Return local index (0,1) of point label in edge -1 on failure.
edge()
Default construct, with invalid point labels (-1)
label commonVertex(const edge &other) const
Return vertex common with other edge or -1 on failure.
label minVertex() const
Return the smallest point label used by the edge.
label & operator[](const label i)
Return edge element. Index should be limited to 0/1.
void clear()
'Clears' edge by setting both ends to invalid point labels.
label count() const
Return the number of unique, valid (non -1) point labels.
bool found(const label pointLabel) const
Return true if point label is found in edge.
bool connects(const edge &other) const
Do the edges share a common vertex index?
label maxVertex() const
Return the largest point label used by the edge.
label erase(const label index)
Remove an existing index from the edge and set its location to '-1'.
label start() const
Return start (first) vertex label.
Computes the magnitude of an input field.
Point unitVec() const
Return the unit vector (start-to-end)
Point vec() const
Return start-to-end vector.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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))
bool operator!=(const eddy &a, const eddy &b)
line< point, const point & > linePointRef
A line using referred points.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
srcOptions insert("case", fileName(rootDirSource/caseDirSource))