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

Data on a BoxLayout. More...

#include <BoxLayoutData.H>

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

Public Member Functions

 BoxLayoutData ()
 
virtual ~BoxLayoutData ()
 
 BoxLayoutData (const BoxLayout &boxes, int comps, const DataFactory< T > &factory=DefaultDataFactory< T >())
 
virtual void define (const BoxLayout &boxes, int comps, const DataFactory< T > &factory=DefaultDataFactory< T >())
 
virtual void define (const BoxLayoutData< T > &da, const DataFactory< T > &factory=DefaultDataFactory< T >())
 
virtual void define (const BoxLayoutData< T > &da, const Interval &comps, const DataFactory< T > &factory=DefaultDataFactory< T >())
 
virtual void define (const BoxLayout &boxes)
 overridden and throws an error. More...
 
virtual bool threadSafe () const
 
int nComp () const
 
Interval interval () const
 
void generalCopyTo (const BoxLayout &a_destGrids, LayoutData< Vector< RefCountedPtr< T > > > &a_dest, const Interval &a_interval, const ProblemDomain &a_domain, const DataFactory< T > &factory=DefaultDataFactory< T >()) const
 General data copying operation. More...
 
void generalCopyTo (const BoxLayout &a_destGrids, LayoutData< Vector< RefCountedPtr< T > > > &a_dest, const Interval &a_interval, const ProblemDomain &a_domain, const Copier &a_copier, const DataFactory< T > &factory=DefaultDataFactory< T >()) const
 
void addTo (const Interval &a_srcComps, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const ProblemDomain &a_domain) const
 
void addTo (const Interval &a_srcComps, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const ProblemDomain &a_domain, const Copier &a_copier) const
 
virtual void apply (void(*a_Function)(const Box &box, int comps, T &t))
 
virtual bool isDefined () const
 
virtual void clear ()
 
- Public Member Functions inherited from LayoutData< T >
 LayoutData ()
 
 LayoutData (const BoxLayout &a_dp)
 
virtual ~LayoutData ()
 
DataIterator dataIterator () const
 
TimedDataIterator timedDataIterator () const
 
const T & operator[] (const DataIndex &a_index) const
 const accessor function More...
 
const T & operator[] (const DataIterator &a_iterator) const
 const accessor function More...
 
T & operator[] (const DataIndex &a_index)
 non-const accessor function More...
 
T & operator[] (const DataIterator &a_iterator)
 non-const accessor function More...
 
Box box (const DataIndex &a_index) const
 
Box box (const DataIterator &a_iterator) const
 
const BoxLayoutboxLayout () const
 

Static Public Attributes

static int s_verbosity = 0
 

Protected Member Functions

void setVector (const BoxLayoutData< T > &da, const Interval &srcComps, const Interval &destComps)
 
void allocateGhostVector (const DataFactory< T > &factory, const IntVect &ghost=IntVect::Zero)
 
void makeItSo (const Interval &a_srcComps, const BoxLayoutData< T > &a_src, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op=LDOperator< T >()) const
 
void makeItSoBegin (const Interval &a_srcComps, const BoxLayoutData< T > &a_src, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op=LDOperator< T >()) const
 
void makeItSoLocalCopy (const Interval &a_srcComps, const BoxLayoutData< T > &a_src, BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op=LDOperator< T >()) const
 
void makeItSoEnd (BoxLayoutData< T > &a_dest, const Interval &a_destComps, const LDOperator< T > &a_op=LDOperator< T >()) const
 
void completePendingSends () const
 
void allocateBuffers (const BoxLayoutData< T > &a_src, const Interval &a_srcComps, const BoxLayoutData< T > &a_dest, const Interval &a_destComps, const Copier &a_copier, const LDOperator< T > &a_op) const
 
void writeSendDataFromMeIntoBuffers (const BoxLayoutData< T > &a_src, const Interval &a_srcComps, const LDOperator< T > &a_op) const
 
void postSendsFromMe () const
 
void postReceivesToMe () const
 
void unpackReceivesToMe (BoxLayoutData< T > &a_dest, const Interval &a_destComps, const LDOperator< T > &a_op) const
 
