Go to the documentation of this file.
38 point::uniform(-ROOTVGREAT),
39 point::uniform(ROOTVGREAT)
44 point::uniform(ROOTVGREAT),
45 point::uniform(-ROOTVGREAT)
121 auto& pt = tpt.ref();
124 pt[1] =
point(max_.x(), min_.y(), min_.z());
125 pt[2] =
point(max_.x(), max_.y(), min_.z());
126 pt[3] =
point(min_.x(), max_.y(), min_.z());
127 pt[4] =
point(min_.x(), min_.y(), max_.z());
128 pt[5] =
point(max_.x(), min_.y(), max_.z());
130 pt[7] =
point(min_.x(), max_.y(), max_.z());
139 auto& pts = tpts.ref();
143 pts[facei] = faceCentre(facei);
157 <<
"face should be [0..5]"
163 case 0: pt.
x() =
min().x();
break;
164 case 1: pt.
x() =
max().x();
break;
165 case 2: pt.
y() =
min().y();
break;
166 case 3: pt.
y() =
max().y();
break;
167 case 4: pt.
z() =
min().z();
break;
168 case 5: pt.
z() =
max().z();
break;
212 const auto& pts = tpts();
214 for (
const point&
p : pts)
226 return (above && below);
275 return point(surfPtx, surfPty, surfPtz);
291 reinterpret_cast<const char*
>(&bb.min_),
305 is >> bb.min_ >> bb.max_;
309 Detail::readContiguous<boundBox>
312 reinterpret_cast<char*
>(&bb.min_),
const Cmpt & x() const
Access to the vector x component.
void reduce()
Parallel reduction of min/max values.
static const Vector< scalar > one
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))
A class for managing temporary objects.
static const faceList faces
Faces to point addressing, as per a 'hex' cell.
point faceCentre(const direction facei) const
Face centre of given face index.
bool containsAny(const UList< point > &points) const
Contains any of the points? (inside or on edge)
void inflate(const scalar s)
Inflate box by factor*mag(span) in all dimensions.
static const boundBox invertedBox
A large inverted boundBox: min/max == +/- ROOTVGREAT.
streamFormat format() const noexcept
Get the current stream format.
Istream & operator>>(Istream &, directionInfo &)
virtual Ostream & write(const char c)
Write character.
const Cmpt & z() const
Access to the vector z component.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
bool intersect(const boundBox &bb)
Intersection (union) with the second box.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
point centre() const
The centre (midpoint) of the bounding box.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
boundBox()
Construct without any points - an inverted bounding box.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
OBJstream os(runTime.globalPath()/outputName)
point nearest(const point &pt) const
Return the nearest point on the boundBox to the supplied point.
errorManip< error > abort(error &err)
Vector< scalar > vector
A scalar version of the templated Vector.
Inter-processor communication reduction functions.
bool contains(const point &pt) const
Contains point? (inside or on edge)
const Cmpt & y() const
Access to the vector y component.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static const boundBox greatBox
A large boundBox: min/max == -/+ ROOTVGREAT.
bool intersects(const plane &pln) const
Does plane intersect this bounding box.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T> with a fixed length <N>.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
A bounding box defined in terms of min/max extrema points.
static const FixedList< vector, 6 > faceNormals
The unit normal per face.
The front (positive normal) side of the plane.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
side sideOfPlane(const point &p) const
Return the side of the plane that the point is on.
vector point
Point is a vector.
tmp< pointField > points() const
Corner points in an order corresponding to a 'hex' cell.
tmp< pointField > faceCentres() const
Face midpoints.
void add(const boundBox &bb)
Extend to include the second box.