#include <BaseIFFAB.H>
Public Member Functions | |
BaseIFFAB () | |
BaseIFFAB (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_direction, const int &a_nvarin) | |
~BaseIFFAB () | |
void | define (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_direction, const int &a_nvarin) |
void | setVal (const T &value) |
void | setVal (int ivar, const T &value) |
void | copy (const Box &a_intBox, const Interval &a_destInterval, const Box &a_toBox, const BaseIFFAB< T > &a_src, const Interval &a_srcInterval) |
void | clear () |
BaseIFFAB (const Box &a_region, int a_nVar) | |
invalid but necessary for leveldata to compile | |
bool | isDefined () const |
int | numFaces () const |
int | nComp () const |
int | direction () const |
const IntVectSet & | getIVS () const |
T & | operator() (const FaceIndex &a_face, const int &varlocin) |
const T & | operator() (const FaceIndex &a_face, const int &varlocin) const |
T * | dataPtr (const int &a_comp) |
T * | getIndex (const FaceIndex &a_face, const int &a_comp) const |
const T * | dataPtr (const int &a_comp) const |
const EBGraph & | getEBGraph () const |
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) |
Static Public Member Functions | |
static int | preAllocatable () |
static void | setVerbose (bool a_verbose) |
Static Public Attributes | |
static bool | s_verbose = false |
Protected Member Functions | |
int | getLocalVecIndex (const FaceIndex &a_face) const |
Protected Attributes | |
T * | m_data |
int | m_truesize |
int | m_nComp |
int | m_nFaces |
int | m_direction |
BaseFab< T * > | m_fab |
IntVectSet | m_ivs |
EBGraph | m_ebgraph |
bool | m_isDefined |
Static Protected Attributes | |
static Arena * | s_Arena = NULL |
Private Member Functions | |
void | setDefaultValues () |
void | operator= (const BaseIFFAB< T > &) |
BaseIFFAB (const BaseIFFAB< T > &) |
Default constructor. Constructs an uninitialized IFFAB. You must subsequently call { define} before using this IFFAB.
References BaseIFFAB< T >::setDefaultValues().
BaseIFFAB< T >::BaseIFFAB | ( | const IntVectSet & | a_region, | |
const EBGraph & | a_ebgraph, | |||
const int & | a_direction, | |||
const int & | a_nvarin | |||
) | [inline] |
Defining constructor. Specifies the irregular domain and the number of data components per face. The irregular domain must lie completely within the EBGraph. The contents are uninitialized. Calls full define function.
References BaseIFFAB< T >::define(), and BaseIFFAB< T >::setDefaultValues().
References BaseIFFAB< T >::clear().
invalid but necessary for leveldata to compile
void BaseIFFAB< T >::define | ( | const IntVectSet & | a_region, | |
const EBGraph & | a_ebgraph, | |||
const int & | a_direction, | |||
const int & | a_nvarin | |||
) | [inline] |
Full define function. Specifies the irregular domain and the number of data components per face. The irregular domain must lie completely within the EBGraph. The contents are uninitialized. If it has previously been defined, the old definition data is overwritten and lost.
References Box::bigEnd(), BaseIFFAB< T >::clear(), ProblemDomain::domainBox(), EBGraph::getDomain(), IntVectSet::isEmpty(), ProblemDomain::isPeriodic(), BaseIFFAB< T >::m_data, BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_ebgraph, BaseIFFAB< T >::m_fab, BaseIFFAB< T >::m_isDefined, BaseIFFAB< T >::m_ivs, BaseIFFAB< T >::m_nComp, BaseIFFAB< T >::m_nFaces, BaseIFFAB< T >::m_truesize, IntVectSet::minBox(), EBGraph::numVoFs(), BaseFab< T >::resize(), BaseFab< T >::setVal(), Box::smallEnd(), SpaceDim, and surroundingNodes().
Referenced by BaseIFFAB< T >::BaseIFFAB().
void BaseIFFAB< T >::setVal | ( | const T & | value | ) | [inline] |
Set a value at every data location.
References BaseIFFAB< T >::isDefined(), BaseIFFAB< T >::m_data, BaseIFFAB< T >::m_nComp, and BaseIFFAB< T >::m_nFaces.
void BaseIFFAB< T >::setVal | ( | int | ivar, | |
const T & | value | |||
) | [inline] |
Set a value at every data location.
References BaseIFFAB< T >::isDefined(), BaseIFFAB< T >::m_data, BaseIFFAB< T >::m_nComp, and BaseIFFAB< T >::m_nFaces.
void BaseIFFAB< T >::copy | ( | const Box & | a_intBox, | |
const Interval & | a_destInterval, | |||
const Box & | a_toBox, | |||
const BaseIFFAB< T > & | a_src, | |||
const Interval & | a_srcInterval | |||
) | [inline] |
define over surrounding nodes of invectset (ivs is cell-centered).
References Interval::begin(), Interval::end(), BaseIFFAB< T >::isDefined(), IntVectSet::isEmpty(), BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_ebgraph, BaseIFFAB< T >::m_ivs, BaseIFFAB< T >::m_nComp, FaceIterator::ok(), FaceIterator::reset(), Interval::size(), and FaceStop::SurroundingWithBoundary.
void BaseIFFAB< T >::clear | ( | ) | [inline] |
Remove all data from this BaseIFFAB. You must call { define} again in order to use it.
References BaseFab< T >::clear(), BaseIFFAB< T >::m_data, BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_fab, BaseIFFAB< T >::m_isDefined, BaseIFFAB< T >::m_ivs, BaseIFFAB< T >::m_nComp, BaseIFFAB< T >::m_nFaces, and IntVectSet::makeEmpty().
Referenced by BaseIFFAB< T >::define(), and BaseIFFAB< T >::~BaseIFFAB().
bool BaseIFFAB< T >::isDefined | ( | ) | const [inline] |
Tells whether this BaseIFFAB has been defined, either with a constructor or with { define}. It must be initialized in order to access its data.
References BaseIFFAB< T >::m_isDefined.
Referenced by BaseIFFAB< T >::copy(), BaseIFFAB< T >::linearIn(), BaseIFFAB< T >::linearOut(), BaseIFFAB< T >::operator()(), BaseIFFAB< T >::setVal(), and BaseIFFAB< T >::size().
int BaseIFFAB< T >::numFaces | ( | ) | const [inline] |
Return the number of face in this BaseIFFAB.
References BaseIFFAB< T >::m_nFaces.
int BaseIFFAB< T >::nComp | ( | ) | const [inline] |
Return the number of data components of this BaseIFFAB.
References BaseIFFAB< T >::m_nComp.
int BaseIFFAB< T >::direction | ( | ) | const [inline] |
Return the direction of the faces of this BaseIFFAB.
References BaseIFFAB< T >::m_direction.
const IntVectSet & BaseIFFAB< T >::getIVS | ( | ) | const [inline] |
Return the irregular domain of the BaseIFFAB.
References BaseIFFAB< T >::m_ivs.
T & BaseIFFAB< T >::operator() | ( | const FaceIndex & | a_face, | |
const int & | varlocin | |||
) | [inline] |
Indexing operator. Return a reference to the contents of this IFFAB, at the specified face and data component. The first component is zero, the last is {nvar-1}. The returned object is a modifiable lvalue.
References IntVectSet::contains(), BaseIFFAB< T >::dataPtr(), FaceIndex::direction(), BaseIFFAB< T >::getIndex(), FaceIndex::gridIndex(), Side::Hi, BaseIFFAB< T >::isDefined(), Side::Lo, BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_ivs, and BaseIFFAB< T >::m_nComp.
T * BaseIFFAB< T >::dataPtr | ( | const int & | a_comp | ) | [inline] |
References BaseIFFAB< T >::m_data, BaseIFFAB< T >::m_nComp, and BaseIFFAB< T >::m_nFaces.
Referenced by BaseIFFAB< T >::getIndex(), and BaseIFFAB< T >::operator()().
T * BaseIFFAB< T >::getIndex | ( | const FaceIndex & | a_face, | |
const int & | a_comp | |||
) | const [inline] |
References BaseIFFAB< T >::dataPtr(), BaseIFFAB< T >::getLocalVecIndex(), FaceIndex::gridIndex(), Side::Hi, BaseIFFAB< T >::m_fab, and BaseIFFAB< T >::m_nFaces.
Referenced by BaseIFFAB< T >::operator()().
const T * BaseIFFAB< T >::dataPtr | ( | const int & | a_comp | ) | const [inline] |
References BaseIFFAB< T >::m_data, BaseIFFAB< T >::m_nComp, and BaseIFFAB< T >::m_nFaces.
References BaseIFFAB< T >::m_ebgraph.
static int BaseIFFAB< T >::preAllocatable | ( | ) | [inline, static] |
References Interval::begin(), Interval::end(), EBGraph::getRegion(), FaceIterator::getVector(), BaseIFFAB< T >::isDefined(), linearListSize(), linearSize(), BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_ebgraph, BaseIFFAB< T >::m_ivs, pout(), BaseIFFAB< T >::s_verbose, Vector< T >::size(), and FaceStop::SurroundingWithBoundary.
void BaseIFFAB< T >::linearOut | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | const [inline] |
References Interval::begin(), Interval::end(), FaceIterator::getVector(), BaseIFFAB< T >::isDefined(), linearListOut(), linearListSize(), linearOut(), linearSize(), BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_ebgraph, BaseIFFAB< T >::m_ivs, Vector< T >::size(), and FaceStop::SurroundingWithBoundary.
void BaseIFFAB< T >::linearIn | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | [inline] |
References Interval::begin(), Interval::end(), FaceIterator::getVector(), BaseIFFAB< T >::isDefined(), linearIn(), linearListIn(), linearListSize(), linearSize(), BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_ebgraph, BaseIFFAB< T >::m_ivs, Vector< T >::size(), and FaceStop::SurroundingWithBoundary.
void BaseIFFAB< T >::setVerbose | ( | bool | a_verbose | ) | [inline, static] |
References BaseIFFAB< T >::s_verbose.
void BaseIFFAB< T >::setDefaultValues | ( | ) | [inline, private] |
References BaseIFFAB< T >::m_data, BaseIFFAB< T >::m_direction, BaseIFFAB< T >::m_isDefined, BaseIFFAB< T >::m_nComp, and BaseIFFAB< T >::m_nFaces.
Referenced by BaseIFFAB< T >::BaseIFFAB().
int BaseIFFAB< T >::getLocalVecIndex | ( | const FaceIndex & | a_face | ) | const [inline, protected] |
References FaceIndex::cellIndex(), FaceIndex::gridIndex(), Side::Hi, FaceIndex::isBoundary(), Side::Lo, BaseIFFAB< T >::m_ebgraph, Max(), and EBGraph::numVoFs().
Referenced by BaseIFFAB< T >::getIndex().
Referenced by BaseIFFAB< T >::setVerbose(), and BaseIFFAB< T >::size().
int BaseIFFAB< T >::m_truesize [protected] |
Referenced by BaseIFFAB< T >::define().
int BaseIFFAB< T >::m_direction [protected] |
Referenced by BaseIFFAB< T >::clear(), BaseIFFAB< T >::define(), and BaseIFFAB< T >::getIndex().
IntVectSet BaseIFFAB< T >::m_ivs [protected] |
bool BaseIFFAB< T >::m_isDefined [protected] |