void unpackReceivesToMe_append (LayoutData< Vector< RefCountedPtr< T > > > &a_dest, const Interval &a_destComps, int ncomp, const DataFactory< T > &factory, const LDOperator< T > &a_op) const
 

Protected Attributes

int m_comps
 
bool m_threadSafe
 
bool m_isdefined
 
Parallel messaging members
CopierBufferm_buff
 
- Protected Attributes inherited from LayoutData< T >
BoxLayout m_boxLayout
 
Vector< T * > m_vector
 
bool m_callDelete
 

Friends

class LevelData< T >
 

Detailed Description

template<class T>
class BoxLayoutData< T >

Data on a BoxLayout.

A collection of Box-oriented objects. The arrangement of Boxes is given by the underlying BoxLayout object. BoxLayoutData attempt to prevent users from manipulating the template class T to become out of sync with the boxes in the BoxLayout. Caveat emptor.

All access to the data in a BoxLayoutData is forced to be data-parallel, by use of the DataIterator.

class T must provide the following methods:

In sequential codes, many of these functions will not be called, but in the general parallel case, they all will be.

Constructor & Destructor Documentation

◆ BoxLayoutData() [1/2]

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

◆ ~BoxLayoutData()

template<class T >
BoxLayoutData< T >::~BoxLayoutData ( )
virtual

◆ BoxLayoutData() [2/2]

template<class T>
BoxLayoutData< T >::BoxLayoutData ( const BoxLayout boxes,
int  comps,
const DataFactory< T > &  factory = DefaultDataFactory<T>() 
)
inline

Member Function Documentation

◆ define() [1/4]

template<class T>
void BoxLayoutData< T >::define ( const BoxLayout boxes,
int  comps,
const DataFactory< T > &  factory = DefaultDataFactory<T>() 
)
inlinevirtual

◆ define() [2/4]

template<class T>
void BoxLayoutData< T >::define ( const BoxLayoutData< T > &  da,
const DataFactory< T > &  factory = DefaultDataFactory<T>() 
)
inlinevirtual

◆ define() [3/4]

template<class T>
void BoxLayoutData< T >::define ( const BoxLayoutData< T > &  da,
const Interval comps,
const DataFactory< T > &  factory = DefaultDataFactory<T>() 
)
inlinevirtual

◆ define() [4/4]

template<class T>
void BoxLayoutData< T >::define ( const BoxLayout boxes)
inlinevirtual

◆ threadSafe()

template<class T>
virtual bool BoxLayoutData< T >::threadSafe ( ) const
inlinevirtual

◆ nComp()

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

◆ interval()

template<class T>
Interval BoxLayoutData< T >::interval ( ) const
inline

◆ generalCopyTo() [1/2]

template<class T>
void BoxLayoutData< T >::generalCopyTo ( const BoxLayout a_destGrids,
LayoutData< Vector< RefCountedPtr< T > > > &  a_dest,
const Interval a_interval,
const ProblemDomain a_domain,
const DataFactory< T > &  factory = DefaultDataFactory<T>() 
) const

General data copying operation.

Parameters
a_destGridsBoxLayout for the destination data holder
a_destreturn argument. upon completion contains a Vector of T objects for each Box in a_destGrids that overlaps this->boxLayout()
a_intervalrange of components to source
a_domainProblemDomain that this grid and a_destGrids reside on.
factoryoptional data factory for template classes that have non-trivial construction

Referenced by BoxLayoutData< BaseFab< int > >::generalCopyTo().

◆ generalCopyTo() [2/2]

template<class T>
void BoxLayoutData< T >::generalCopyTo ( const BoxLayout a_destGrids,
LayoutData< Vector< RefCountedPtr< T > > > &  a_dest,
const Interval a_interval,
const ProblemDomain a_domain,
const Copier a_copier,
const DataFactory< T > &  factory = DefaultDataFactory<T>() 
) const

◆ addTo() [1/2]

template<class T>
void BoxLayoutData< T >::addTo ( const Interval a_srcComps,
BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const ProblemDomain a_domain 
) const

Special version of generalCopyTo that performs increment-on-intersection of the destination instead of replacement

Referenced by BoxLayoutData< BaseFab< int > >::addTo().

◆ addTo() [2/2]

