11 #ifndef _BOXLAYOUTDATA_H_ 12 #define _BOXLAYOUTDATA_H_ 21 #include "NamespaceHeader.H" 149 return arg.size(b, comps);
154 arg.linearOut(buf, R, comps);
159 arg.linearIn(buf, R, comps);
161 virtual void op(T& dest,
162 const Box& RegionFrom,
170 dest.copy(RegionFrom, Cdest,RegionTo, src, Csrc);
174 int sizeSource = size(src, RegionFrom, Csrc);
175 int sizeDest = size(dest, RegionTo, Cdest);
177 if (T::preAllocatable() == 0 || T::preAllocatable() == 1)
179 if (sizeSource != sizeDest)
181 MayDay::Abort(
"LinearizationTest failure: dest and source have different sizes");
185 void* b = (
void*)&(buffer[0]);
240 virtual void define(
const BoxLayout& boxes,
int comps,
255 virtual void define(
const BoxLayout& boxes);
279 void generalCopyTo(
const BoxLayout& a_destGrids,
286 void generalCopyTo(
const BoxLayout& a_destGrids,
299 void addTo(
const Interval& a_srcComps,
309 void addTo(
const Interval& a_srcComps,
313 const Copier& a_copier)
const;
331 virtual void apply(
void (*a_Function)(
const Box&
box,
int comps, T& t));
334 virtual bool isDefined()
const;
336 virtual void clear() ;
432 mutable int numSends, numReceives;
473 #include "NamespaceFooter.H" 476 #endif //BOXLAYOUTDATA void unpackReceivesToMe(BoxLayoutData< T > &a_dest, const Interval &a_destComps, const LDOperator< T > &a_op) const
Definition: BoxLayoutDataI.H:366
void postSendsFromMe() const
Definition: BoxLayoutDataI.H:356
void postReceivesToMe() const
Definition: BoxLayoutDataI.H:361
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
Definition: BoxLayoutDataI.H:338
int m_comps
Definition: BoxLayoutData.H:341
CopierBuffer * m_buff
Definition: BoxLayoutData.H:419
A reference-counting handle class.
Definition: RefCountedPtr.H:66
Interval interval() const
Definition: BoxLayoutData.H:264
Interval m_interval
Definition: BoxLayoutData.H:108
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:130
LayoutData< Real * > aliasPtrs
Definition: BoxLayoutData.H:88
virtual void linearIn(T &arg, void *buf, const Box &R, const Interval &comps) const
Definition: BoxLayoutData.H:156
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
Data that maintains a one-to-one mapping of T to the boxes in a BoxLayout.
Definition: LayoutData.H:46
Real norm(const BoxLayoutData< FArrayBox > &A, const Interval &interval, const int &p=2)
A strange but true thing to make copying from one boxlayoutdata to another fast.
Definition: Copier.H:137
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 completePendingSends() const
Definition: BoxLayoutDataI.H:333
void setVector(const BoxLayoutData< T > &da, const Interval &srcComps, const Interval &destComps)
Definition: BoxLayoutDataI.H:46
virtual ~DataFactory()
Definition: BoxLayoutData.H:34
virtual bool callDelete() const
Definition: BoxLayoutData.H:43
virtual void op(T &dest, const Box &RegionFrom, const Interval &Cdest, const Box &RegionTo, const T &src, const Interval &Csrc) const
Definition: BoxLayoutData.H:161
virtual ~FABAliasFlBxDataFactory()
Definition: BoxLayoutData.H:116
Definition: EBInterface.H:45
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:64
A FArrayBox-like container for face-centered fluxes.
Definition: FluxBox.H:22
virtual int size(const T &arg, const Box &b, const Interval &comps) const
Definition: BoxLayoutData.H:147
Structure for passing component ranges in code.
Definition: Interval.H:23
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
Definition: BoxLayoutDataI.H:373
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
static int s_verbosity
Definition: BoxLayoutData.H:338
void linearOut(void *const a_outBuf, const T &inputT)
Definition: SPMDI.H:32
double Real
Definition: REAL.H:33
BoxLayoutData< FluxBox > * m_origPointer
Definition: BoxLayoutData.H:131
Definition: BoxLayoutData.H:74
virtual ~LDOperator()
Definition: BoxLayoutData.H:143
Definition: BoxLayoutData.H:113
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 ~AliasDataFactory()
Definition: BoxLayoutData.H:97
virtual ~FABAliasDataFactory()
Definition: BoxLayoutData.H:77
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
Definition: DataIndex.H:112
Definition: BoxLayoutData.H:94
void writeSendDataFromMeIntoBuffers(const BoxLayoutData< T > &a_src, const Interval &a_srcComps, const LDOperator< T > &a_op) const
Definition: BoxLayoutDataI.H:349
bool m_isdefined
Definition: BoxLayoutData.H:342
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Definition: FArrayBox.H:44
virtual T * create(const Box &box, int ncomps, const DataIndex &a_datInd) const =0
factory function. creates a new 'T' object
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
int m_dir
Definition: BoxLayoutData.H:133
virtual void linearOut(const T &arg, void *buf, const Box &R, const Interval &comps) const
Definition: BoxLayoutData.H:151
Definition: BoxLayoutData.H:139
BoxLayoutData< T > * m_origPointer
Definition: BoxLayoutData.H:107
virtual T * create(const Box &box, int ncomps, const DataIndex &a_datInd) const
factory function. creates a new 'T' object
Definition: BoxLayoutDataI.H:32
void linearIn(T &a_outputT, const void *const inBuf)
Definition: SPMDI.H:26
Interval m_interval
Definition: BoxLayoutData.H:132
static void Abort(const char *const a_msg=m_nullString)
Print out message to cerr and exit via abort() (if serial) or MPI_Abort() (if parallel).