36 point(-VGREAT, -VGREAT, -VGREAT),
37 point(VGREAT, VGREAT, VGREAT)
43 point(VGREAT, VGREAT, VGREAT),
44 point(-VGREAT, -VGREAT, -VGREAT)
50 void Foam::boundBox::calculate(
const UList<point>& points,
const bool doReduce)
60 min_ =
point(VGREAT, VGREAT, VGREAT);
61 max_ =
point(-VGREAT, -VGREAT, -VGREAT);
70 for (
label i = 1; i < points.size(); i++)
80 reduce(min_, minOp<point>());
81 reduce(max_, maxOp<point>());
93 calculate(points, doReduce);
102 calculate(
points(), doReduce);
122 min_ =
point(VGREAT, VGREAT, VGREAT);
123 max_ =
point(-VGREAT, -VGREAT, -VGREAT);
128 min_ = points[indices[0]];
129 max_ = points[indices[0]];
131 for (
label i=1; i < indices.size(); ++i)
155 pt[1] =
point(max_.
x(), min_.
y(), min_.
z());
156 pt[2] =
point(max_.
x(), max_.
y(), min_.
z());
157 pt[3] =
point(min_.
x(), max_.
y(), min_.
z());
158 pt[4] =
point(min_.
x(), min_.
y(), max_.
z());
159 pt[5] =
point(max_.
x(), min_.
y(), max_.
z());
161 pt[7] =
point(min_.
x(), max_.
y(), max_.
z());
310 return point(surfPtx, surfPty, surfPtz);
326 reinterpret_cast<const char*>(&bb.min_),
332 os.
check(
"Ostream& operator<<(Ostream&, const boundBox&)");
341 is >> bb.min_ >> bb.max_;
347 reinterpret_cast<char*>(&bb.min_),
353 is.
check(
"Istream& operator>>(Istream&, boundBox&)");
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static bool & parRun()
Is this a parallel run?
boundBox()
Construct null, setting points to zero.
static const boundBox invertedBox
A very large inverted boundBox: min/max == +/- VGREAT.
vector point
Point is a vector.
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 ))
scalar mag() const
The magnitude of the bounding box span.
bool empty() const
Return true if the UList is empty (ie, size() is zero).
void clear() const
If object pointer points to valid object:
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual Istream & read(token &)=0
Return next token from stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool containsAny(const UList< point > &) const
Contains any of the points? (inside or on edge)
point nearest(const point &) const
Return the nearest point on the boundBox to the supplied point.
Ostream & operator<<(Ostream &, const edgeMesh &)
tmp< pointField > points() const
Return corner points in an order corresponding to a 'hex' cell.
vectorField pointField
pointField is a vectorField.
static faceList faces()
Return faces with correct point order.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void setSize(const label)
Reset size of List.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
static const scalar great
The great value used for greatBox and invertedBox.
streamFormat format() const
Return current stream format.
virtual Ostream & write(const token &)=0
Write next token to stream.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
static const boundBox greatBox
A very large boundBox: min/max == -/+ VGREAT.
A bounding box defined in terms of the points at its extremities.
bool contains(const point &) const
Contains point? (inside or on edge)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Istream & operator>>(Istream &, edgeMesh &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void inflate(const scalar s)
Inflate box by factor*mag(span) in all dimensions.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
A class for managing temporary objects.