Proto
|
#include <Proto_DisjointBoxLayout.H>
Public Member Functions | |
DisjointBoxLayout (const ProblemDomain &a_problemDomain, const Point &a_boxSize) | |
Constructor (Full Domain) More... | |
DisjointBoxLayout (const ProblemDomain &a_problemDomain, const vector< Point > &a_coarsenedPatches, const Point &a_boxSize) | |
Constructor (Partial Domain) More... | |
DisjointBoxLayout (const DisjointBoxLayout &a_input) | |
Copy Constructor. More... | |
void | define (const ProblemDomain &a_problemDomain, const Point &a_boxSize) |
Define (Full Domain) More... | |
void | define (const ProblemDomain &a_problemDomain, const vector< Point > &a_coarsenedPatches, const Point &a_boxSize) |
Define (Partial Domain) More... | |
DisjointBoxLayout & | operator= (const DisjointBoxLayout &a_input) |
Assignment. More... | |
bool | operator== (const DisjointBoxLayout &a_input) const |
Equality Operator. | |
const DataIndex & | end () const |
DataIterator | begin () const |
Get Iterator. | |
bool | coarsenable (const Point &a_refrat) const |
Coarsenable Query. More... | |
DisjointBoxLayout | coarsen (const Point &a_refrat) const |
Coarsen. More... | |
DisjointBoxLayout | refine (const Point &a_refrat) const |
Refine. More... | |
Access operators. | |
const shared_ptr< DBLInternals > | dblInternals () const |
Get Internals. More... | |
Box | operator[] (const DataIndex &a_index) const |
Index Access. More... | |
Box | box (const DataIndex &a_index) const |
Box Indexing. More... | |
Point | point (const DataIndex &a_index) const |
Point Indexing. More... | |
int | procID (const DataIndex &a_index) const |
Get Process ID. | |
int | procid (const DataIndex &a_index) const |
unsigned int | offset (int a_proc) const |
Patch Offset. More... | |
unsigned int | offset () const |
DataIndex | index (Point &a_coarsenedPt) const |
Get Index From Point. More... | |
unsigned int | size () const |
Size. More... | |
unsigned int | localSize () const |
Local Size. More... | |
unsigned int | mySize () const |
DataIndex | index (unsigned int a_indexInt) const |
Global Indexing. More... | |
DataIndex | localIndex (unsigned int a_myIndexInt) const |
Local Indexing. More... | |
DataIndex | myIndex (unsigned int a_myIndexInt) const |
int | localIntIndex (const DataIndex &a_di) const |
Local Indexing (Inverse) More... | |
int | myIntIndex (const DataIndex &a_di) const |
Point | boxSize () const |
Get Box Size. More... | |
ProblemDomain | domain () const |
Get Problem Domain. | |
ProblemDomain | problemDomain () const |
DataIndex | find (const Point &a_pt) const |
Find Index. More... | |
Disjoint Box Layout.
Layout of disjoint, logically rectangular regions of DIM-dimensional space. This object is a simplified generalization of the DisjointBoxLayout class used in Chombo, now specialized to use fixed box sizes.
|
inline |
Constructor (Full Domain)
Creates a DisjointBoxLayout by covering an input ProblemDomain completely with boxes of a predetermined size. If MPI is used, boxes will be distributed over available processors using Morton ordering.
|
inline |
Constructor (Partial Domain)
Creates a DisjointBoxLayout by partially covering an input ProblemDomain with boxes according to a set of Points.
Each element of a_coarsenedPatches represents a box in the layout which has been coarsened by boxSize (resulting in a Box with a single element).
Concretely, for each Point p in the input array, a Box b will be constructed in the layout such that:
Point p => Box b = Box(p,p).refine(boxSize) = [boxSize*p, boxSize*(p + (1,1,...)) - (1,1,...)]
a_problemDomain | ProblemDomain containing the DBL. |
a_coarsenedPatches | contains the Points correcpoinding the patches in the DBL for all the processors. |
a_boxSize | is the size of a patch. Note that this allows anisotropic patches. |
|
inline |
Copy Constructor.
Copies share pointers to the same internal structure
|
inline |
Get Box Size.
Return the constant size of all boxes in the layout.
|
inline |
Coarsen.
Coarsens the layout by an input (possibly anisotropic) refinement ratio. coarsenable(refRatio) must be true or this function will result in an error.
The coarsened layout has: coarseLayout.problemDomain().box() == fineLayout.problemDomain.box().coarsen(refRatio) coarseLayout[ii] == fineLayout[ii].coarsen(refRatio) for each ii in [0, size()) TODO: Write this in LaTeX TODO: Can this change the number of Boxes? -CLG
|
inline |
Coarsenable Query.
Checks if the layout is coarsenable by a (possibly anisotropic) refinement ratio. This property requires the ProblemDomain to be coarsenable as well as boxSize() % refRatio == (0,0,....)
|
inline |
Get Internals.
Needed by DataIndex -PC
|
inline |
Define (Full Domain)
Construct a DisjointBoxLayout lazily or redefine an existing one.
|
inline |
Define (Partial Domain)
Construct a DisjointBoxLayout lazily or redefine an existing one.
|
inline |
Iterator End
Get Index From Point.
Find the DataIndex associated with an input bit point. This function is the inverse of DisjointBoxLayout::point(DataIndex).
Points outside the ProblemDomain will still correspond to a DataIndex provided they are in periodic images of the ProblemDomain.
|
inline |
|
inline |
|
inline |
|
inline |
Local Size.
Return the number of Boxes on this processor.
|
inline |
Patch Offset.
Returns the linear offset (in number of boxes) of the first patch on proc a_proc
|
inline |
Assignment.
Copies share pointers to the same internal structure
|
inline |
Refine.
Refines the layout by an input (possibly anisotropic) refinement ratio. Unline coarsen(...), this function should always be possible.
The refined layout has: fineLayout.problemDomain().box() == coarseLayout.problemDomain.box().refine(refRatio) fineLayout[ii] == coarseLayout[ii].refine(refRatio) for each ii in [0, size()) TODO: Write this in LaTeX TODO: If there is a max boxSize, this could change the number of Boxes -CLG
|
inline |
Size.
Return the number of Boxes contained in *this including those on other processors.