67 (octant & octantBit::rightHalf) ?
max().
x() :
min().
x(),
68 (octant & octantBit::topHalf) ?
max().
y() :
min().
y(),
69 (octant & octantBit::frontHalf) ?
max().z() :
min().z()
77 return subOctant(midpoint(), pt);
93 octant |= octantBit::rightHalf;
98 octant |= octantBit::topHalf;
101 if (pt.
z() > mid.
z())
103 octant |= octantBit::frontHalf;
118 return subOctant(midpoint(), pt, onEdge);
134 if (pt.
x() > mid.
x())
136 octant |= octantBit::rightHalf;
138 else if (pt.
x() == mid.
x())
143 if (pt.
y() > mid.
y())
145 octant |= octantBit::topHalf;
147 else if (pt.
y() == mid.
y())
152 if (pt.
z() > mid.
z())
154 octant |= octantBit::frontHalf;
156 else if (pt.
z() == mid.
z())
180 if (pt.
x() > mid.
x())
182 octant |= octantBit::rightHalf;
184 else if (pt.
x() == mid.
x())
189 octant |= octantBit::rightHalf;
193 if (pt.
y() > mid.
y())
195 octant |= octantBit::topHalf;
197 else if (pt.
y() == mid.
y())
202 octant |= octantBit::topHalf;
206 if (pt.
z() > mid.
z())
208 octant |= octantBit::frontHalf;
210 else if (pt.
z() == mid.
z())
215 octant |= octantBit::frontHalf;
231 vector dist = midpoint() - pt;
237 octant |= octantBit::rightHalf;
243 octant |= octantBit::topHalf;
249 octant |= octantBit::frontHalf;
257 if (dist.
x() < dist.
y())
259 if (dist.
y() < dist.
z())
261 min = octantBit::rightHalf;
262 mid = octantBit::topHalf;
263 max = octantBit::frontHalf;
265 else if (dist.
z() < dist.
x())
267 min = octantBit::frontHalf;
268 mid = octantBit::rightHalf;
269 max = octantBit::topHalf;
273 min = octantBit::rightHalf;
274 mid = octantBit::frontHalf;
275 max = octantBit::topHalf;
280 if (dist.
z() < dist.
y())
282 min = octantBit::frontHalf;
283 mid = octantBit::topHalf;
284 max = octantBit::rightHalf;
286 else if (dist.
x() < dist.
z())
288 min = octantBit::topHalf;
289 mid = octantBit::rightHalf;
290 max = octantBit::frontHalf;
294 min = octantBit::topHalf;
295 mid = octantBit::frontHalf;
296 max = octantBit::rightHalf;
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;
A 1D vector of objects of type <T> with a fixed size <Size>.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
A bounding box defined in terms of the points at its extremities.
const point & min() const
Minimum point defining the bounding box.
const point & max() const
Maximum point defining the bounding box.
vector span() const
The bounding box span (from minimum to maximum)
Standard boundBox + extra functionality for use in octree.
void searchOrder(const point &pt, FixedList< direction, 8 > &octantOrder) const
Calculates optimal order to look for nearest to point.
treeBoundBox extend(const scalar s) const
Return asymetrically extended bounding box, with guaranteed.
point corner(const direction) const
Corner point given octant.
direction subOctant(const point &pt) const
Returns octant number given point and the calculated midpoint.
scalar typDim() const
Typical dimension length,height,width.
treeBoundBox()
Construct null setting points to zero.
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.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
vector point
Point is a vector.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)