BaseEBCellFAB< T > Class Template Reference

#include <BaseEBCellFAB.H>

Inheritance diagram for BaseEBCellFAB< T >:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class T>
class BaseEBCellFAB< T >

Array defined at the VolIndexs of an Box in an EBIS.

An BaseEBCellFAB is a templated holder for cell-centered data over the intersection of a box and an EbisBox. At every uncovered VolIndex in this intersection, the BaseEBCellFAB contains a specified number of data values. At singly valued cells, the data is stored internally in a BaseFab. At multiply-valued cells, the data is stored internally in an BaseIVFAB. BaseEBCellFAB provides indexing by VolIndex. This class does not provide a copy constructor or assignment operator for all the usual reasons.

Public Member Functions

int numDataTypes () const
 for AggStencil
int dataType (const BaseIndex &a_baseInd) const
 for AggStencil
long offset (const BaseIndex &a_baseInd, const int a_ivar) const
 for AggStencil
T * dataPtr (int a_dataType, int a_ivar)
 for AggStencil
const T * dataPtr (int a_dataType, int a_ivar) const
 for AggStencil
 BaseEBCellFAB ()
 BaseEBCellFAB (const EBISBox &a_ebisBox, const Box &a_region, int a_nVar)
virtual void define (const EBISBox &a_ebisBox, const Box &a_region, int a_nVar)
 BaseEBCellFAB (const Interval &a_comps, BaseEBCellFAB< T > &a_original)
 aliasing copy-ish constructor. Used when the 'alias' function is invoked on LevelData
virtual ~BaseEBCellFAB ()
void clear ()
void setVal (const T &value)
void setVal (int ivar, const T &value)
void setVal (const T &value, const Box &a_box, int a_nstart, int a_numcomp)
bool isDefined () const
int nComp () const
const BoxgetRegion () const
const Boxbox () const
Vector< VolIndexgetMultiCells () const
 has to be by value because sometimes the vector does not exist.
const BaseIVFAB< T > & getMultiValuedFAB () const
BaseIVFAB< T > & getMultiValuedFAB ()
const BaseFab< T > & getSingleValuedFAB () const
BaseFab< T > & getSingleValuedFAB ()
const T & operator() (const VolIndex &a_ndin, int a_nVarLoc, int a_isKnownMultiValued=0) const
T & operator() (const VolIndex &a_ndin, int a_nVarLoc, int a_isKnownMultiValued=0)
void fill (T *array, const VolIndex &a_ndin, const Interval &a_comps) const
void assign (const T *array, const VolIndex &a_ndin, const Interval &a_comps)
void copy (const Box &RegionFrom, const Interval &destInt, const Box &RegionTo, const BaseEBCellFAB< T > &source, const Interval &srcInt)
BaseEBCellFAB< T > & copy (const BaseEBCellFAB< T > &source)
int size (const Box &R, const Interval &comps) const
void linearOut (void *buf, const Box &R, const Interval &comps) const
void linearIn (void *buf, const Box &R, const Interval &comps)
 BaseEBCellFAB (const Box &a_region, int a_nVar)
 invalid but necessary for leveldata to compile
const EBISBoxgetEBISBox () const
virtual void setCoveredCellVal (const T &a_val, const int &a_comp, const bool &a_doMulti=true)

Static Public Member Functions

static int preAllocatable ()

Protected Member Functions

void setDefaultValues ()

Protected Attributes

MiniIVFAB< T > m_irrFAB
 data at multi-valued cells
BaseFab< T > m_regFAB
 data at single-valued cells
EBISBox m_ebisBox
Box m_region
bool m_hasMultiCells
bool m_isDefined
 has full define function been called?

Private Member Functions

void operator= (const BaseEBCellFAB< T > &ebcin)
 BaseEBCellFAB (const BaseEBCellFAB< T > &ebcin)


Constructor & Destructor Documentation

template<class T>
BaseEBCellFAB< T >::BaseEBCellFAB (  )  [inline]

template<class T>
BaseEBCellFAB< T >::BaseEBCellFAB ( const EBISBox a_ebisBox,
const Box a_region,
int  a_nVar 
) [inline]

