25 #include "NamespaceHeader.H" 99 offset += ivDiff[1]*ivSize[0] ;
102 offset += ivDiff[2]*ivSize[0]*ivSize[1];
105 offset += ivDiff[3]*ivSize[0]*ivSize[1]*ivSize[2];
108 offset += ivDiff[4]*ivSize[0]*ivSize[1]*ivSize[2]*ivSize[3];
111 offset += ivDiff[5]*ivSize[0]*ivSize[1]*ivSize[2]*ivSize[3]*ivSize[4];
151 template <
unsigned int C>
152 void define(Proto::BoxData<T,C,1,1>& a_original);
154 template<
unsigned int C>
155 operator Proto::BoxData<T,C>()
157 Proto::BoxData<T,C> bd;
162 template<
unsigned int C>
163 operator const Proto::BoxData<T,C>()
const 165 Proto::BoxData<T,C> bd;
170 template <
unsigned int C>
171 inline BaseFab(
const Proto::BoxData<T,C>& a_bd,
const Proto::Point a_center = Proto::Point::Zeros())
173 m_domain =
Box(a_bd.box().low(), a_bd.box().high(), a_center);
177 m_dptr =
const_cast<T*
>(a_bd.data(a_bd.box().low()));
209 resize(a_box, a_comps, a_alias);
283 auto operator[](
const int a_idx)
const noexcept
286 return m_mdarray[a_idx];
308 int a_numcomp)
const;
327 const int*
loVect()
const;
336 const int*
hiVect()
const;
365 const T*
dataPtr(
int a_n = 0)
const;
435 const Box& a_destbox,
458 const Box& a_destbox);
473 void copy(
const Box& a_RegionFrom,
475 const Box& a_RegionTo,
530 virtual size_t size(
const Box& a_box,
562 void linearIn(
const void*
const a_buf);
605 static std::string
name();
613 const Box& a_destbox,
640 shape::ShapeArray<T, SpaceDim + 1, int> m_mdarray;
653 #include "NamespaceFooter.H" void clear()
Definition: BaseFabImplem.H:252
void degenerate(BaseFab< T > &a_slice, const SliceSpec &a_sliceSpec) const
Definition: BaseFabImplem.H:829
bool contains(const BaseFab< T > &a_fab) const
{ comparison functions}
Definition: BaseFabImplem.H:389
IntVect size() const
size functions
Definition: Box.H:1819
static Arena * s_Arena
Definition: BaseFab.H:630
#define CH_assert(cond)
Definition: CHArray.H:37
virtual void linearOut(void *a_buf, const Box &a_R, const Interval &a_comps) const
Definition: BaseFabImplem.H:568
void setVal(T a_x, const Box &a_bx, int a_nstart, int a_numcomp)
{ data modification functions}
Definition: BaseFabImplem.H:399
virtual ~BaseFab()
Definition: BaseFabImplem.H:168
BaseFab< T > & shift(const IntVect &a_v)
{ domain modification functions}
Definition: BaseFabImplem.H:516
virtual void linearIn(void *a_buf, const Box &a_R, const Interval &a_comps)
Definition: BaseFabImplem.H:588
Definition: SliceSpec.H:41
bool contains(const IntVect &p) const
Definition: Box.H:1887
static std::string name()
Definition: BaseFabImplem.H:763
Box m_domain
Definition: BaseFab.H:632
const IntVect & bigEnd() const
Definition: BaseFabImplem.H:286
int m_nvar
Definition: BaseFab.H:633
const Box & box() const
Definition: BaseFabImplem.H:271
int linearSize(void) const
Definition: BaseFabImplem.H:667
BaseFab< T > & operator=(BaseFab< T > &&) noexcept
move assignment
Definition: BaseFabImplem.H:101
const int * nCompPtr() const
Definition: BaseFabImplem.H:366
BaseFab()
Definition: BaseFabImplem.H:115
void const char const int const int const int const Real const Real const int const Real const int const Real Real * C
Definition: Lapack.H:83
virtual void * linearOut2(void *a_buf, const Box &a_R, const Interval &a_comps) const
Same as linearOut, but returns the current location in the buffer.
Definition: BaseFabImplem.H:574
bool isAliased() const
Definition: BaseFabImplem.H:817
void getVal(T *a_data, const IntVect &a_pos, int a_N, int a_numcomp) const
Definition: BaseFabImplem.H:333
static int preAllocatable()
Definition: BaseFab.H:567
BaseFab< T > & shiftHalf(int a_dir, int a_numHalfs)
Definition: BaseFabImplem.H:539
Structure for passing component ranges in code.
Definition: Interval.H:23
const IntVect & smallEnd() const
{ Accessors}
Definition: Box.H:1770
virtual void define(const Box &a_box, int a_comps, T *a_alias=NULL)
Definition: BaseFab.H:205
A Virtual Base Class for Dynamic Memory Managemen.
Definition: Arena.H:40
double Real
Definition: REAL.H:33
void define()
Definition: BaseFabImplem.H:672
virtual void performCopy(const BaseFab< T > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
Definition: BaseFabImplem.H:771
const int * hiVect() const
Definition: BaseFabImplem.H:361
BaseFab< T > & copy(const BaseFab< T > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
Definition: BaseFabImplem.H:426
Interval interval() const
Definition: BaseFab.H:259
virtual long offset(const IntVect &a_iv, const int &a_ivar) const
{ constructors, destructor and defines}
Definition: BaseFab.H:87
const IntVect & smallEnd() const
Definition: BaseFabImplem.H:281
T * dataPtr(int a_n=0)
Definition: BaseFabImplem.H:373
T *__restrict m_dptr
Definition: BaseFab.H:637
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
bool m_aliased
Definition: BaseFab.H:638
long m_truesize
Definition: BaseFab.H:635
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
T & operator()(const IntVect &a_p, int a_N)
Definition: BaseFabImplem.H:291
const int * loVect() const
{ Fortran interface functions}
Definition: BaseFabImplem.H:356
int nComp() const
{ accessors}
Definition: BaseFabImplem.H:264
void const char const int const int * N
Definition: Lapack.H:83
void resize(const Box &a_b, int a_n=1, T *a_alias=NULL)
Definition: BaseFabImplem.H:173
void undefine()
Definition: BaseFabImplem.H:728
static int testBoxAndComp()
regression test
Definition: BaseFabImplem.H:39
void performSetVal(T a_x, const Box &a_bx, int a_nstart, int a_numcomp)
Definition: BaseFabImplem.H:790
static int test()
regression test
Definition: BaseFabImplem.H:77
virtual void * linearIn2(void *a_buf, const Box &a_R, const Interval &a_comps)
same as linearIn, but returns the current location in the buffer
Definition: BaseFabImplem.H:596
IntVect size() const
Definition: BaseFabImplem.H:276
long m_numpts
Definition: BaseFab.H:634
bool isUsable() const
Definition: BaseFabImplem.H:823