Chombo + EB  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

◆ MiniIVFAB() [1/3]

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

Null constructor.

Referenced by MiniIVFAB< Real >::hasVoFs().

◆ MiniIVFAB() [2/3]

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.

◆ MiniIVFAB() [3/3]

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.

◆ ~MiniIVFAB()

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

Member Function Documentation

◆ hasVoFs()

template<class T>
bool MiniIVFAB< T >::hasVoFs ( ) const
inline

◆ define()

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.

Referenced by MiniIVFAB< Real >::hasVoFs(), and MiniIVFAB< Real >::MiniIVFAB().

◆ copy()

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

◆ size()

template<class T >
int MiniIVFAB< T >::size ( const Box R,
const Interval comps 
) const
inline

◆ linearOut()

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

◆ linearIn()

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

◆ getVoFs()

template<class T >
Vector< VolIndex > MiniIVFAB< T >::getVoFs ( ) const
inline

◆ dataPtr() [1/2]

template<class T>
T* MiniIVFAB< T >::dataPtr ( int  a_ivar)
inline

◆ dataPtr() [2/2]

template<class T>
const T* MiniIVFAB< T >::dataPtr ( int  a_ivar) const
inline

◆ setVal() [1/3]

template<class T>
void MiniIVFAB< T >::setVal ( const T &  a_val)
inline

◆ setVal() [2/3]

template<class T>
void MiniIVFAB< T >::setVal ( int  a_comp,
const T &  a_val 
)
inline

◆ setVal() [3/3]

template<class T>
void MiniIVFAB< T >::setVal ( const T &  a_val,
const Box a_box,
int  a_startcomp,
int  a_ncomp 
)
inline

◆ getIndex()

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

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

◆ offset()

template<class T>
long MiniIVFAB< T >::offset ( const BaseIndex a_vof,
const int &  a_ivar 
) const
inline

◆ operator()() [1/2]

template<class T>
T& MiniIVFAB< T >::operator() ( const VolIndex a_vof,
int  a_comp 
)
inline

◆ operator()() [2/2]

template<class T>
const T& MiniIVFAB< T >::operator() ( const VolIndex a_vof,
int  a_comp 
) const
inline

◆ forall()

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 
)

◆ numVoFs()

template<class T >
int MiniIVFAB< T >::numVoFs ( ) const
inline

◆ nComp()

template<class T>
int MiniIVFAB< T >::nComp ( ) const
inline

Member Data Documentation

◆ m_vofs

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

◆ m_Memory

template<class T>
shared_ptr<Vector<T> > MiniIVFAB< T >::m_Memory
protected

◆ m_nComp

template<class T>
int MiniIVFAB< T >::m_nComp = 0
protected

◆ m_data

template<class T>
T* MiniIVFAB< T >::m_data = nullptr
protected

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