template<class T>
BaseEBCellFAB< T >::BaseEBCellFAB ( const Interval a_comps,
BaseEBCellFAB< T > &  a_original 
) [inline]

aliasing copy-ish constructor. Used when the 'alias' function is invoked on LevelData

Constructs an 'aliased' BaseEBCellFab of the requested interval of the argument BaseEBCellFab. This BaseEBCellFab does not allocate any memory, but sets its data pointer into the memory pointed to by the argument BaseEBCellFab. It is the users responsiblity to ensure this aliased BaseEBCellFab is not used after the original BaseEBCellFab has deleted its data ptr (resize, define(..) called, or destruction, etc.).

This aliased BaseEBCellFab will also generate side effects (modifying the values of data in one will modify the other's data).

This aliased BaseFab will have a_comps.size() components, starting at zero.

References MayDay::Error(), and BaseEBCellFAB< T >::m_isDefined.

template<class T>
BaseEBCellFAB< T >::~BaseEBCellFAB (  )  [inline, virtual]

template<class T>
BaseEBCellFAB< T >::BaseEBCellFAB ( const Box a_region,
int  a_nVar 
) [inline]

invalid but necessary for leveldata to compile

template<class T>
BaseEBCellFAB< T >::BaseEBCellFAB ( const BaseEBCellFAB< T > &  ebcin  )  [inline, private]


Member Function Documentation

template<class T>
int BaseEBCellFAB< T >::numDataTypes (  )  const [inline]

template<class T>
int BaseEBCellFAB< T >::dataType ( const BaseIndex a_baseInd  )  const [inline]

template<class T>
long BaseEBCellFAB< T >::offset ( const BaseIndex a_baseInd,
const int  a_ivar 
) const [inline]

template<class T>
T* BaseEBCellFAB< T >::dataPtr ( int  a_dataType,
int  a_ivar 
) [inline]

template<class T>
const T* BaseEBCellFAB< T >::dataPtr ( int  a_dataType,
int  a_ivar 
) const [inline]

template<class T>
void BaseEBCellFAB< T >::define ( const EBISBox a_ebisBox,
const Box a_region,
int  a_nVar 
) [inline, virtual]

template<class T>
void BaseEBCellFAB< T >::clear (  )  [inline]

template<class T>
void BaseEBCellFAB< T >::setVal ( const T &  value  )  [inline]

template<class T>
void BaseEBCellFAB< T >::setVal ( int  ivar,
const T &  value 
) [inline]

template<class T>
void BaseEBCellFAB< T >::setVal ( const T &  value,
const Box a_box,
int  a_nstart,
int  a_numcomp 
) [inline]

template<class T>
bool BaseEBCellFAB< T >::isDefined (  )  const [inline]

template<class T>
int BaseEBCellFAB< T >::nComp (  )  const [inline]

template<class T>
const Box & BaseEBCellFAB< T >::getRegion (  )  const [inline]

template<class T>
const Box & BaseEBCellFAB< T >::box (  )  const [inline]

template<class T>
Vector< VolIndex > BaseEBCellFAB< T >::getMultiCells (  )  const [inline]

has to be by value because sometimes the vector does not exist.

References CH_assert, BaseEBCellFAB< T >::isDefined(), and BaseEBCellFAB< T >::m_irrFAB.

template<class T>
const BaseIVFAB< T > & BaseEBCellFAB< T >::getMultiValuedFAB (  )  const [inline]

template<class T>
BaseIVFAB< T > & BaseEBCellFAB< T >::getMultiValuedFAB (  )  [inline]

template<class T>
const BaseFab< T > & BaseEBCellFAB< T >::getSingleValuedFAB (  )  const [inline]

template<class T>
BaseFab< T > & BaseEBCellFAB< T >::getSingleValuedFAB (  )  [inline]

template<class T>
const T & BaseEBCellFAB< T >::operator() ( const VolIndex a_ndin,
int  a_nVarLoc,
int  a_isKnownMultiValued = 0 
) const [inline]

Arg a_isKnownMultiValued should be set to: -1 if arg a_ndin is known to be in a single-valued cell; +1 if arg a_ndin is known to be in a multi-valued cell; 0 if you're not sure (in which case the expensive IntVectSet::contains() function gets called.

Note: BVS says third arg is a wart that makes this operator look less like a logical array access.

References CH_assert, VolIndex::gridIndex(), EBISBox::isCovered(), BaseEBCellFAB< T >::isDefined(), EBISBox::isMultiValued(), BaseEBCellFAB< T >::m_ebisBox, BaseEBCellFAB< T >::m_irrFAB, BaseEBCellFAB< T >::m_regFAB, and BaseEBCellFAB< T >::nComp().

template<class T>
T & BaseEBCellFAB< T >::operator() ( const VolIndex a_ndin,
int  a_nVarLoc,
int  a_isKnownMultiValued = 0 
) [inline]

Arg a_isKnownMultiValued should be set to: -1 if arg a_ndin is known to be in a single-valued cell; +1 if arg a_ndin is known to be in a multi-valued cell; 0 if you're not sure (in which case the expensive IntVectSet::contains() function gets called.

References CH_assert, MayDay::Error(), BaseEBCellFAB< T >::getRegion(), VolIndex::gridIndex(), EBISBox::isCovered(), BaseEBCellFAB< T >::isDefined(), EBISBox::isMultiValued(), BaseEBCellFAB< T >::m_ebisBox, BaseEBCellFAB< T >::m_hasMultiCells, BaseEBCellFAB< T >::m_irrFAB, BaseEBCellFAB< T >::m_regFAB, and BaseEBCellFAB< T >::nComp().

template<class T>
void BaseEBCellFAB< T >::fill ( T *  array,
const VolIndex a_ndin,
const Interval a_comps 
) const [inline]

template<class T>
void BaseEBCellFAB< T >::assign ( const T *  array,
const VolIndex a_ndin,
const Interval a_comps 
) [inline]

template<class T>
void BaseEBCellFAB< T >::copy ( const Box RegionFrom,
const Interval destInt,
const Box RegionTo,
const BaseEBCellFAB< T > &  source,
const Interval srcInt 
) [inline]

template<class T>
BaseEBCellFAB< T > & BaseEBCellFAB< T >::copy ( const BaseEBCellFAB< T > &  source  )  [inline]

template<class T>
static int BaseEBCellFAB< T >::preAllocatable (  )  [inline, static]

This stuff required by LevelData in parallel:

template<class T>
int BaseEBCellFAB< T >::size ( const Box R,
const Interval comps 
) const [inline]

template<class T>
void BaseEBCellFAB< T >::linearOut ( void *  buf,
const Box R,
const Interval comps 
) const [inline]

template<class T>
void BaseEBCellFAB< T >::linearIn ( void *  buf,
const Box R,
const Interval comps 
) [inline]

template<class T>
const EBISBox & BaseEBCellFAB< T >::getEBISBox (  )  const [inline]

template<class T>
void BaseEBCellFAB< T >::setCoveredCellVal ( const T &  a_val,
const int &  a_comp,
const bool &  a_doMulti = true 
) [inline, virtual]

template<class T>
void BaseEBCellFAB< T >::setDefaultValues (  )  [inline, protected]

template<class T>
void BaseEBCellFAB< T >::operator= ( const BaseEBCellFAB< T > &  ebcin  )  [inline, private]


Member Data Documentation

template<class T>
MiniIVFAB<T> BaseEBCellFAB< T >::m_irrFAB [protected]

template<class T>
BaseFab<T> BaseEBCellFAB< T >::m_regFAB [protected]

template<class T>
EBISBox BaseEBCellFAB< T >::m_ebisBox [protected]

template<class T>
Box BaseEBCellFAB< T >::m_region [protected]

template<class T>
bool BaseEBCellFAB< T >::m_hasMultiCells [protected]

template<class T>
bool BaseEBCellFAB< T >::m_isDefined [protected]


The documentation for this class was generated from the following files:

Generated on Mon Jun 26 03:26:55 2017 for Chombo + EB + MF by  doxygen 1.5.5