Chombo + EB
3.0
|
A BoxLayout that has a concept of disjointedness. More...
#include <DisjointBoxLayout.H>
Public Member Functions | |
const ProblemDomain & | physDomain () const |
virtual void | closeNoSort () |
Constructors, destructors, defines | |
DisjointBoxLayout () | |
DisjointBoxLayout (const Vector< Box > &a_boxes, const Vector< int > &a_procIDs) | |
DisjointBoxLayout (const Vector< Box > &a_boxes, const Vector< int > &a_procIDs, const ProblemDomain &a_physDomain) | |
virtual | ~DisjointBoxLayout () |
virtual void | define (const Vector< Box > &a_boxes, const Vector< int > &a_procIDs) |
void | defineAndLoadBalance (const Vector< Box > &a_boxes, Vector< int > *a_procIDs) |
void | defineAndLoadBalance (const Vector< Box > &a_boxes, Vector< int > *a_procIDs, const ProblemDomain &a_physDomain) |
void | define (const BoxLayout &a_layout) |
void | define (const BoxLayout &a_layout, const ProblemDomain &a_physDomain) |
virtual void | define (const Vector< Box > &a_boxes, const Vector< int > &a_procIDs, const ProblemDomain &a_physDomain) |
virtual void | define_pd (const Vector< Box > &a_boxes, const Vector< int > &a_procIDs, const ProblemDomain &a_physDomain) |
Checks | |
bool | isDisjoint () const |
bool | checkPeriodic (const ProblemDomain &a_domain) const |
bool | checkDomains (const DisjointBoxLayout &a_dbl) const |
Public Member Functions inherited from BoxLayout | |
Vector< Box > | boxArray () const |
Vector< int > | procIDs () const |
unsigned int | indexI (const LayoutIndex &) const |
BoxLayout () | |
BoxLayout (const Vector< Box > &a_boxes, const Vector< int > &a_procIDs) | |
void | transform (BaseTransform &a_transform) |
virtual | ~BoxLayout () |
BoxLayout & | operator= (const BoxLayout &a_rhs) |
Box | operator[] (const LayoutIndex &it) const |
Box | operator[] (const LayoutIterator &it) const |
Box | operator[] (const DataIterator &it) const |
Box | get (const LayoutIndex &it) const |
Box | get (const DataIterator &it) const |
Box | get (const LayoutIterator &it) const |
unsigned int | procID (const LayoutIndex &a_index) const |
bool | sameBoxes (const BoxLayout &a_layout) const |
Checks whether this layout has the same boxes in the same order as a_layout. More... | |
int | numBoxes (const int procID) const |
Returns the number of boxes assigned to a given procID. More... | |
long long | numCells () const |
Return number of cells in all boxes of entire box layout. More... | |
unsigned int | size () const |
Returns the total number of boxes in the BoxLayout. More... | |
unsigned int | index (const LayoutIndex &index) const |
unsigned int | lindex (const DataIndex &index) const |
bool | operator== (const BoxLayout &rhs) const |
bool | operator< (const BoxLayout &rhs) const |
int | refCount () const |
bool | eq (const BoxLayout &rhs) const |
bool | isClosed () const |
bool | isSorted () const |
bool | check (const LayoutIndex &index) const |
bool | compatible (const BoxLayout &a_rhs) const |
DataIterator | dataIterator () const |
Parallel iterator. More... | |
TimedDataIterator | timedDataIterator () const |
LayoutIterator | layoutIterator () const |
Iterator that processes through ALL the boxes in a BoxLayout. More... | |
void | print () const |
void | p () const |
bool | coarsenable (int refRatio) const |
void | growSide (int idir, int length, Side::LoHiSide a_sd) |
void | surroundingNodes () |
void | convertOldToNew (const IntVect &a_permutation, const IntVect &a_sign, const IntVect &a_translation) |
void | convertNewToOld (const IntVect &a_permutation, const IntVect &a_sign, const IntVect &a_translation) |
void | enclosedCells () |
void | coarsen (int a_ref) |
void | refine (int a_ref) |
void | grow (int a_growth) |
void | grow (IntVect a_growth) |
void | grow (int a_dir, int a_growth) |
void | adjCellSide (int a_dir, int a_len, Side::LoHiSide a_sd) |
void | operator &= (const Box &a_box) |
void | operator &= (const ProblemDomain &a_domain) |
void | setProcID (const LayoutIndex &a_index, unsigned int a_procID) |
void | sort () |
Protected Member Functions | |
void | computeNeighbors () |
virtual void | closeN (RefCountedPtr< Vector< Vector< std::pair< int, LayoutIndex > > > > neighbors) |
virtual void | closeNO () |
Protected Member Functions inherited from BoxLayout | |
void | buildDataIndex () |
void | checkDefine (const Vector< Box > &a_boxes, const Vector< int > &procIDs) |
Protected Attributes | |
ProblemDomain | m_physDomain |
RefCountedPtr< Vector< Vector< std::pair< int, LayoutIndex > > > > | m_neighbors |
Protected Attributes inherited from BoxLayout | |
RefCountedPtr< Vector< Entry > > | m_boxes |
RefCountedPtr< int > | m_layout |
RefCountedPtr< bool > | m_closed |
RefCountedPtr< bool > | m_sorted |
RefCountedPtr< DataIterator > | m_dataIterator |
RefCountedPtr< Vector< LayoutIndex > > | m_indicies |
Friends | |
class | Copier |
class | NeighborIterator |
Neighbor functions | |
void | adjCellLo (DisjointBoxLayout &a_output, const DisjointBoxLayout &a_input, int a_dir, int a_len=1) |
void | adjCellHi (DisjointBoxLayout &a_output, const DisjointBoxLayout &a_input, int a_dir, int a_len=1) |
Friends inherited from BoxLayout |
Modification functions | |
void | coarsen (DisjointBoxLayout &output, const DisjointBoxLayout &input, int refinement) |
void | refine (DisjointBoxLayout &output, const DisjointBoxLayout &input, int refinement) |
virtual void | close () |
void | setDomain (const ProblemDomain &a_domain) |
virtual void | deepCopy (const DisjointBoxLayout &a_source) |
virtual void | deepCopy (const BoxLayout &a_source) |
virtual void | deepCopy (const BoxLayout &a_source, const ProblemDomain &a_physDomain) |
void | degenerate (DisjointBoxLayout &a_to, const SliceSpec &a_ss) const |
A BoxLayout that has a concept of disjointedness.
DisjointBoxLayout is-a BoxLayout that has a concept of disjointedness of the boxes. DisjointBoxLayout is only different from BoxLayout in that it has a method isDisjoint(). DisjointBoxLayouts also have a ProblemDomain member to ensure disjointness in the case of periodic boundary conditions, among other things.
DisjointBoxLayout::DisjointBoxLayout | ( | ) |
Construct BoxLayout with no boxes.
DisjointBoxLayout::DisjointBoxLayout | ( | const Vector< Box > & | a_boxes, |
const Vector< int > & | a_procIDs, | ||
const ProblemDomain & | a_physDomain | ||
) |
|
inlinevirtual |
Ref-counted destruction. Once the last reference to the implementation of this class is destroyed, the data members are cleaned up.
References define(), and defineAndLoadBalance().
|
virtual |
Define this DisjointBoxLayout from a Vector of Boxes. This is a wrapper for a call to BoxLayout::define, required because DisjointBoxLayout::define is overloaded and the compiler will not look into the base class for name resolution.
Reimplemented from BoxLayout.
Referenced by define_pd(), and ~DisjointBoxLayout().
void DisjointBoxLayout::defineAndLoadBalance | ( | const Vector< Box > & | a_boxes, |
Vector< int > * | a_procIDs | ||
) |
Like the define() that takes the same two arguments, except this one also initializes a_procIDs if it's not NULL. In that case, the passed-in a_procIDs should point to a Vector of size 0.
Referenced by ~DisjointBoxLayout().
void DisjointBoxLayout::defineAndLoadBalance | ( | const Vector< Box > & | a_boxes, |
Vector< int > * | a_procIDs, | ||
const ProblemDomain & | a_physDomain | ||
) |
void DisjointBoxLayout::define | ( | const BoxLayout & | a_layout | ) |
Shallow define. Only way to promote a BoxLayout. If BoxLayout has been closed, then this method checks isDisjoint and throws an error if not disjoint. If a_layout is disjoint, then this object becomes a closed DisjointBoxLayout object.
void DisjointBoxLayout::define | ( | const BoxLayout & | a_layout, |
const ProblemDomain & | a_physDomain | ||
) |
Shallow define. Only way to promote a BoxLayout. If BoxLayout has been closed, then this method checks isDisjoint and throws an error if not disjoint. If a_layout is disjoint, then this object becomes a closed DisjointBoxLayout object. If BoxLayout has been closed, and is sorted, the neighbour iterator is rebuilt (now with knowledge of the problem domain).
|
virtual |
Define this DisjointBoxLayout from a Vector of Boxes. This is a wrapper for a call to BoxLayout::define, required because DisjointBoxLayout::define is overloaded and the compiler will not look into the base class for name resolution.
|
inlinevirtual |
Define this DisjointBoxLayout from a Vector of Boxes. Same as define.
References checkDomains(), checkPeriodic(), close(), define(), and isDisjoint().
bool DisjointBoxLayout::isDisjoint | ( | ) | const |
Returns true
if this object contains a disjoint union of Boxes.
The Disjoint testing algorithm assumes that the boxes are CELL-Centered boxes. We can expand the algorithm when someone needs it. bvs
Referenced by define_pd().
bool DisjointBoxLayout::checkPeriodic | ( | const ProblemDomain & | a_domain | ) | const |
Checks to see that problem domains are compatible. To be compatible:
There are no checks in non-periodic directions, since DisjointBoxLayouts don't care about physical domains except in the periodic case.
Referenced by define_pd().
bool DisjointBoxLayout::checkDomains | ( | const DisjointBoxLayout & | a_dbl | ) | const |
Performs problem domain check when we don't have direct access to a problemDomain.
Returns true
if this and a_dbl have compatible ProblemDomains.
Referenced by define_pd().
|
virtual |
Mark this DisjointBoxLayout as complete and unchangeable.
Reimplemented from BoxLayout.
Referenced by blockReadLevel(), define_pd(), and readLevel().
|
inline |
Set ProblemDomain. Useful when using addBox() and trying to use closeNoSort()
References adjCellHi, adjCellLo, closeNoSort(), coarsen, deepCopy(), degenerate(), MayDay::Error(), BoxLayout::m_closed, m_physDomain, physDomain(), and refine.
|
virtual |
Create new open DisjointBoxLayout with copied data.
Doesn't check for disjointness, since a_source is already guaranteed to be disjoint. Also copies problem domain info.
Referenced by setDomain().
|
virtual |
Create new open DisjointBoxLayout with copied data.
Checks that the source BoxLayout isDisjoint, throws an error if it is not. Otherwise, same as BoxLayout::deepCopy.
Reimplemented from BoxLayout.
|
virtual |
Create new open DisjointBoxLayout with copied data.
Checks that the source BoxLayout isDisjoint, throws an error if it is not. Otherwise, same as BoxLayout::deepCopy.
void DisjointBoxLayout::degenerate | ( | DisjointBoxLayout & | a_to, |
const SliceSpec & | a_ss | ||
) | const |
Makes a_to a one-cell-thick version of *this – sliced at a_ss.position along the a_ss.direction'th axis. If a_ss.position is outside the range of *this, that's a fatal error.
Referenced by LevelData< EBFluxFAB >::degenerate(), and setDomain().
const ProblemDomain& DisjointBoxLayout::physDomain | ( | ) | const |
Referenced by BCFunction::fillGhostCells(), setDomain(), and MergeSolver< T >::solve().
|
virtual |
Reimplemented from BoxLayout.
Referenced by setDomain().
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
friend |
|
friend |
|
friend |
Coarsen a DisjointBoxLayout:
output is first deepCopy'ed from input, then coarsen(refinement) is called on each box of output.
output returns from this function closed.
LayoutIterators and DataIterators from input and output can be used interchangeably.
Referenced by coarsen_dbl(), and setDomain().
|
friend |
Refine a DisjointBoxLayout:
output is first deepCopy'ed from input, then refine(refinement) is called on each box of output.
output returns from this function closed.
LayoutIterators and DataIterators from input and output can be used interchangeably.
Referenced by refine_dbl(), and setDomain().
|
friend |
Returns the set of boxes which you get from calling Box::adjCellLo on each box in input. Output must be open, is closed upon exit from this function. A negative length results in the set of boxes of width a_len on the low side of, but inside the original boxes.
Referenced by adjCellLo_dbl(), and setDomain().
|
friend |
Returns the set of boxes which result from calling Box::adjCellHi on each box in input. Output must be open, will be closed upon exiting this function. A negative length results in the set of boxes of width a_len on the low side of, but inside the original boxes.
Referenced by adjCellHi_dbl(), and setDomain().
|
protected |
Referenced by setDomain().
|
protected |