#include <IVSFAB.H>
Public Member Functions | |
IVSFAB () | |
IVSFAB (const IntVectSet &a_region, const int &a_nvarin) | |
~IVSFAB () | |
void | define (const IntVectSet &a_region, const int &a_nvarin) |
void | setVal (const T &value) |
void | copy (const Box &a_fromBox, const Interval &a_destInterval, const Box &a_toBox, const IVSFAB< T > &a_src, const Interval &a_srcInterval) |
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) |
void | clear () |
bool | isDefined () const |
int | numIvs () const |
int | nComp () const |
const IntVectSet & | getIVS () const |
T & | operator() (const IntVect &a_iv, const int &varlocin) |
const T & | operator() (const IntVect &a_iv, const int &varlocin) const |
const T * | dataPtr (const int &a_comp) const |
T * | dataPtr (const int &a_comp) |
IVSFAB (const Box &a_region, int a_nVar) | |
invalid but necessary for leveldata to compile | |
const int * | loVect () const |
const int * | hiVect () const |
Static Public Member Functions | |
static int | preAllocatable () |
static void | setVerbose (bool a_verbose) |
Protected Member Functions | |
int | getIndex (const IntVect &a_iv, const int &a_comp) const |
Protected Attributes | |
T * | m_dataPtr |
int | m_nComp |
int | m_nIvs |
IntVect | m_loVect |
IntVect | m_hiVect |
BaseFab< int > | m_ivmap |
IntVectSet | m_ivs |
bool | m_isDefined |
Static Protected Attributes | |
static bool | s_verbose = false |
Private Member Functions | |
void | setDefaultValues () |
IVSFAB< T > & | operator= (const IVSFAB< T > &) |
IVSFAB (const IVSFAB< T > &) |
Default constructor. Constructs an uninitialized IVFAB. You must subsequently call { define} before using this IVFAB.
References IVSFAB< T >::setDefaultValues().
IVSFAB< T >::IVSFAB | ( | const IntVectSet & | a_region, | |
const int & | a_nvarin | |||
) | [inline] |
References IVSFAB< T >::define(), and IVSFAB< T >::setDefaultValues().
References IVSFAB< T >::clear().
References MayDay::Error().
void IVSFAB< T >::define | ( | const IntVectSet & | a_region, | |
const int & | a_nvarin | |||
) | [inline] |
References CH_SPACEDIM, IVSFAB< T >::clear(), IntVectSet::isEmpty(), IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_hiVect, IVSFAB< T >::m_isDefined, IVSFAB< T >::m_ivmap, IVSFAB< T >::m_ivs, IVSFAB< T >::m_loVect, IVSFAB< T >::m_nComp, IVSFAB< T >::m_nIvs, IntVectSet::minBox(), IVSIterator::ok(), IVSIterator::reset(), BaseFab< T >::resize(), IntVect::Unit, and IntVect::Zero.
Referenced by IVSFAB< T >::IVSFAB().
void IVSFAB< T >::setVal | ( | const T & | value | ) | [inline] |
Set a value at every data location.
References IVSFAB< T >::isDefined(), IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_nComp, and IVSFAB< T >::m_nIvs.
static int IVSFAB< T >::preAllocatable | ( | ) | [inline, static] |
This stuff required by LevelData in parallel:
References MayDay::Error().
void IVSFAB< T >::linearOut | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | const [inline] |
References MayDay::Error().
void IVSFAB< T >::linearIn | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | [inline] |
References MayDay::Error().
void IVSFAB< T >::clear | ( | ) | [inline] |
Remove all data from this IVSFAB. You must call { define} again in order to use it.
References BaseFab< T >::clear(), IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_isDefined, IVSFAB< T >::m_ivmap, IVSFAB< T >::m_ivs, IVSFAB< T >::m_nComp, IVSFAB< T >::m_nIvs, and IntVectSet::makeEmpty().
Referenced by IVSFAB< T >::define(), and IVSFAB< T >::~IVSFAB().
bool IVSFAB< T >::isDefined | ( | ) | const [inline] |
Tells whether this IVSFAB has been defined, either with a constructor or with { define}. It must be initialized in order to access its data.
References IVSFAB< T >::m_isDefined.
Referenced by IVSFAB< T >::copy(), IVSFAB< T >::dataPtr(), IVSFAB< T >::getIndex(), IVSFAB< T >::operator()(), and IVSFAB< T >::setVal().
int IVSFAB< T >::numIvs | ( | ) | const [inline] |
Return the number of Ivs in this IVSFAB.
References IVSFAB< T >::m_nIvs.
int IVSFAB< T >::nComp | ( | ) | const [inline] |
Return the number of data components of this IVSFAB.
References IVSFAB< T >::m_nComp.
const IntVectSet & IVSFAB< T >::getIVS | ( | ) | const [inline] |
Return the irregular domain of the IVSFAB.
References IVSFAB< T >::m_ivs.
T & IVSFAB< T >::operator() | ( | const IntVect & | a_iv, | |
const int & | varlocin | |||
) | [inline] |
Indexing operator. Return a reference to the contents of this IVFAB, at the specified Iv and data component. The first component is zero, the last is {nvar-1}. The returned object is a modifiable lvalue.
References IVSFAB< T >::getIndex(), IVSFAB< T >::isDefined(), IVSFAB< T >::m_dataPtr, and IVSFAB< T >::m_nComp.
const T * IVSFAB< T >::dataPtr | ( | const int & | a_comp | ) | const [inline] |
Return a const pointer to the internal data storage of this IVFAB. \
References IVSFAB< T >::isDefined(), IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_nComp, and IVSFAB< T >::m_nIvs.
T * IVSFAB< T >::dataPtr | ( | const int & | a_comp | ) | [inline] |
Return a pointer to the internal data storage of this IVFAB.
References IVSFAB< T >::isDefined(), IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_nComp, and IVSFAB< T >::m_nIvs.
const int * IVSFAB< T >::loVect | ( | ) | const [inline] |
Return a fake "lower left corner of the domain" for use with Fortran.
References IntVect::getVect(), and IVSFAB< T >::m_loVect.
const int * IVSFAB< T >::hiVect | ( | ) | const [inline] |
Return a fake "upper right corner of the domain" for use with Fortran.
References IntVect::getVect(), and IVSFAB< T >::m_hiVect.
void IVSFAB< T >::setVerbose | ( | bool | a_verbose | ) | [inline, static] |
References IVSFAB< T >::s_verbose.
void IVSFAB< T >::setDefaultValues | ( | ) | [inline, private] |
References IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_hiVect, IVSFAB< T >::m_isDefined, IVSFAB< T >::m_loVect, IVSFAB< T >::m_nComp, IVSFAB< T >::m_nIvs, IntVect::Unit, and IntVect::Zero.
Referenced by IVSFAB< T >::IVSFAB().
int IVSFAB< T >::getIndex | ( | const IntVect & | a_iv, | |
const int & | a_comp | |||
) | const [inline, protected] |
References IntVectSet::contains(), IVSFAB< T >::isDefined(), IVSFAB< T >::m_ivmap, IVSFAB< T >::m_ivs, IVSFAB< T >::m_nComp, and IVSFAB< T >::m_nIvs.
Referenced by IVSFAB< T >::operator()().
IVSFAB< T > & IVSFAB< T >::operator= | ( | const IVSFAB< T > & | a_input | ) | [inline, private] |
References MayDay::Error().
Referenced by IVSFAB< T >::define(), IVSFAB< T >::loVect(), and IVSFAB< T >::setDefaultValues().
Referenced by IVSFAB< T >::define(), IVSFAB< T >::hiVect(), and IVSFAB< T >::setDefaultValues().
Referenced by IVSFAB< T >::clear(), IVSFAB< T >::define(), and IVSFAB< T >::getIndex().
IntVectSet IVSFAB< T >::m_ivs [protected] |
Referenced by IVSFAB< T >::clear(), IVSFAB< T >::copy(), IVSFAB< T >::define(), IVSFAB< T >::getIndex(), and IVSFAB< T >::getIVS().
bool IVSFAB< T >::m_isDefined [protected] |
Referenced by IVSFAB< T >::clear(), IVSFAB< T >::define(), IVSFAB< T >::isDefined(), and IVSFAB< T >::setDefaultValues().
Referenced by IVSFAB< T >::setVerbose().