Chombo + EB
3.0
|
#include <BoxLayoutData.H>
Classes | |
struct | ApplyFunctor |
Public Member Functions | |
LevelData () | |
LevelData (const DisjointBoxLayout &dp, int comps, const IntVect &ghost=IntVect::Zero, const DataFactory< T > &a_factory=DefaultDataFactory< T >()) | |
virtual | ~LevelData () |
virtual void | define (const DisjointBoxLayout &dp, int comps, const IntVect &ghost=IntVect::Zero, const DataFactory< T > &a_factory=DefaultDataFactory< T >()) |
virtual void | define (const LevelData< T > &da, const DataFactory< T > &a_factory=DefaultDataFactory< T >()) |
virtual void | define (const LevelData< T > &da, const Interval &comps, const DataFactory< T > &a_factory=DefaultDataFactory< T >()) |
virtual void | copyTo (const Interval &srcComps, BoxLayoutData< T > &dest, const Interval &destComps) const |
virtual void | copyTo (BoxLayoutData< T > &dest) const |
Simplest case – assumes source and dest have same interval. More... | |
virtual void | copyTo (const Interval &srcComps, BoxLayoutData< T > &dest, const Interval &destComps, const Copier &copier, const LDOperator< T > &a_op=LDOperator< T >()) const |
virtual void | copyTo (BoxLayoutData< T > &dest, const Copier &copier, const LDOperator< T > &a_op=LDOperator< T >()) const |
Simplest case – assumes source and dest have same interval. More... | |
virtual void | copyTo (const Interval &srcComps, LevelData< T > &dest, const Interval &destComps) const |
virtual void | copyTo (LevelData< T > &dest) const |
Simplest case – assumes source and dest have same interval. More... | |
virtual void | copyTo (const Interval &srcComps, LevelData< T > &dest, const Interval &destComps, const Copier &copier, const LDOperator< T > &a_op=LDOperator< T >()) const |
virtual void | copyTo (LevelData< T > &dest, const Copier &copier, const LDOperator< T > &a_op=LDOperator< T >()) const |
Simplest case – assumes source and dest have same interval. More... | |
virtual void | exchange (const Interval &comps) |
virtual void | exchange (void) |
Simplest case – do all components. More... | |
virtual void | exchange (const Interval &comps, const Copier &copier) |
virtual void | exchange (const Copier &copier) |
Simplest case – do all components. More... | |
virtual void | exchangeBegin (const Copier &copier) |
asynchronous exchange start. load and fire off messages. More... | |
virtual void | exchangeEnd () |
finish asynchronous exchange More... | |
virtual void | exchangeNoOverlap (const Copier &copier) |
const IntVect & | ghostVect () const |
const DisjointBoxLayout & | getBoxes () const |
const DisjointBoxLayout & | disjointBoxLayout () const |
virtual void | apply (void(*a_Function)(const Box &, int, T &)) |
virtual void | apply (const ApplyFunctor &) |
void | degenerate (LevelData< T > &a_to, const SliceSpec &a_ss) const |
overidden virtual functions | |
These functions will invoke error messages when invoked. C++ will ensure that constructors are not called for the base class by a user, but a 'define' function has no such protection, hence the need to prevent such usage. A runtime error is not a perfect solution...(strong construction gets around this sigh). classes that derive from LevelData will have to turn its valid defines into runtime errors also and make its own defines. Thus taking over the job of the compiler. | |
virtual void | define (const BoxLayout &dp, int comps, const DataFactory< T > &factory) |
virtual void | define (const BoxLayoutData< T > &da, const DataFactory< T > &factory=DefaultDataFactory< T >()) |
virtual void | define (const BoxLayoutData< T > &da, const Interval &comps, const DataFactory< T > &factory=DefaultDataFactory< T >()) |
virtual void | define (const BoxLayout &deadFunction) |
overridden and throws an error. More... | |
![]() | |
BoxLayoutData () | |
virtual | ~BoxLayoutData () |
BoxLayoutData (const BoxLayout &boxes, int comps, const DataFactory< T > &factory=DefaultDataFactory< T >()) | |
int | nComp () const |
Interval | interval () const |
void | generalCopyTo (const BoxLayout &a_destGrids, LayoutData< Vector< RefCountedPtr< T > > > &a_dest, const Interval &a_interval, const ProblemDomain &a_domain, const DataFactory< T > &factory=DefaultDataFactory< T >()) const |
General data copying operation. More... | |
void | generalCopyTo (const BoxLayout &a_destGrids, LayoutData< Vector< RefCountedPtr< T > > > &a_dest, const Interval &a_interval, const ProblemDomain &a_domain, const Copier &a_copier, const DataFactory< T > &factory=DefaultDataFactory< T >()) const |
void | addTo (const Interval &a_srcComps, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const ProblemDomain &a_domain) const |
void | addTo (const Interval &a_srcComps, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const ProblemDomain &a_domain, const Copier &a_copier) const |
virtual void | apply (void(*a_Function)(const Box &box, int comps, T &t)) |
virtual bool | isDefined () const |
virtual void | clear () |
![]() | |
LayoutData () | |
LayoutData (const BoxLayout &a_dp) | |
virtual | ~LayoutData () |
DataIterator | dataIterator () const |
TimedDataIterator | timedDataIterator () const |
const T & | operator[] (const DataIndex &a_index) const |
const accessor function More... | |
const T & | operator[] (const DataIterator &a_iterator) const |
const accessor function More... | |
T & | operator[] (const DataIndex &a_index) |
non-const accessor function More... | |
T & | operator[] (const DataIterator &a_iterator) |
non-const accessor function More... | |
Box | box (const DataIndex &a_index) const |
Box | box (const DataIterator &a_iterator) const |
const BoxLayout & | boxLayout () const |
Protected Attributes | |
DisjointBoxLayout | m_disjointBoxLayout |
IntVect | m_ghost |
Copier | m_exchangeCopier |
![]() | |
int | m_comps |
bool | m_isdefined |
CopierBuffer * | m_buff |
![]() | |
BoxLayout | m_boxLayout |
Vector< T * > | m_vector |
bool | m_callDelete |
Friends | |
void | aliasLevelData (LevelData< T > &a_alias, LevelData< T > *a_original, const Interval &a_interval) |
Data over a disjoint union of rectangles. More... | |
Additional Inherited Members | |
![]() | |
static int | s_verbosity = 0 |
![]() | |
void | setVector (const BoxLayoutData< T > &da, const Interval &srcComps, const Interval &destComps) |
void | allocateGhostVector (const DataFactory< T > &factory, const IntVect &ghost=IntVect::Zero) |
void | makeItSo (const Interval &a_srcComps, const BoxLayoutData< T > &a_src, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op=LDOperator< T >()) const |
void | makeItSoBegin (const Interval &a_srcComps, const BoxLayoutData< T > &a_src, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op=LDOperator< T >()) const |
void | makeItSoLocalCopy (const Interval &a_srcComps, const BoxLayoutData< T > &a_src, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op=LDOperator< T >()) const |
void | makeItSoEnd (BoxLayoutData< T > &a_dest, const Interval &a_destComps, const LDOperator< T > &a_op=LDOperator< T >()) const |
void | completePendingSends () const |
void | allocateBuffers (const BoxLayoutData< T > &a_src, const Interval &a_srcComps, const BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op) const |
void | writeSendDataFromMeIntoBuffers (const BoxLayoutData< T > &a_src, const Interval &a_srcComps, const LDOperator< T > &a_op) const |
void | postSendsFromMe () const |
void | postReceivesToMe () const |
void | unpackReceivesToMe (BoxLayoutData< T > &a_dest, const Interval &a_destComps, const LDOperator< T > &a_op) const |
void | unpackReceivesToMe_append (LayoutData< Vector< RefCountedPtr< T > > > &a_dest, const Interval &a_destComps, int ncomp, const DataFactory< T > &factory, const LDOperator< T > &a_op) const |
LevelData< T >::LevelData | ( | const DisjointBoxLayout & | dp, |
int | comps, | ||
const IntVect & | ghost = IntVect::Zero , |
||
const DataFactory< T > & | a_factory = DefaultDataFactory<T>() |
||
) |
|
virtual |
References CH_TIME, MayDay::Error(), and BoxLayout::isClosed().
Referenced by AliasDataFactory< T >::AliasDataFactory(), aliasLevelData(), blockRead(), PetscSolver< T >::computeResidual(), LevelDataOps< T >::create(), PetscSolverFAB< LevelData< FArrayBox > >::defineData(), LevelData< T >::degenerate(), BaseLevelHeatSolver< LevelData< FArrayBox >, FluxBox, LevelFluxRegister >::incrementFlux(), and read().
|
virtual |
copy definer. this LevelData thrown away and da's LevelData copied
References CH_TIME, LevelData< T >::copyTo(), BoxLayoutData< T >::m_comps, LevelData< T >::m_disjointBoxLayout, and LevelData< T >::m_ghost.
|
virtual |
Copy definer. 'this' LevelData thrown away and da's LevelData copied. This LevelData is now defined for the range [0, comps.size()] and filled with the data in da from [comps.begin(), comps.end()]
References Interval::begin(), CH_assert, CH_TIME, MayDay::Error(), LevelData< T >::m_disjointBoxLayout, LevelData< T >::m_ghost, and Interval::size().
|
virtual |
References LayoutData< T >::boxLayout(), and LayoutIterator::ok().
Referenced by LevelDataOps< T >::assign(), LevelData< T >::define(), and MergeSolver< T >::solve().
|
virtual |
Simplest case – assumes source and dest have same interval.
References CH_assert, BoxLayoutData< T >::interval(), and BoxLayoutData< T >::nComp().
|
virtual |
FM MOD START ////////////////////////// same as copyTo that takes a BoxLayoutData, except that it fills the ghost cells of 'dest' with data from 'this' also. USer passes in a prebuilt Copier object
References CH_TIME.
|
virtual |
Simplest case – assumes source and dest have same interval.
References CH_assert, BoxLayoutData< T >::interval(), and BoxLayoutData< T >::nComp().
|
virtual |
FM MOD. END //////////////////////////// same as copyTo that takes a BoxLayoutData, except that it fills the ghost cells of 'dest' with data from 'this' also.
References LayoutData< T >::boxLayout(), MayDay::Error(), LevelData< T >::getBoxes(), LevelData< T >::ghostVect(), LevelData< T >::m_ghost, LayoutIterator::ok(), and IntVect::Zero.
Simplest case – assumes source and dest have same interval.
References CH_assert, BoxLayoutData< T >::interval(), and BoxLayoutData< T >::nComp().
|
virtual |
same as copyTo that takes a BoxLayoutData, except that it fills the ghost cells of 'dest' with data from 'this' also. USer passes in a prebuilt Copier object
References CH_TIME.
|
virtual |
Simplest case – assumes source and dest have same interval.
References CH_assert, BoxLayoutData< T >::interval(), and BoxLayoutData< T >::nComp().
References CH_TIME.
Referenced by PetscSolver< T >::computeResidual().
|
virtual |
Simplest case – do all components.
|
virtual |
References CH_TIME.
Simplest case – do all components.
asynchronous exchange start. load and fire off messages.
References CH_TIME.
|
virtual |
finish asynchronous exchange
References CH_TIME.
References CH_TIME.
|
virtual |
Reimplemented from BoxLayoutData< T >.
References MayDay::Error().
|
virtual |
Reimplemented from BoxLayoutData< T >.
References MayDay::Error().
|
virtual |
Define this BoxLayoutData to be the subset of the data in da defined by the Interval comps.
Reimplemented from BoxLayoutData< T >.
References MayDay::Error().
|
inline |
Referenced by LevelData< T >::copyTo().
|
inline |
Referenced by aliasLevelData(), LevelDataOps< T >::create(), PetscSolverFAB< LevelData< FArrayBox > >::defineData(), ViscousTensorOp::diagonalScale(), ViscousTensorOp::divideByIdentityCoef(), LevelDataOps< T >::dotProduct(), BCFunction::fillGhostCells(), LevelDataOps< T >::incr(), LevelDataOps< T >::mDotProduct(), and MergeSolver< T >::solve().
|
virtual |
User writes a function with the signature:
They can then hand this off to LayoutData::apply, which invokes this function for every T. The argument "box" is the Box (as known to the DisjointBoxLayout here) associated with that T and the argument "n_comps" is the number of components in this LevelData.
Your function must not be inline.
For example:
|
virtual |
Like the other apply(), but here the argument is an instance of a class derived from LevelData::ApplyFunctor, and which implements ApplyFunctor's pure virtual void operator()(const Box& box, int n_comps, T& t) const.
Going with an instance of such a class is more convenient if you want the thing you pass to apply() to have state.
For example:
References LayoutIterator::ok().
void LevelData< T >::degenerate | ( | LevelData< T > & | a_to, |
const SliceSpec & | a_ss | ||
) | const |
References CH_SPACEDIM, LevelData< T >::define(), DisjointBoxLayout::degenerate(), and SliceSpec::direction.
|
friend |
Data over a disjoint union of rectangles.
LevelData aliasing function.
LevelData is-a BoxLayoutData. It is built from a DisjointBoxLayout instead though, thus making the data in a DisjointBoxLayout uniquely defined for all spatial indices defined by the underlying DisjointBoxLayout. It carries within it an inherent concept of ghost cells (which the user can choose to be empty).
Since LevelData is-a BoxLayoutData, all the methods required of the template class T for BoxLayoutData are also required for LevelData. LevelData does not have any extra requirements.
a_alias | aliased LevelData<T> object. original data in a_alias is destroyed and new aliasing role assumed. |
a_original | pointer to LevelData<T> that will be aliased. |
a_interval | range of components of each T in a_original that will be created in the a_alias argument. |
The template class T must have an 'alias' constructor
|
protected |
Referenced by LevelData< T >::copyTo(), LevelData< T >::define(), and LevelData< EBFluxFAB >::ghostVect().