Go to the documentation of this file.
67 (octant & RIGHTHALF) ?
max().
x() :
min().
x(),
68 (octant & TOPHALF) ?
max().
y() :
min().
y(),
69 (octant & FRONTHALF) ?
max().z() :
min().z()
77 return subOctant(midpoint(), pt);
101 if (pt.
z() > mid.
z())
118 return subOctant(midpoint(), pt, onEdge);
134 if (pt.
x() > mid.
x())
138 else if (pt.
x() == mid.
x())
143 if (pt.
y() > mid.
y())
147 else if (pt.
y() == mid.
y())
152 if (pt.
z() > mid.
z())
156 else if (pt.
z() == mid.
z())
180 if (pt.
x() > mid.
x())
184 else if (pt.
x() == mid.
x())
193 if (pt.
y() > mid.
y())
197 else if (pt.
y() == mid.
y())
206 if (pt.
z() > mid.
z())
210 else if (pt.
z() == mid.
z())
231 vector dist = midpoint() - pt;
257 if (dist.
x() < dist.
y())
259 if (dist.
y() < dist.
z())
265 else if (dist.
z() < dist.
x())
280 if (dist.
z() < dist.
y())
286 else if (dist.
x() < dist.
z())
301 octantOrder[0] = octant;
303 octantOrder[1] = octant ^
min;
304 octantOrder[2] = octant ^ mid;
305 octantOrder[3] = octant ^
max;
307 octantOrder[4] = octantOrder[1] ^ mid;
308 octantOrder[5] = octantOrder[1] ^
max;
309 octantOrder[6] = octantOrder[2] ^
max;
311 octantOrder[7] = octantOrder[4] ^
max;
331 newSpan[dir] =
Foam::max(newSpan[dir], minSpan);
Simple random number generator.
const point & max() const
Maximum describing the bounding box.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
Standard boundBox + extra functionality for use in octree.
@ nComponents
Number of components in this vector space.
treeBoundBox()
Construct null setting points to zero.
dimensioned< scalar > mag(const dimensioned< Type > &)
vector span() const
The bounding box span (from minimum to maximum)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
treeBoundBox extend(Random &, const scalar s) const
Return slightly wider bounding box.
scalar typDim() const
Typical dimension length,height,width.
void searchOrder(const point &pt, FixedList< direction, 8 > &octantOrder) const
Calculates optimal order to look for nearest to point.
const point & min() const
Minimum describing the bounding box.
point corner(const direction) const
Corner point given octant.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().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))
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
direction subOctant(const point &pt) const
Returns octant number given point and the calculated midpoint.
A 1D vector of objects of type <T> with a fixed size <Size>.
A bounding box defined in terms of the points at its extremities.
vector point
Point is a vector.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
cachedRandom rndGen(label(0), -1)