Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BoxLayoutData< T > Class Template Reference

Data on a BoxLayout. More...

#include <BoxLayoutData.H>

Inheritance diagram for BoxLayoutData< T >:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 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.

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.

virtual void apply (void(*a_Function)(const Box &box, int comps, T &t))
virtual bool isDefined () const

Protected Methods

void setVector (const BoxLayoutData< T > &da, const Interval &srcComps, const Interval &destComps)
void allocateGhostVector (const DataFactory< T > &factory, const IntVect &ghost=IntVect::TheZeroVector())
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 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_isdefined
void * m_sendbuffer
size_t m_sendcapacity
void * m_recbuffer
size_t m_reccapacity

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 maniupulating the template class T to become out of synch 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

template<class T>
BoxLayoutData< T >::BoxLayoutData   [inline]
 

template<class T>
BoxLayoutData< T >::~BoxLayoutData   [virtual]
 

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


Member Function Documentation

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]
 

template<class T>
void BoxLayoutData< T >::allocateGhostVector const DataFactory< T > &    factory,
const IntVect   ghost = IntVect::TheZeroVector()
[inline, protected]
 

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

Reimplemented in LevelData< T >, LevelData< FluxBox >, and LevelData< FArrayBox >.

template<class T>
void BoxLayoutData< T >::completePendingSends   const [protected]
 

template<class T>
void BoxLayoutData< T >::define const BoxLayout   boxes [inline, virtual]
 

overridden and throws an error.

Reimplemented from LayoutData< T >.

Reimplemented in LevelData< T >, LevelData< FluxBox >, and LevelData< FArrayBox >.

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

Define this BoxLayoutData to be the subset of the data in da defined by the Interval comps.

Reimplemented in LevelData< T >, LevelData< FluxBox >, and LevelData< FArrayBox >.

template<class T>
void BoxLayoutData< T >::define const BoxLayoutData< T > &    da,
const DataFactory< T > &    factory = DefaultDataFactory< T >()
[inline, virtual]
 

Reimplemented in LevelData< T >, LevelData< FluxBox >, and LevelData< FArrayBox >.

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

Reimplemented in LevelData< T >, LevelData< FluxBox >, and LevelData< FArrayBox >.

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_destGrids  BoxLayout for the destination data holder
a_dest  return argument. upon completion contains a Vector of T objects for each Box in a_destGrids that overlaps this->boxLayout()
a_interval  range of components to source
a_domain  ProblemDomain that this grid and a_destGrids reside on.
factory  optional data factory for template classes that have non-trivial construction

template<class T>
Interval BoxLayoutData< T >::interval   const [inline]
 

template<class T>
bool BoxLayoutData< T >::isDefined   const [inline, virtual]
 

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]
 

template<class T>
int BoxLayoutData< T >::nComp   const [inline]
 

template<class T>
void BoxLayoutData< T >::postReceivesToMe   const [protected]
 

template<class T>
void BoxLayoutData< T >::postSendsFromMe   const [protected]
 

template<class T>
void BoxLayoutData< T >::setVector const BoxLayoutData< T > &    da,
const Interval   srcComps,
const Interval   destComps
[inline, protected]
 

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

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]
 

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


Friends And Related Function Documentation

template<class T>
friend class LevelData< T > [friend]
 


Member Data Documentation

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

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

template<class T>
void* BoxLayoutData< T >::m_recbuffer [protected]
 

template<class T>
size_t BoxLayoutData< T >::m_reccapacity [protected]
 

template<class T>
void* BoxLayoutData< T >::m_sendbuffer [protected]
 

template<class T>
size_t BoxLayoutData< T >::m_sendcapacity [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Jan 19 17:55:41 2005 for Chombo&INSwithParticles by doxygen1.2.16