template<class T>
void BoxLayoutData< T >::addTo ( const Interval a_srcComps,
BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const ProblemDomain a_domain,
const Copier a_copier 
) const

Special version of generalCopyTo that performs increment-on-intersection of the destination instead of replacement. This version lets the user send in a pre-built Copier.

◆ apply()

template<class T>
void BoxLayoutData< T >::apply ( void(*)(const Box &box, int comps, T &t)  a_Function)
inlinevirtual

◆ isDefined()

template<class T >
bool BoxLayoutData< T >::isDefined ( ) const
inlinevirtual

◆ clear()

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

◆ setVector()

template<class T>
void BoxLayoutData< T >::setVector ( const BoxLayoutData< T > &  da,
const Interval srcComps,
const Interval destComps 
)
inlineprotected

◆ allocateGhostVector()

template<class T>
void BoxLayoutData< T >::allocateGhostVector ( const DataFactory< T > &  factory,
const IntVect ghost = IntVect::Zero 
)
inlineprotected

◆ makeItSo()

template<class T>
void BoxLayoutData< T >::makeItSo ( const Interval a_srcComps,
const BoxLayoutData< T > &  a_src,
BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const Copier a_copier,
const LDOperator< T > &  a_op = LDOperator<T>() 
) const
protected

◆ makeItSoBegin()

template<class T>
void BoxLayoutData< T >::makeItSoBegin ( const Interval a_srcComps,
const BoxLayoutData< T > &  a_src,
BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const Copier a_copier,
const LDOperator< T > &  a_op = LDOperator<T>() 
) const
protected

◆ makeItSoLocalCopy()

template<class T>
void BoxLayoutData< T >::makeItSoLocalCopy ( const Interval a_srcComps,
const BoxLayoutData< T > &  a_src,
BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const Copier a_copier,
const LDOperator< T > &  a_op = LDOperator<T>() 
) const
protected

◆ makeItSoEnd()

template<class T>
void BoxLayoutData< T >::makeItSoEnd ( BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const LDOperator< T > &  a_op = LDOperator<T>() 
) const
protected

◆ completePendingSends()

template<class T >
void BoxLayoutData< T >::completePendingSends ( ) const
protected

◆ allocateBuffers()

template<class T>
void BoxLayoutData< T >::allocateBuffers ( const BoxLayoutData< T > &  a_src,
const Interval a_srcComps,
const BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const Copier a_copier,
const LDOperator< T > &  a_op 
) const
protected

◆ writeSendDataFromMeIntoBuffers()

template<class T>
void BoxLayoutData< T >::writeSendDataFromMeIntoBuffers ( const BoxLayoutData< T > &  a_src,
const Interval a_srcComps,
const LDOperator< T > &  a_op 
) const
protected

◆ postSendsFromMe()

template<class T >
void BoxLayoutData< T >::postSendsFromMe ( ) const
protected

◆ postReceivesToMe()

template<class T >
void BoxLayoutData< T >::postReceivesToMe ( ) const
protected

◆ unpackReceivesToMe()

template<class T>
void BoxLayoutData< T >::unpackReceivesToMe ( BoxLayoutData< T > &  a_dest,
const Interval a_destComps,
const LDOperator< T > &  a_op 
) const
protected

◆ unpackReceivesToMe_append()

template<class T>
void BoxLayoutData< T >::unpackReceivesToMe_append ( LayoutData< Vector< RefCountedPtr< T > > > &  a_dest,
const Interval a_destComps,
int  ncomp,
const DataFactory< T > &  factory,
const LDOperator< T > &  a_op 
) const
protected

Friends And Related Function Documentation

◆ LevelData< T >

template<class T>
friend class LevelData< T >
friend

Member Data Documentation

◆ s_verbosity

template<class T>
int BoxLayoutData< T >::s_verbosity = 0
static

◆ m_comps

template<class T>
int BoxLayoutData< T >::m_comps
protected

◆ m_threadSafe

template<class T>
bool BoxLayoutData< T >::m_threadSafe
protected

◆ m_isdefined

template<class T>
bool BoxLayoutData< T >::m_isdefined
protected

◆ m_buff

template<class T>
CopierBuffer* BoxLayoutData< T >::m_buff
mutableprotected

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