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

#include <IVSFAB.H>

Public Member Functions

 IVSFAB ()
 
 IVSFAB (const IntVectSet &a_region, const int &a_nvarin)
 
 ~IVSFAB ()
 
void setVal (const T &value)
 
void copy (const Box &a_fromBox, const Interval &a_destInterval, const Box &a_toBox, const IVSFAB< 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 numIvs () const
 
int nComp () const
 
const IntVectSetgetIVS () const
 
T & operator() (const IntVect &a_iv, const int &varlocin)
 
const T & operator() (const IntVect &a_iv, const int &varlocin) const
 
const T * dataPtr (const int &a_comp) const
 
T * dataPtr (const int &a_comp)
 
 IVSFAB (const Box &a_region, int a_nVar)
 invalid but necessary for leveldata to compile More...
 
const int * loVect () const
 
const int * hiVect () const
 
void define (const IntVectSet &a_region, const int &a_nvarin)
 
template<>
int size (const Box &a_region, const Interval &a_comps) const
 
template<>
void linearIn (void *a_buf, const Box &a_region, const Interval &a_comps)
 
template<>
void linearOut (void *a_buf, const Box &a_region, const Interval &a_comps) const
 
template<>
int size (const Box &a_region, const Interval &a_comps) const
 
template<>
void linearOut (void *a_buf, const Box &a_region, const Interval &a_comps) const
 
template<>
void linearIn (void *a_buf, const Box &a_region, const Interval &a_comps)
 

Static Public Member Functions

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

Protected Member Functions

int getIndex (const IntVect &a_iv, const int &a_comp) const
 

Protected Attributes

T * m_dataPtr
 
int m_nComp
 
int m_nIvs
 
IntVect m_loVect
 
IntVect m_hiVect
 
BaseFab< int > m_ivmap
 
IntVectSet m_ivs
 
bool m_isDefined
 

Static Protected Attributes

static bool s_verbose = false
 

Private Member Functions

void clear ()
 
void setDefaultValues ()
 
IVSFAB< T > & operator= (const IVSFAB< T > &)
 
 IVSFAB (const IVSFAB< T > &)
 

Detailed Description

template<class T>
class IVSFAB< T >

IVSFAB is a templated data holder defined at the Ivs of an irregular domain.

Constructor & Destructor Documentation

◆ IVSFAB() [1/4]

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

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

◆ IVSFAB() [2/4]

template<class T >
IVSFAB< T >::IVSFAB ( const IntVectSet a_region,
const int &  a_nvarin 
)
inline

References IVSFAB< T >::define().

◆ ~IVSFAB()

template<class T >
IVSFAB< T >::~IVSFAB ( )
inline

References IVSFAB< T >::clear().

◆ IVSFAB() [3/4]

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

◆ IVSFAB() [4/4]

template<class T>
IVSFAB< T >::IVSFAB ( const IVSFAB< T > &  )
private

Member Function Documentation

◆ setVal()

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

◆ copy()

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

◆ preAllocatable()

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

◆ size() [1/3]

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

◆ linearOut() [1/3]

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

◆ linearIn() [1/3]

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

◆ clear()

template<class T >
void IVSFAB< T >::clear ( )
inlineprivate

◆ isDefined()

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

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

References IVSFAB< T >::m_isDefined.

Referenced by IVSFAB< T >::copy(), IVSFAB< T >::dataPtr(), IVSFAB< T >::getIndex(), IVSFAB< T >::operator()(), IVSFAB< T >::preAllocatable(), and IVSFAB< T >::setVal().

◆ numIvs()

template<class T >
int IVSFAB< T >::numIvs ( ) const
inline

Return the number of Ivs in this IVSFAB.

References IVSFAB< T >::m_nIvs.

Referenced by IVSFAB< T >::preAllocatable().

◆ nComp()

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

Return the number of data components of this IVSFAB.

References IVSFAB< T >::m_nComp.

Referenced by IVSFAB< T >::preAllocatable().

◆ getIVS()

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

Return the irregular domain of the IVSFAB.

Referenced by IVSFAB< T >::preAllocatable().

◆ operator()() [1/2]

template<class T >
T & IVSFAB< T >::operator() ( const IntVect a_iv,
const int &  varlocin 
)
inline

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

References CH_assert, IVSFAB< T >::getIndex(), IVSFAB< T >::isDefined(), IVSFAB< T >::m_dataPtr, and IVSFAB< T >::m_nComp.

Referenced by IVSFAB< T >::preAllocatable().

◆ operator()() [2/2]

template<class T >
const T & IVSFAB< T >::operator() ( const IntVect a_iv,
const int &  varlocin 
) const
inline

◆ dataPtr() [1/2]

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

Return a const pointer to the internal data storage of this IVFAB. \

References CH_assert, IVSFAB< T >::isDefined(), IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_nComp, and IVSFAB< T >::m_nIvs.

Referenced by IVSFAB< T >::preAllocatable().

◆ dataPtr() [2/2]

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

Return a pointer to the internal data storage of this IVFAB.

References CH_assert, IVSFAB< T >::isDefined(), IVSFAB< T >::m_dataPtr, IVSFAB< T >::m_nComp, and IVSFAB< T >::m_nIvs.

◆ loVect()

template<class T >
const int * IVSFAB< T >::loVect ( ) const
inline

Return a fake "lower left corner of the domain" for use with Fortran.

References IntVect::getVect(), and IVSFAB< T >::m_loVect.

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

◆ hiVect()

template<class T >
const int * IVSFAB< T >::hiVect ( ) const
inline

Return a fake "upper right corner of the domain" for use with Fortran.

References IntVect::getVect(), and IVSFAB< T >::m_hiVect.

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

◆ setVerbose()

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

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

◆ define()

template<class T >
void IVSFAB< T >::define ( const IntVectSet a_region,
const int &  a_nvarin 
)
inline

◆ setDefaultValues()

template<class T>
void IVSFAB< T >::setDefaultValues ( )
private

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

◆ getIndex()

template<class T >
int IVSFAB< T >::getIndex ( const IntVect a_iv,
const int &  a_comp 
) const
inlineprotected

◆ operator=()

template<class T>
IVSFAB<T>& IVSFAB< T >::operator= ( const IVSFAB< T > &  )
private

◆ size() [2/3]

template<>
int IVSFAB< Real >::size ( const Box a_region,
const Interval a_comps 
) const
inline

◆ linearIn() [2/3]

template<>
void IVSFAB< Real >::linearIn ( void *  a_buf,
const Box a_region,
const Interval a_comps 
)
inline

◆ linearOut() [2/3]

template<>
void IVSFAB< Real >::linearOut ( void *  a_buf,
const Box a_region,
const Interval a_comps 
) const
inline

◆ size() [3/3]

template<>
int IVSFAB< int >::size ( const Box a_region,
const Interval a_comps 
) const
inline

◆ linearOut() [3/3]

template<>
void IVSFAB< int >::linearOut ( void *  a_buf,
const Box a_region,
const Interval a_comps 
) const
inline

◆ linearIn() [3/3]

template<>
void IVSFAB< int >::linearIn ( void *  a_buf,
const Box a_region,
const Interval a_comps 
)
inline

Member Data Documentation

◆ m_dataPtr

template<class T>
T* IVSFAB< T >::m_dataPtr
protected

◆ m_nComp

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

◆ m_nIvs

template<class T>
int IVSFAB< T >::m_nIvs
protected

◆ m_loVect

template<class T>
IntVect IVSFAB< T >::m_loVect
protected

◆ m_hiVect

template<class T>
IntVect IVSFAB< T >::m_hiVect
protected

◆ m_ivmap

template<class T>
BaseFab<int> IVSFAB< T >::m_ivmap
protected

◆ m_ivs

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

◆ m_isDefined

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

◆ s_verbose

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

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