50 for (
IdxType n=1; n<npts; n++) {
72 return lo[0] <= x[0] && x[0] <=
hi[0] &&
73 lo[1] <= x[1] && x[1] <=
hi[1] &&
74 lo[2] <= x[2] && x[2] <=
hi[2];
82 std::array<RealVec,8> c;
84 for (
int i=0; i<2; i++) {
85 for (
int j=0; j<2; j++) {
86 for (
int k=0; k<2; k++) {
87 c[ptr][0] = (i == 0) ?
lo[0] :
hi[0];
88 c[ptr][1] = (j == 0) ?
lo[1] :
hi[1];
89 c[ptr][2] = (k == 0) ?
lo[2] :
hi[2];
112 std::array<RealVec,8> c =
corners();
113 for (
int i=0; i<8; i++) c[i] = rot * c[i];
std::ostream & operator<<(std::ostream &os, const criptic::RealBox &b)
ASCII-formatted output of RealBox to stream.
Definition RealBox.cpp:15
std::istream & operator>>(std::istream &is, criptic::RealBox &b)
ASCII-formatted read of RealBox from stream.
Definition RealBox.cpp:6
Class that represents a rank 2 tensor.
Basic integer and real types.
Class that represents a mathematical vector in 3-space.
Class that represents a 3D rectangular prism.
Definition RealBox.H:30
RealBox operator+(const RealVec &v) const
Displace the position of a RealBox by a vector v.
Definition RealBox.H:143
bool contains(const RealVec &x) const
Is a point in the box?
Definition RealBox.H:71
RealVec hi
Definition RealBox.H:166
RealBox(const RealBox &rb1, const RealBox &rb2)
Construct a RealBox that contains two other RealBox's.
Definition RealBox.H:61
std::array< RealVec, 8 > corners() const
Return all corners of the box.
Definition RealBox.H:81
RealBox operator-(const RealVec &v) const
Displace the position of a RealBox by a vector -v.
Definition RealBox.H:156
void gaussExtrema(const RealTensor2 &eta, Real &gMin, Real &gMax) const
Find extrema of a Gaussian function on a box.
Definition RealBox.cpp:22
RealBox(const RealVec *pts, const IdxType npts)
Construct a RealBox that bounds an array of points.
Definition RealBox.H:47
RealBox(const RealVec &lo_=zeroVec, const RealVec &hi_=zeroVec)
Construct a RealBox from two vectors.
Definition RealBox.H:39
RealBox rotate(const RealTensor2 &rot) const
Rotate box and return a box containing it.
Definition RealBox.H:111
RealVec size() const
Return size of box.
Definition RealBox.H:101
RealVec lo
Definition RealBox.H:165
Class that represents a rank 2 tensor.
Definition RealTensor2.H:34
The primary namespace for criptic objects.
Definition AdvancePacket.H:25
std::vector< Real >::size_type IdxType
Definition Types.H:45
criptic::FieldQty max(const criptic::FieldQty &q1, const criptic::FieldQty &q2)
Take elementwise maximum of two FieldQty objects.
Definition FieldQty.H:277
double Real
Definition Types.H:38
static const RealVec zeroVec(0, 0, 0)
criptic::FieldQty min(const criptic::FieldQty &q1, const criptic::FieldQty &q2)
Take elementwise minimum of two FieldQty objects.
Definition FieldQty.H:263