Chombo + EB + MF  3.2
Public Member Functions | Protected Attributes | 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)
 
bool hasVoFs () const
 
 MiniIVFAB (const Interval &a_comps, MiniIVFAB< T > &a_original)
 
virtual ~MiniIVFAB ()
 
virtual void define (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin)
 
void copy (const Box &a_fromBox, const Interval &a_dstInterval, const Box &a_toBox, const MiniIVFAB< 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)
 
Vector< VolIndexgetVoFs () const
 
T * dataPtr (int a_ivar)
 
const T * dataPtr (int a_ivar) const
 
void setVal (const T &a_val)
 
void setVal (int a_comp, const T &a_val)
 
void setVal (const T &a_val, const Box &a_box, int a_startcomp, int a_ncomp)
 
virtual T * getIndex (const VolIndex &a_vof, const int &a_comp) const
 get index into vector More...
 
long offset (const BaseIndex &a_vof, const int &a_ivar) const
 for AggStencil More...
 
T & operator() (const VolIndex &a_vof, int a_comp)
 
const T & operator() (const VolIndex &a_vof, int a_comp) const
 
template<typename F >
void forall (const MiniIVFAB &a_src, const Box &a_box, int a_srccomp, int a_destcomp, int a_numcomp, bool sameRegBox, const F &func)
 
int numVoFs () const
 
int nComp () const
 

Protected Attributes

shared_ptr< Vector< VolIndex > > m_vofs
 
shared_ptr< Vector< T > > m_Memory
 
int m_nComp = 0
 
T * m_data = nullptr
 

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

Null constructor.

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,
MiniIVFAB< T > &  a_original 
)
inline

This aliased MiniIVFAB will have a_comps.size() components, starting at zero.

template<class T >
MiniIVFAB< T >::~MiniIVFAB ( )
inlinevirtual

Member Function Documentation

template<class T>
bool MiniIVFAB< T >::hasVoFs ( ) const
inline
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.

References CH_assert, VoFIterator::getVector(), IntVectSet::isEmpty(), EBGraph::numVoFs(), IVSIterator::ok(), and IVSIterator::reset().

template<class T>
void MiniIVFAB< T >::copy ( const Box a_fromBox,
const Interval a_dstInterval,
const Box a_toBox,
const MiniIVFAB< T > &  a_src,
const Interval a_srcInterval 
)
inline
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 >
Vector< VolIndex > MiniIVFAB< T >::getVoFs ( ) const
inline
template<class T>
T* MiniIVFAB< T >::dataPtr ( int  a_ivar)
inline

Referenced by MiniIVFAB< T >::forall().

template<class T>
const T* MiniIVFAB< T >::dataPtr ( int  a_ivar) const
inline
template<class T>
void MiniIVFAB< T >::setVal ( const T &  a_val)
inline
template<class T>
void MiniIVFAB< T >::setVal ( int  a_comp,
const T &  a_val 
)
inline
template<class T>
void MiniIVFAB< T >::setVal ( const T &  a_val,
const Box a_box,
int  a_startcomp,
int  a_ncomp 
)
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

References CH_assert.

Referenced by MiniIVFAB< T >::copy(), and MiniIVFAB< Real >::operator()().

template<class T>
long MiniIVFAB< T >::offset ( const BaseIndex a_vof,
const int &  a_ivar 
) const
inline
template<class T>
T& MiniIVFAB< T >::operator() ( const VolIndex a_vof,
int  a_comp 
)
inline
template<class T>
const T& MiniIVFAB< T >::operator() ( const VolIndex a_vof,
int  a_comp 
) const
inline
template<class T >
template<typename F >
void MiniIVFAB< T >::forall ( const MiniIVFAB< T > &  a_src,
const Box a_box,
int  a_srccomp,
int  a_destcomp,
int  a_numcomp,
bool  sameRegBox,
const F &  func 
)
template<class T >
int MiniIVFAB< T >::numVoFs ( ) const
inline
template<class T>
int MiniIVFAB< T >::nComp ( ) const
inline

Member Data Documentation

template<class T>
shared_ptr<Vector<VolIndex> > MiniIVFAB< T >::m_vofs
protected
template<class T>
shared_ptr<Vector<T> > MiniIVFAB< T >::m_Memory
protected
template<class T>
int MiniIVFAB< T >::m_nComp = 0
protected
template<class T>
T* MiniIVFAB< T >::m_data = nullptr
protected

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