#include <BaseIVFAB.H>
Public Member Functions | |
BaseIVFAB () | |
BaseIVFAB (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin) | |
BaseIVFAB (const Interval &a_comps, BaseIVFAB< T > &a_original) | |
virtual | ~BaseIVFAB () |
virtual void | define (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin) |
void | setVal (const T &value) |
void | setVal (int ivar, const T &value) |
void | setVal (const T &a_value, const Box &a_box, int a_nstart, int a_numcomp) |
void | copy (const Box &a_fromBox, const Interval &a_destInterval, const Box &a_toBox, const BaseIVFAB< 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) |
virtual void | clear () |
bool | isDefined () const |
int | numVoFs () const |
int | nComp () const |
const IntVectSet & | getIVS () const |
const EBGraph & | getEBGraph () const |
T & | operator() (const VolIndex &a_vof, const int &varlocin) |
const T & | operator() (const VolIndex &a_vof, const int &varlocin) const |
BaseIVFAB (const Box &a_region, int a_nVar) | |
invalid but necessary for leveldata to compile | |
T * | dataPtr (const int &a_comp) |
const T * | dataPtr (const int &a_comp) const |
virtual T * | getIndex (const VolIndex &a_vof, const int &a_comp) const |
get index into vector | |
Static Public Member Functions | |
static int | preAllocatable () |
static void | setVerbose (bool a_verbose) |
static void | setVerboseDebug (bool a_verboseDebug) |
Static Public Attributes | |
static bool | s_verboseDebug = false |
Protected Member Functions | |
virtual void | setDefaultValues () |
Protected Attributes | |
T * | m_data |
int | m_nComp |
int | m_nVoFs |
EBGraph | m_ebgraph |
BaseFab< T * > | m_fab |
IntVectSet | m_ivs |
bool | m_isDefined |
Static Protected Attributes | |
static bool | s_verbose = false |
Private Member Functions | |
void | operator= (const BaseIVFAB< T > &a_input) |
BaseIVFAB (const BaseIVFAB< T > &a_input) |
Default constructor. Constructs an uninitialized IVFAB. You must subsequently call { define} before using this IVFAB.
References BaseIVFAB< T >::setDefaultValues().
BaseIVFAB< T >::BaseIVFAB | ( | const IntVectSet & | a_region, | |
const EBGraph & | a_ebgraph, | |||
const int & | a_nvarin | |||
) | [inline] |
Defining constructor. Specifies the irregular domain and the number of data components per VoF. The irregular domain must lie completely within the EBGraph. The contents are uninitialized. Calls full define function.
References BaseIVFAB< T >::define(), and BaseIVFAB< T >::setDefaultValues().
BaseIVFAB< T >::BaseIVFAB | ( | const Interval & | a_comps, | |
BaseIVFAB< T > & | a_original | |||
) |
Constructs an 'aliased' BaseIVFAB of the requested interval of the argument BaseIVFAB. This BaseIVFAB does not allocate any memory, but sets its data pointer into the memory pointed to by the argument BaseIVFAB. It is the users responsiblity to ensure this aliased BaseIVFAB is not used after the original BaseIVFAB has deleted its data ptr (resize, define(..) called, or destruction, etc.).
This aliased BaseIVFAB will also generate side effects (modifying the values of data in one will modify the other's data).
This aliased BaseIVFAB will have a_comps.size() components, starting at zero.
References BaseIVFAB< T >::clear().
invalid but necessary for leveldata to compile
void BaseIVFAB< T >::define | ( | const IntVectSet & | a_region, | |
const EBGraph & | a_ebgraph, | |||
const int & | a_nvarin | |||
) | [inline, virtual] |
Full define function. Specifies the irregular domain and the number of data components per VoF. 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.
Reimplemented in MiniIVFAB< T >, and MiniIVFAB< double >.
References BaseIVFAB< T >::clear(), IntVectSet::isEmpty(), BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_ebgraph, BaseIVFAB< T >::m_fab, BaseIVFAB< T >::m_isDefined, BaseIVFAB< T >::m_ivs, BaseIVFAB< T >::m_nComp, BaseIVFAB< T >::m_nVoFs, IntVectSet::minBox(), BaseIVFAB< T >::numVoFs(), EBGraph::numVoFs(), IVSIterator::ok(), IVSIterator::reset(), BaseFab< T >::resize(), and BaseFab< T >::setVal().
Referenced by BaseIVFAB< T >::BaseIVFAB().
void BaseIVFAB< T >::setVal | ( | const T & | value | ) | [inline] |
Set a value at every data location.
References BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_nComp, and BaseIVFAB< T >::m_nVoFs.
void BaseIVFAB< T >::setVal | ( | int | ivar, | |
const T & | value | |||
) | [inline] |
Set a value at every data location.
References BaseIVFAB< T >::isDefined(), BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_nComp, and BaseIVFAB< T >::m_nVoFs.
void BaseIVFAB< T >::setVal | ( | const T & | a_value, | |
const Box & | a_box, | |||
int | a_nstart, | |||
int | a_numcomp | |||
) | [inline] |
Set a value at every data location within a_box
References BaseIVFAB< T >::isDefined(), IntVectSet::isEmpty(), BaseIVFAB< T >::m_ebgraph, and BaseIVFAB< T >::m_ivs.
static int BaseIVFAB< T >::preAllocatable | ( | ) | [inline, static] |
This stuff required by LevelData in parallel:
Reimplemented in MiniIVFAB< T >, and MiniIVFAB< double >.
References Interval::begin(), Interval::end(), VoFIterator::getVector(), BaseIVFAB< T >::isDefined(), EBGraph::isIrregular(), linearListSize(), linearSize(), BaseIVFAB< T >::m_ebgraph, BaseIVFAB< T >::m_ivs, pout(), BaseIVFAB< T >::s_verboseDebug, and Vector< T >::size().
void BaseIVFAB< T >::linearOut | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | const [inline] |
Reimplemented in MiniIVFAB< T >, and MiniIVFAB< double >.
References Interval::begin(), Interval::end(), VoFIterator::getVector(), BaseIVFAB< T >::isDefined(), linearListOut(), linearListSize(), linearOut(), linearSize(), BaseIVFAB< T >::m_ebgraph, BaseIVFAB< T >::m_ivs, pout(), BaseIVFAB< T >::s_verboseDebug, and Vector< T >::size().
void BaseIVFAB< T >::linearIn | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | [inline] |
Reimplemented in MiniIVFAB< T >, and MiniIVFAB< double >.
References Interval::begin(), Interval::end(), BaseIVFAB< T >::isDefined(), linearIn(), linearListIn(), linearListSize(), linearSize(), pout(), BaseIVFAB< T >::s_verboseDebug, and Vector< T >::size().
void BaseIVFAB< T >::clear | ( | ) | [inline, virtual] |
Remove all data from this BaseIVFAB. You must call { define} again in order to use it.
Reimplemented in MiniIVFAB< T >, and MiniIVFAB< double >.
References BaseFab< T >::clear(), BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_fab, BaseIVFAB< T >::m_isDefined, BaseIVFAB< T >::m_ivs, BaseIVFAB< T >::m_nComp, BaseIVFAB< T >::m_nVoFs, and IntVectSet::makeEmpty().
Referenced by BaseIVFAB< T >::define(), and BaseIVFAB< T >::~BaseIVFAB().
bool BaseIVFAB< T >::isDefined | ( | ) | const [inline] |
Tells whether this BaseIVFAB has been defined, either with a constructor or with { define}. It must be initialized in order to access its data.
References BaseIVFAB< T >::m_isDefined.
Referenced by BaseIVFAB< T >::copy(), MiniIVFAB< T >::getIndex(), BaseIVFAB< T >::getIndex(), MiniIVFAB< T >::linearIn(), BaseIVFAB< T >::linearIn(), MiniIVFAB< T >::linearOut(), BaseIVFAB< T >::linearOut(), BaseIVFAB< T >::operator()(), BaseIVFAB< T >::setVal(), MiniIVFAB< T >::size(), and BaseIVFAB< T >::size().
int BaseIVFAB< T >::numVoFs | ( | ) | const [inline] |
Return the number of VoFs in this BaseIVFAB.
References BaseIVFAB< T >::m_nVoFs.
Referenced by BaseIVFAB< T >::define().
int BaseIVFAB< T >::nComp | ( | ) | const [inline] |
Return the number of data components of this BaseIVFAB.
References BaseIVFAB< T >::m_nComp.
const IntVectSet & BaseIVFAB< T >::getIVS | ( | ) | const [inline] |
Return the irregular domain of the BaseIVFAB.
References BaseIVFAB< T >::m_ivs.
References BaseIVFAB< T >::m_ebgraph.
T & BaseIVFAB< T >::operator() | ( | const VolIndex & | a_vof, | |
const int & | varlocin | |||
) | [inline] |
Indexing operator. Return a reference to the contents of this IVFAB, at the specified VoF and data component. The first component is zero, the last is {nvar-1}. The returned object is a modifiable lvalue.
References BaseIVFAB< T >::dataPtr(), BaseIVFAB< T >::getIndex(), BaseIVFAB< T >::isDefined(), and BaseIVFAB< T >::m_nComp.
void BaseIVFAB< T >::setVerbose | ( | bool | a_verbose | ) | [inline, static] |
References BaseIVFAB< T >::s_verbose.
void BaseIVFAB< T >::setVerboseDebug | ( | bool | a_verboseDebug | ) | [inline, static] |
References BaseIVFAB< T >::s_verboseDebug.
T * BaseIVFAB< T >::dataPtr | ( | const int & | a_comp | ) | [inline] |
References BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_nComp, and BaseIVFAB< T >::m_nVoFs.
Referenced by MiniIVFAB< T >::getIndex(), BaseIVFAB< T >::getIndex(), and BaseIVFAB< T >::operator()().
const T * BaseIVFAB< T >::dataPtr | ( | const int & | a_comp | ) | const [inline] |
References BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_nComp, and BaseIVFAB< T >::m_nVoFs.
T * BaseIVFAB< T >::getIndex | ( | const VolIndex & | a_vof, | |
const int & | a_comp | |||
) | const [inline, virtual] |
get index into vector
needs to be public so that bulk stencils can be constructed
Reimplemented in MiniIVFAB< T >, and MiniIVFAB< double >.
References VolIndex::cellIndex(), IntVectSet::contains(), BaseIVFAB< T >::dataPtr(), VolIndex::gridIndex(), BaseIVFAB< T >::isDefined(), BaseIVFAB< T >::m_fab, BaseIVFAB< T >::m_ivs, BaseIVFAB< T >::m_nComp, and BaseIVFAB< T >::m_nVoFs.
Referenced by BaseIVFAB< T >::operator()().
void BaseIVFAB< T >::setDefaultValues | ( | ) | [inline, protected, virtual] |
Reimplemented in MiniIVFAB< T >, and MiniIVFAB< double >.
References BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_isDefined, BaseIVFAB< T >::m_nComp, and BaseIVFAB< T >::m_nVoFs.
Referenced by BaseIVFAB< T >::BaseIVFAB(), and MiniIVFAB< T >::setDefaultValues().
void BaseIVFAB< T >::operator= | ( | const BaseIVFAB< T > & | a_input | ) | [inline, private] |
bool BaseIVFAB< T >::s_verboseDebug = false [inline, static] |
Referenced by MiniIVFAB< T >::clear(), BaseIVFAB< T >::clear(), BaseIVFAB< T >::copy(), BaseIVFAB< T >::dataPtr(), MiniIVFAB< T >::define(), BaseIVFAB< T >::define(), MiniIVFAB< T >::getIndex(), BaseIVFAB< T >::getIndex(), BaseIVFAB< T >::nComp(), BaseIVFAB< T >::operator()(), BaseIVFAB< T >::setDefaultValues(), and BaseIVFAB< T >::setVal().
Referenced by MiniIVFAB< T >::clear(), BaseIVFAB< T >::clear(), BaseIVFAB< T >::dataPtr(), MiniIVFAB< T >::define(), BaseIVFAB< T >::define(), MiniIVFAB< T >::getIndex(), BaseIVFAB< T >::getIndex(), MiniIVFAB< T >::linearOut(), BaseIVFAB< T >::numVoFs(), BaseIVFAB< T >::setDefaultValues(), and BaseIVFAB< T >::setVal().
Referenced by BaseIVFAB< T >::clear(), BaseIVFAB< T >::define(), and BaseIVFAB< T >::getIndex().
IntVectSet BaseIVFAB< T >::m_ivs [protected] |
Referenced by MiniIVFAB< T >::clear(), BaseIVFAB< T >::clear(), BaseIVFAB< T >::copy(), MiniIVFAB< T >::define(), BaseIVFAB< T >::define(), MiniIVFAB< T >::getIndex(), BaseIVFAB< T >::getIndex(), BaseIVFAB< T >::getIVS(), BaseIVFAB< T >::linearOut(), BaseIVFAB< T >::setVal(), and BaseIVFAB< T >::size().
bool BaseIVFAB< T >::m_isDefined [protected] |
Referenced by BaseIVFAB< T >::setVerbose().