Chombo + EB  3.0
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
MiniIVFAB< T > Class Template Reference

#include <MiniIVFAB.H>

Inheritance diagram for MiniIVFAB< T >:
Inheritance graph
[legend]

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 ()
 
const Vector< VolIndex > & getVoFs () const
 
 MiniIVFAB (const Box &a_region, int a_nVar)
 invalid but necessary for leveldata to compile More...
 
virtual T * getIndex (const VolIndex &a_vof, const int &a_comp) const
 get index into vector More...
 
- Public Member Functions inherited from BaseIVFAB< T >
 BaseIVFAB ()
 
 BaseIVFAB (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin)
 
int numDataTypes () const
 for AggStencil More...
 
int dataType (const BaseIndex &a_baseInd) const
 for AggStencil More...
 
T * dataPtr (int a_dataType, int a_ivar)
 
const T * dataPtr (int a_dataType, int a_ivar) const
 
 BaseIVFAB (const Interval &a_comps, BaseIVFAB< T > &a_original)
 
virtual ~BaseIVFAB ()
 
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)
 
bool isDefined () const
 
int numVoFs () const
 
int nComp () const
 
const IntVectSetgetIVS () const
 
const EBGraphgetEBGraph () 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 More...
 
T * dataPtr (const int &a_comp)
 
const T * dataPtr (const int &a_comp) const
 
long offset (const BaseIndex &a_vof, const int &a_ivar) const
 for AggStencil More...
 

Protected Attributes

Vector< VolIndexm_vofs
 
- Protected Attributes inherited from BaseIVFAB< T >
Vector< T > m_data
 
int m_nComp
 
int m_nVoFs
 
EBGraph m_ebgraph
 
BaseFab< T * > m_fab
 
IntVectSet m_ivs
 
bool m_isDefined
 

Private Member Functions

virtual void setDefaultValues ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseIVFAB< T >
static int preAllocatable ()
 
static void setVerbose (bool a_verbose)
 
static void setVerboseDebug (bool a_verboseDebug)
 
- Static Public Attributes inherited from BaseIVFAB< T >
static bool s_verboseDebug = false
 
- Static Protected Attributes inherited from BaseIVFAB< T >
static bool s_verbose = false
 

Detailed Description

template<class T>
class MiniIVFAB< T >

MiniIVFAB is a templated data holder defined at the VoFs of an irregular domain.

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

Constructor & Destructor Documentation

template<class T >
MiniIVFAB< T >::MiniIVFAB ( )
inline

Default constructor. Constructs an uninitialized IVFAB. You must subsequently call { define} before using this IVFAB.

template<class T >
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.

template<class T>
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.

template<class T >
MiniIVFAB< T >::~MiniIVFAB ( )
inlinevirtual
template<class T>
MiniIVFAB< T >::MiniIVFAB ( const Box a_region,
int  a_nVar 
)
inline

invalid but necessary for leveldata to compile

Member Function Documentation

template<class T >
void MiniIVFAB< T >::define ( const IntVectSet a_region,
const EBGraph a_ebgraph,
const int &  a_nvarin 
)
inlinevirtual

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 CH_assert, VoFIterator::getVector(), IntVectSet::isEmpty(), IVSIterator::ok(), and IVSIterator::reset().

template<class T >
int MiniIVFAB< T >::size ( const Box R,
const Interval comps 
) const
inline
template<class T >
void MiniIVFAB< T >::linearOut ( void *  buf,
const Box R,
const Interval comps 
) const
inline
template<class T >
void MiniIVFAB< T >::linearIn ( void *  buf,
const Box R,
const Interval comps 
)
inline
template<class T >
void MiniIVFAB< T >::clear ( )
inlinevirtual

Remove all data from this BaseIVFAB. You must call { define} again in order to use it.

Reimplemented from BaseIVFAB< T >.

References BaseIVFAB< T >::clear().

template<class T >
const Vector< VolIndex > & MiniIVFAB< T >::getVoFs ( ) const
inline
template<class T >
T * MiniIVFAB< T >::getIndex ( const VolIndex a_vof,
const int &  a_comp 
) const
inlinevirtual

get index into vector

needs to be public so that bulk stencils can be constructed

Reimplemented from BaseIVFAB< T >.

References CH_assert, and VolIndex::gridIndex().

template<class T >
void MiniIVFAB< T >::setDefaultValues ( )
inlineprivatevirtual

Reimplemented from BaseIVFAB< T >.

References BaseIVFAB< T >::setDefaultValues().

Member Data Documentation

template<class T>
Vector<VolIndex> MiniIVFAB< T >::m_vofs
protected

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