MiniIVFAB< T > Class Template Reference

#include <MiniIVFAB.H>

Inheritance diagram for MiniIVFAB< T >:

Inheritance graph
[legend]

List of all members.


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

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
long offset (const BaseIndex &a_vof, const int &a_ivar) const
 for AggStencil
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


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.

References MiniIVFAB< T >::define().

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 (  )  [inline, virtual]


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 
) [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.

References CH_assert, VoFIterator::getVector(), IntVectSet::isEmpty(), MiniIVFAB< T >::m_data, MiniIVFAB< T >::m_Memory, MiniIVFAB< T >::m_nComp, MiniIVFAB< T >::m_vofs, EBGraph::numVoFs(), IVSIterator::ok(), and IVSIterator::reset().

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

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]

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 [inline, virtual]

get index into vector

needs to be public so that bulk stencils can be constructed

References CH_assert, MiniIVFAB< T >::dataPtr(), MiniIVFAB< T >::m_data, MiniIVFAB< T >::m_nComp, and MiniIVFAB< T >::m_vofs.

Referenced by MiniIVFAB< T >::copy(), MiniIVFAB< T >::linearIn(), and MiniIVFAB< double >::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 
) [inline]

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]

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

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:

Generated on Fri Apr 5 04:25:11 2019 for Chombo + EB by  doxygen 1.5.5