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

#include <BaseIVFAB.H>

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

Public Member Functions

 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 ()
 
virtual void define (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_nvarin)
 
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)
 
virtual void clear ()
 
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
 
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...
 

Static Public Member Functions

static int preAllocatable ()
 
static void setVerbose (bool a_verbose)
 
static void setVerboseDebug (bool a_verboseDebug)
 

Static Public Attributes

static bool s_verboseDebug = false
 

Protected Member Functions

virtual void setDefaultValues ()
 

Protected Attributes

Vector< T > m_data
 
int m_nComp
 
int m_nVoFs
 
EBGraph m_ebgraph
 
BaseFab< T * > m_fab
 
IntVectSet m_ivs
 
bool m_isDefined
 

Static Protected Attributes

static bool s_verbose = false
 

Private Member Functions

void operator= (const BaseIVFAB< T > &a_input)
 
 BaseIVFAB (const BaseIVFAB< T > &a_input)
 

Detailed Description

template<class T>
class BaseIVFAB< T >

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

Constructor & Destructor Documentation

◆ BaseIVFAB() [1/5]

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

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

Referenced by BaseIVFAB< Real >::dataPtr().

◆ BaseIVFAB() [2/5]

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

◆ BaseIVFAB() [3/5]

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

◆ ~BaseIVFAB()

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

◆ BaseIVFAB() [4/5]

template<class T>
BaseIVFAB< T >::BaseIVFAB ( const Box a_region,
int  a_nVar 
)
inline

invalid but necessary for leveldata to compile

◆ BaseIVFAB() [5/5]

template<class T>
BaseIVFAB< T >::BaseIVFAB ( const BaseIVFAB< T > &  a_input)
inlineprivate

Member Function Documentation

◆ numDataTypes()

template<class T>
int BaseIVFAB< T >::numDataTypes ( ) const
inline

◆ dataType()

template<class T>
int BaseIVFAB< T >::dataType ( const BaseIndex a_baseInd) const
inline

◆ dataPtr() [1/4]

template<class T>
T* BaseIVFAB< T >::dataPtr ( int  a_dataType,
int  a_ivar 
)
inline

◆ dataPtr() [2/4]

template<class T>
const T* BaseIVFAB< T >::dataPtr ( int  a_dataType,
int  a_ivar 
) const
inline

◆ define()

template<class T >
void BaseIVFAB< 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 in MiniIVFAB< T >, and MiniIVFAB< Real >.

Referenced by BaseIVFAB< Real >::dataPtr().

◆ setVal() [1/3]

template<class T>
void BaseIVFAB< T >::setVal ( const T &  value)
inline

Set a value at every data location.

Referenced by BaseIVFAB< Real >::dataPtr().

◆ setVal() [2/3]

template<class T>
void BaseIVFAB< T >::setVal ( int  ivar,
const T &  value 
)
inline

Set a value at every data location.

◆ setVal() [3/3]

template<class T>
void BaseIVFAB< T >::setVal ( const T &  a_value,
const Box a_box,
int  a_nstart,
int  a_numcomp 
)
inline

Set a value at every data location within a_box

◆ copy()

template<class T>
void BaseIVFAB< T >::copy ( const Box a_fromBox,
const Interval a_destInterval,
const Box a_toBox,
const BaseIVFAB< T > &  a_src,
const Interval a_srcInterval 
)
inline

◆ preAllocatable()

template<class T>
static int BaseIVFAB< T >::preAllocatable ( )
inlinestatic

This stuff required by LevelData in parallel:

◆ size()

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

◆ linearOut()

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

◆ linearIn()

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

◆ clear()

template<class T >
void BaseIVFAB< T >::clear ( )
inlinevirtual

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

Reimplemented in MiniIVFAB< T >, and MiniIVFAB< Real >.

Referenced by MiniIVFAB< Real >::clear(), and BaseIVFAB< Real >::preAllocatable().

◆ isDefined()

template<class T >
bool BaseIVFAB< T >::isDefined ( ) const
inline

Tells whether this BaseIVFAB has been defined, either with a constructor or with { define}. It must be initialized in order to access its data.

Referenced by BaseIVFAB< Real >::copy(), and BaseIVFAB< Real >::preAllocatable().

◆ numVoFs()

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

Return the number of VoFs in this BaseIVFAB.

Referenced by BaseIVFAB< Real >::preAllocatable().

◆ nComp()

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

Return the number of data components of this BaseIVFAB.

Referenced by BaseIVFAB< Real >::preAllocatable().

◆ getIVS()

template<class T >
const IntVectSet & BaseIVFAB< T >::getIVS ( ) const
inline

Return the irregular domain of the BaseIVFAB.

Referenced by BaseIVFAB< Real >::preAllocatable().

◆ getEBGraph()

template<class T >
const EBGraph & BaseIVFAB< T >::getEBGraph ( ) const
inline

◆ operator()() [1/2]

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

Indexing operator. Return a reference to the contents of this IVFAB, at the specified VoF and data component. The first component is zero, the last is {nvar-1}. The returned object is a modifiable lvalue.

Referenced by BaseIVFAB< Real >::preAllocatable().

◆ operator()() [2/2]

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

◆ setVerbose()

template<class T >
void BaseIVFAB< T >::setVerbose ( bool  a_verbose)
static

◆ setVerboseDebug()

template<class T >
void BaseIVFAB< T >::setVerboseDebug ( bool  a_verboseDebug)
static

◆ dataPtr() [3/4]

template<class T >
T * BaseIVFAB< T >::dataPtr ( const int &  a_comp)
inline

◆ dataPtr() [4/4]

template<class T >
const T * BaseIVFAB< T >::dataPtr ( const int &  a_comp) const
inline

◆ getIndex()

template<class T >
T * BaseIVFAB< 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 in MiniIVFAB< T >, and MiniIVFAB< Real >.

Referenced by BaseIVFAB< Real >::BaseIVFAB().

◆ offset()

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

◆ setDefaultValues()

template<class T >
void BaseIVFAB< T >::setDefaultValues ( )
inlineprotectedvirtual

◆ operator=()

template<class T>
void BaseIVFAB< T >::operator= ( const BaseIVFAB< T > &  a_input)
inlineprivate

Member Data Documentation

◆ s_verboseDebug

template<class T>
bool BaseIVFAB< T >::s_verboseDebug = false
static

◆ m_data

template<class T>
Vector<T> BaseIVFAB< T >::m_data
protected

◆ m_nComp

template<class T>
int BaseIVFAB< T >::m_nComp
protected

Referenced by BaseIVFAB< Real >::copy().

◆ m_nVoFs

template<class T>
int BaseIVFAB< T >::m_nVoFs
protected

◆ m_ebgraph

template<class T>
EBGraph BaseIVFAB< T >::m_ebgraph
protected

◆ m_fab

template<class T>
BaseFab<T*> BaseIVFAB< T >::m_fab
protected

◆ m_ivs

template<class T>
IntVectSet BaseIVFAB< T >::m_ivs
protected

Referenced by BaseIVFAB< Real >::copy().

◆ m_isDefined

template<class T>
bool BaseIVFAB< T >::m_isDefined
protected

◆ s_verbose

template<class T>
bool BaseIVFAB< T >::s_verbose = false
staticprotected

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