Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BaseFab< T > Class Template Reference

#include <BaseFab.H>

Inheritance diagram for BaseFab< T >:

Inheritance graph
[legend]
Collaboration diagram for BaseFab< T >:

Collaboration graph
[legend]
List of all members.

Public Methods

 BaseFab ()
 {\bf constructors, destructor and defines}

 BaseFab (const Box &bx, int n)
virtual ~BaseFab ()
void resize (const Box &b, int N=1)
virtual void define (const Box &box, int comps)
void clear ()
int nComp () const
 {\bf accessors}

const Boxbox () const
const int * size () const
const IntVectsmallEnd () const
const IntVectbigEnd () const
Interval interval () const
T & operator() (const IntVect &p, int N)
T & operator() (const IntVect &p)
const T & operator() (const IntVect &p, int N) const
const T & operator() (const IntVect &p) const
void getVal (T *data, const IntVect &pos, int N, int numcomp) const
void getVal (T *data, const IntVect &pos) const
const int * loVect () const
 {\bf Fortran interface functions}

const int * hiVect () const
const int * nCompPtr () const
T * dataPtr (int N=0)
const T * dataPtr (int N=0) const
bool contains (const BaseFab< T > &fab) const
 {\bf comparison functions}

bool contains (const Box &bx) const
void setVal (T x, const Box &bx, int nstart, int ncomp)
 {\bf data modification functions}

void setVal (T x, const Box &bx, int N)
void setVal (T x, int N)
void setVal (T x)
BaseFab< T > & copy (const BaseFab< T > &src, const Box &srcbox, int srccomp, const Box &destbox, int destcomp, int numcomp)
BaseFab< T > & copy (const BaseFab< T > &src, int srccomp, int destcomp, int numcomp=1)
BaseFab< T > & copy (const BaseFab< T > &src, const Box &destbox)
BaseFab< T > & copy (const BaseFab< T > &src)
void copy (const Box &RegionFrom, const Interval &Cdest, const Box &RegionTo, const BaseFab< T > &src, const Interval &Csrc)
BaseFab< T > & shift (const IntVect &v)
 {\bf domain modification functions}

BaseFab< T > & shift (int idir, int n_cell)
BaseFab< T > & shiftHalf (int dir, int num_halfs)
BaseFab< T > & shiftHalf (const IntVect &num_halfs)
virtual int size (const Box &b, const Interval &comps) const
 {\bf linearization functions}

virtual void linearOut (void *buf, const Box &R, const Interval &comps) const
virtual void linearIn (void *buf, const Box &R, const Interval &comps)

Static Public Methods

int preAllocatable ()

Protected Methods

void define ()
void undefine ()
virtual void performCopy (const BaseFab< T > &src, const Box &srcbox, int srccomp, const Box &destbox, int destcomp, int numcomp)
void performSetVal (T x, const Box &bx, int nstart, int numcomp)

Static Protected Methods

std::string name ()

Protected Attributes

Box domain
int nvar
long numpts
long truesize
T * dptr

Static Protected Attributes

Arenas_Arena = NULL

template<class T>
class BaseFab< T >


Constructor & Destructor Documentation

template<class T>
BaseFab< T >::BaseFab   [inline]
 

{\bf constructors, destructor and defines}

template<class T>
BaseFab< T >::BaseFab const Box   bx,
int    n
[inline]
 

Constructs a BaseFab with desired domain and number of components.

template<class T>
BaseFab< T >::~BaseFab   [inline, virtual]
 

The destructor deletes the array memory.


Member Function Documentation

template<class T>
const IntVect & BaseFab< T >::bigEnd   const [inline]
 

template<class T>
const Box & BaseFab< T >::box   const [inline]
 

Returns the domain (box) where the array is defined.

template<class T>
void BaseFab< T >::clear   [inline]
 

template<class T>
bool BaseFab< T >::contains const Box   bx const [inline]
 

template<class T>
bool BaseFab< T >::contains const BaseFab< T > &    fab const [inline]
 

{\bf comparison functions}

template<class T>
void BaseFab< T >::copy const Box   RegionFrom,
const Interval   Cdest,
const Box   RegionTo,
const BaseFab< T > &    src,
const Interval   Csrc
[inline]
 

Copy from a subsection of one box into another. Assumes the boxes are both in the same index space, and that box R is completely contained in both the source and destination boxes.

template<class T>
BaseFab< T > & BaseFab< T >::copy const BaseFab< T > &    src [inline]
 

template<class T>
BaseFab< T > & BaseFab< T >::copy const BaseFab< T > &    src,
const Box   destbox
[inline]
 

template<class T>
BaseFab< T > & BaseFab< T >::copy const BaseFab< T > &    src,
int    srccomp,
int    destcomp,
int    numcomp = 1
[inline]
 

template<class T>
BaseFab< T > & BaseFab< T >::copy const BaseFab< T > &    src,
const Box   srcbox,
int    srccomp,
const Box   destbox,
int    destcomp,
int    numcomp
[inline]
 

template<class T>
const T * BaseFab< T >::dataPtr int    N = 0 const [inline]
 

template<class T>
T * BaseFab< T >::dataPtr int    N = 0 [inline]
 

template<class T>
void BaseFab< T >::define   [inline, protected]
 

template<class T>
virtual void BaseFab< T >::define const Box   box,
int    comps
[inline, virtual]
 

Reimplemented in FArrayBox.

