11 #ifndef _LEVELDATAI_H_ 12 #define _LEVELDATAI_H_ 21 #include "NamespaceHeader.H" 42 : m_disjointBoxLayout(dp), m_ghost(ghost)
46 this->numReceives = 0;
54 MayDay::Error(
"non-disjoint DisjointBoxLayout: LevelData<T>::LevelData(const DisjointBoxLayout& dp, int comps)");
59 this->
setVector(*
this, interval, interval);
73 CH_TIME(
"LevelData<T>::define(dbl,comps,ghost,factory)");
83 MayDay::Error(
"non-disjoint DisjointBoxLayout: LevelData<T>::define(const DisjointBoxLayout& dp,....)");
87 MayDay::Error(
"LevelData::LevelData(const BoxLayout& dp, int comps) comps<=0");
105 CH_TIME(
"LevelData<T>::define(LevelData<T>,factory)");
112 if (
this == &da)
return;
130 CH_TIME(
"LevelData<T>::define(LevelData<T>,comps,factory)");
139 MayDay::Error(
" LevelData<T>::define(const LevelData<T>& da, const Interval& comps) called with 'this'");
175 dest[it()].copy(this->
box(it()),
178 this->
operator[](it()),
185 copyTo(srcComps, dest, destComps, copier);
206 MayDay::Error(
"src == dest in copyTo function. Perhaps you want exchange ?");
214 dest[it()].copy(this->
box(it()),
217 this->
operator[](it()),
224 copyTo(srcComps, dest, destComps, copier);
253 this->
makeItSo(srcComps, *
this, dest, destComps, copier, a_op);
284 this->
makeItSo(srcComps, *
this, dest, destComps, copier, a_op);
342 this->
makeItSo(comps, *
this, *
this, comps, copier);
390 MayDay::Error(
"LevelData<T>::define called with BoxLayout input");
398 MayDay::Error(
"LevelData<T>::define called with BoxLayout input");
406 MayDay::Error(
"LevelData<T>::define called with BoxLayout input");
415 MayDay::Error(
"LevelData<T>::define called with BoxLayout input");
444 template<
class T>
void 466 #include "NamespaceFooter.H" int m_comps
Definition: BoxLayoutData.H:341
bool isDefined() const
Definition: Copier.H:266
Interval interval() const
Definition: BoxLayoutData.H:264
void degenerate(DisjointBoxLayout &a_to, const SliceSpec &a_ss) const
#define CH_SPACEDIM
Definition: SPACE.H:52
#define CH_assert(cond)
Definition: CHArray.H:37
Vector< T * > m_vector
Definition: LayoutData.H:122
void degenerate(LevelData< T > &a_to, const SliceSpec &a_ss) const
Definition: LevelDataI.H:445
LevelData()
Definition: LevelDataI.H:25
DisjointBoxLayout m_disjointBoxLayout
Definition: LevelData.H:280
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
Definition: BoxLayoutDataI.H:290
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:146
int size() const
Definition: Interval.H:64
A strange but true thing to make copying from one boxlayoutdata to another fast.
Definition: Copier.H:137
int begin() const
Definition: Interval.H:86
Definition: SliceSpec.H:42
IntVect m_ghost
Definition: LevelData.H:282
const BoxLayout & boxLayout() const
Definition: LayoutData.H:108
DataIterator dataIterator() const
Definition: LayoutDataI.H:79
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
Definition: BoxLayoutDataI.H:249
void setVector(const BoxLayoutData< T > &da, const Interval &srcComps, const Interval &destComps)
Definition: BoxLayoutDataI.H:46
Box box(const DataIndex &a_index) const
Definition: LayoutDataI.H:67
virtual bool ok() const
return true if this iterator is still in its Layout
Definition: LayoutIterator.H:110
Definition: DataIterator.H:140
Copier m_exchangeCopier
Definition: LevelData.H:288
BoxLayout m_boxLayout
Definition: LayoutData.H:116
virtual void exchange(void)
Simplest case – do all components.
Definition: LevelDataI.H:324
Definition: EBInterface.H:45
virtual void exchangeBegin(const Copier &copier)
asynchronous exchange start. load and fire off messages.
Definition: LevelDataI.H:368
virtual void apply(void(*a_Function)(const Box &, int, T &))
#define CH_TIME(name)
Definition: CH_Timer.H:59
Structure for passing component ranges in code.
Definition: Interval.H:23
Definition: BoxLayoutData.H:136
void allocateGhostVector(const DataFactory< T > &factory, const IntVect &ghost=IntVect::Zero)
Definition: BoxLayoutDataI.H:165
Data on a BoxLayout.
Definition: BoxLayoutData.H:91
virtual void define(const DisjointBoxLayout &dp, int comps, const IntVect &ghost=IntVect::Zero, const DataFactory< T > &a_factory=DefaultDataFactory< T >())
Definition: LevelDataI.H:70
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
Definition: BoxLayoutDataI.H:236
virtual void copyTo(const Interval &srcComps, BoxLayoutData< T > &dest, const Interval &destComps) const
Definition: LevelDataI.H:164
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:31
Box get(const LayoutIndex &it) const
Definition: BoxLayout.H:681
const DisjointBoxLayout & getBoxes() const
Definition: LevelData.H:190
const IntVect & ghostVect() const
Definition: LevelData.H:157
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
static const IntVect Zero
Definition: IntVect.H:627
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
void makeItSoEnd(BoxLayoutData< T > &a_dest, const Interval &a_destComps, const LDOperator< T > &a_op=LDOperator< T >()) const
Definition: BoxLayoutDataI.H:318
int nComp() const
Definition: BoxLayoutData.H:258
bool m_isdefined
Definition: BoxLayoutData.H:342
virtual ~LevelData()
Definition: LevelDataI.H:32
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
bool isClosed() const
Definition: BoxLayout.H:696
Definition: BoxLayoutData.H:139
virtual void define(const DisjointBoxLayout &a_level, const BoxLayout &a_dest, bool a_exchange=false, IntVect a_shift=IntVect::Zero)
virtual void exchangeEnd()
finish asynchronous exchange
Definition: LevelDataI.H:378
int direction
Definition: SliceSpec.H:48
virtual void exchangeNoOverlap(const Copier &copier)
Definition: LevelDataI.H:356