67 WxBox(TYPE s1, TYPE e1, TYPE s2, TYPE e2);
72 WxBox(TYPE s1, TYPE e1, TYPE s2, TYPE e2, TYPE s3, TYPE e3);
77 WxBox(TYPE s1, TYPE e1, TYPE s2, TYPE e2, TYPE s3, TYPE e3, TYPE s4, TYPE e4);
106 void resize(
const unsigned dim,
const TYPE newLength);
WxBox represents a n-dimensional box of elements specified by lower coordinates and upper coordinates...
Definition: wxbox.h:25
WxBox(unsigned ndims, const TYPE *lower, const TYPE *upper)
Constucts a box with given 'lower' and 'upper' bounds.
void lower(unsigned dim, TYPE low)
Set lower bound along dimension 'dim'.
Definition: wxbox.h:135
virtual TYPE length(unsigned dim) const
Length of edge along dimension 'dim'.
Definition: wxbox.h:188
bool operator==(const WxBox< TYPE > &b) const
Check if this box is equal to one supplied.
WxBox()
Definition: wxbox.h:27
WxBox(TYPE s1, TYPE e1, TYPE s2, TYPE e2, TYPE s3, TYPE e3)
Rank-3 ctor.
WxBox< TYPE > extend(TYPE uniformPad) const
Returns a box which is extended by the given amount along both sides in every dimension.
bool compareShape(const WxBox< TYPE > &candidateBox) const
Check if all side lengths of the supplied box match this one.
std::pair< TYPE, TYPE > boundsPair(unsigned dim) const
Pair of upper and lower bound along dimension 'dim'.
Definition: wxbox.h:170
WxBox(const WxBox< TYPE > &b)
Copy constructor and assignment operators.
unsigned _ndims
Definition: wxbox.h:324
static const int max_dims
Maximum rank box that can be represented.
Definition: wxbox.h:321
bool contains(const TYPE coord[]) const
Check if the box contains the given point.
TYPE area() const
Area of box.
virtual void setup(const WxCryptSet &wxc)
Constructs a box specified in a cryptset.
void extrude(const WxBox &box)
Increases the rank of this box to match that of the supplied box argument.
WxBox< TYPE > extend(const TYPE uniformPad[]) const
Returns a box which is extended by the given amount along both sides in each dimension.
unsigned ndims() const
Dimensionality of box.
Definition: wxbox.h:113
WxBox< TYPE > extend(const TYPE low[], const TYPE upp[]) const
Returns a box which is extended by the given amount along each side in each dimension.
TYPE _lower[max_dims]
Definition: wxbox.h:325
std::string coordinateString() const
String of box coordinates.
WxBox(TYPE s1, TYPE e1)
The following constructors constuct a box with explicit passing of lower s* and upper e* coordinates.
WxBox< TYPE > intersect(const WxBox< TYPE > &box) const
Computes intersection of this box with supplied box.
TYPE upper(unsigned dim) const
Upper bound along dimension 'dim'.
Definition: wxbox.h:147
WxBox< TYPE > reduceDim(unsigned int newDim) const
Returns a new box which has up to new number of dimensions.
TYPE lower(unsigned dim) const
Lower bound along dimension 'dim'.
Definition: wxbox.h:124
TYPE _upper[max_dims]
Definition: wxbox.h:325
WxBox(unsigned ndims, const TYPE *length)
Constucts a box given lengths of each side.
WxBox(TYPE s1, TYPE e1, TYPE s2, TYPE e2)
Rank-2 ctor.
WxBox(unsigned ndims)
Create a 'ndims' dimensional box.
WxBox(TYPE s1, TYPE e1, TYPE s2, TYPE e2, TYPE s3, TYPE e3, TYPE s4, TYPE e4)
Rank-4 ctor.
WxBox & operator=(const WxBox< TYPE > &b)
bool encloses(const WxBox< TYPE > &candidateBox) const
Check if the box encloses the given box.
WxBox< TYPE > extDim(TYPE low, TYPE upp) const
Returns a new box which has one greater dimension than this one.
virtual bool isEmpty() const
Determine if box is empty.
TYPE size() const
Area of box.
Definition: wxbox.h:205
TYPE _length[max_dims]
Definition: wxbox.h:325
void resize(const unsigned dim, const TYPE newLength)
Modify upper indicex based on newly supplied length.
void upper(unsigned dim, TYPE upp)
Set upper bound along dimension 'dim'.
Definition: wxbox.h:158
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
WxObject is a base class for WarpX classes which need to go through a creation/destruction cycle with...
Definition: wxobject.h:54
bool operator==(const WxBox< TYPE > &wa, const WxBox< TYPE > &wb)
Returns true if boxes are same.