template<class T>
void BaseFab< T >::getVal T *    data,
const IntVect   pos
const [inline]
 

template<class T>
void BaseFab< T >::getVal T *    data,
const IntVect   pos,
int    N,
int    numcomp
const [inline]
 

template<class T>
const int * BaseFab< T >::hiVect   const [inline]
 

template<class T>
Interval BaseFab< T >::interval   const [inline]
 

Returns an Interval for the entire range on components.

template<class T>
void BaseFab< T >::linearIn void *    buf,
const Box   R,
const Interval   comps
[inline, virtual]
 

template<class T>
void BaseFab< T >::linearOut void *    buf,
const Box   R,
const Interval   comps
const [inline, virtual]
 

Write a linear representation of the internal data. Assumes that sufficient memory for the buffer has already been allocated by the caller.

template<class T>
const int * BaseFab< T >::loVect   const [inline]
 

{\bf Fortran interface functions}

template<class T>
std::string BaseFab< T >::name   [inline, static, protected]
 

template<class T>
int BaseFab< T >::nComp   const [inline]
 

{\bf accessors}

Returns the number of components.

template<class T>
const int * BaseFab< T >::nCompPtr   const [inline]
 

template<class T>
const T & BaseFab< T >::operator() const IntVect   p const [inline]
 

template<class T>
const T & BaseFab< T >::operator() const IntVect   p,
int    N
const [inline]
 

template<class T>
T & BaseFab< T >::operator() const IntVect   p [inline]
 

template<class T>
T & BaseFab< T >::operator() const IntVect   p,
int    N
[inline]
 

template<class T>
void BaseFab< T >::performCopy const BaseFab< T > &    src,
const Box   srcbox,
int    srccomp,
const Box   destbox,
int    destcomp,
int    numcomp
[inline, protected, virtual]
 

Reimplemented in FArrayBox.

template<class T>
void BaseFab< T >::performSetVal   x,
const Box   bx,
int    nstart,
int    numcomp
[inline, protected]
 

template<class T>
int BaseFab< T >::preAllocatable   [inline, static]
 

template<class T>
void BaseFab< T >::resize const Box   b,
int    N = 1
 

template<class T>
void BaseFab< T >::setVal   x [inline]
 

Modifies this BaseFab so that all values of all components are set to the given value x.

template<class T>
void BaseFab< T >::setVal   x,
int    N
[inline]
 

Modifies this BaseFab so that all values of component N are set to the given value x.

template<class T>
void BaseFab< T >::setVal   x,
const Box   bx,
int    N
[inline]
 

Modifies this BaseFab so that all values of component N in the specified Box bx are set to the given value x.

template<class T>
void BaseFab< T >::setVal   x,
const Box   bx,
int    nstart,
int    ncomp
[inline]
 

{\bf data modification functions}

template<class T>
BaseFab< T > & BaseFab< T >::shift int    idir,
int    n_cell
[inline]
 

Modifies the domain of this BaseFab by shifting it n_cells indexing positions in coordinate direction idir. Directions are zero-based. It is an error if not 0 <= idir < SpaceDim.There is no effect upon the array memory.

template<class T>
BaseFab< T > & BaseFab< T >::shift const IntVect   v [inline]
 

{\bf domain modification functions}

Modifies the domain of this BaseFab by shifting. Equivalent to fab.shift(0,iv[0]).shift(1,iv[1]) .... There is no effect upon the array memory.

template<class T>
BaseFab< T > & BaseFab< T >::shiftHalf const IntVect   num_halfs [inline]
 

Modifies the domain of this BaseFab by shifting by half indices. Equivalent to fab.shiftHalf(0,iv[0]).shiftHalf(1,iv[1]) ... There is no effect upon the array memory.

template<class T>
BaseFab< T > & BaseFab< T >::shiftHalf int    dir,
int    num_halfs
[inline]
 

Modifies the domain of this BaseFab by shifting by "half" indices, thereby converting the Box from type CELL to NODE or vice-versa. fab.shiftHalf(0,1) shifts the domain to the right by 1/2 cells. fab.shiftHalf(1,-3) shifts the domain in the -j direction by 3/2 cells. NOTE: If num\_halfs is EVEN the shift is num\_halfs/2 full zones and hence will not change the type. This is: fab.shifthalf(4) == fab.shift(2). Directions are zero-based. It is an error if not 0 <= dir < SpaceDim. There is no effect upon the array memory.

template<class T>
int BaseFab< T >::size const Box   b,
const Interval   comps
const [inline, virtual]
 

{\bf linearization functions}

Returns the size, in number of bytes, of a flat linear representation of the data in this object in the area defined by the input Box R and the component Interval comps. The size does not include the size of R and comps.

template<class T>
const int * BaseFab< T >::size   const [inline]
 

template<class T>
const IntVect & BaseFab< T >::smallEnd   const [inline]
 

template<class T>
void BaseFab< T >::undefine   [inline, protected]
 


Member Data Documentation

template<class T>
Box BaseFab< T >::domain [protected]
 

template<class T>
T* BaseFab< T >::dptr [protected]
 

template<class T>
long BaseFab< T >::numpts [protected]
 

template<class T>
int BaseFab< T >::nvar [protected]
 

template<class T>
Arena * BaseFab< T >::s_Arena = NULL [static, protected]
 

template<class T>
long BaseFab< T >::truesize [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Aug 29 11:07:36 2002 for Chombo&INS by doxygen1.2.16