#include <MiniIVFAB.H>
Implemented as just a raw vector of vofs and data, more optimized for smaller memory footprint and faster linearIn/linearOut. will be more brutal for vof-by-vof indexing. bvs
Public Member Functions | |
MiniIVFAB () | |
MiniIVFAB (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin) | |
MiniIVFAB (const Interval &a_comps, BaseIVFAB< T > &a_original) | |
virtual | ~MiniIVFAB () |
virtual void | define (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin) |
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 () |
MiniIVFAB (const Box &a_region, int a_nVar) | |
invalid but necessary for leveldata to compile | |
virtual T * | getIndex (const VolIndex &a_vof, const int &a_comp) const |
get index into vector | |
Protected Attributes | |
Vector< VolIndex > | m_vofs |
Private Member Functions | |
virtual void | setDefaultValues () |
Default constructor. Constructs an uninitialized IVFAB. You must subsequently call { define} before using this IVFAB.
References MiniIVFAB< T >::setDefaultValues().
MiniIVFAB< T >::MiniIVFAB | ( | 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 MiniIVFAB< T >::define(), and MiniIVFAB< T >::setDefaultValues().
MiniIVFAB< T >::MiniIVFAB | ( | 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 MiniIVFAB< T >::clear().
invalid but necessary for leveldata to compile
void MiniIVFAB< 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 from BaseIVFAB< T >.
References MiniIVFAB< T >::clear(), VoFIterator::getVector(), IntVectSet::isEmpty(), BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_ebgraph, BaseIVFAB< T >::m_isDefined, BaseIVFAB< T >::m_ivs, BaseIVFAB< T >::m_nComp, BaseIVFAB< T >::m_nVoFs, MiniIVFAB< T >::m_vofs, EBGraph::numVoFs(), IVSIterator::ok(), and IVSIterator::reset().
Referenced by MiniIVFAB< T >::MiniIVFAB().
Reimplemented from BaseIVFAB< T >.
References Box::contains(), i, BaseIVFAB< T >::isDefined(), linearSize(), MiniIVFAB< T >::m_vofs, Interval::size(), and Vector< T >::size().
void MiniIVFAB< T >::linearOut | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | const [inline] |
Reimplemented from BaseIVFAB< T >.
References Interval::begin(), Box::contains(), Interval::end(), VolIndex::gridIndex(), i, BaseIVFAB< T >::isDefined(), linearOut(), linearSize(), BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_nVoFs, MiniIVFAB< T >::m_vofs, and Vector< T >::size().
void MiniIVFAB< T >::linearIn | ( | void * | buf, | |
const Box & | R, | |||
const Interval & | comps | |||
) | [inline] |
Reimplemented from BaseIVFAB< T >.
References Interval::begin(), Interval::end(), MiniIVFAB< T >::getIndex(), i, BaseIVFAB< T >::isDefined(), linearIn(), and linearSize().
void MiniIVFAB< T >::clear | ( | ) | [inline, virtual] |
Remove all data from this BaseIVFAB. You must call { define} again in order to use it.
Reimplemented from BaseIVFAB< T >.
References BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_isDefined, BaseIVFAB< T >::m_ivs, BaseIVFAB< T >::m_nComp, BaseIVFAB< T >::m_nVoFs, MiniIVFAB< T >::m_vofs, IntVectSet::makeEmpty(), and Vector< T >::resize().
Referenced by MiniIVFAB< T >::define(), and MiniIVFAB< T >::~MiniIVFAB().
T * MiniIVFAB< 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 from BaseIVFAB< T >.
References IntVectSet::contains(), BaseIVFAB< T >::dataPtr(), VolIndex::gridIndex(), i, BaseIVFAB< T >::isDefined(), BaseIVFAB< T >::m_data, BaseIVFAB< T >::m_ivs, BaseIVFAB< T >::m_nComp, BaseIVFAB< T >::m_nVoFs, MiniIVFAB< T >::m_vofs, and Vector< T >::size().
Referenced by MiniIVFAB< T >::linearIn().
void MiniIVFAB< T >::setDefaultValues | ( | ) | [inline, private, virtual] |
Reimplemented from BaseIVFAB< T >.
References MiniIVFAB< T >::m_vofs, Vector< T >::resize(), and BaseIVFAB< T >::setDefaultValues().
Referenced by MiniIVFAB< T >::MiniIVFAB().