SAMRAI::xfer::CoarsenCopyTransaction< DIM > Class Template Reference

Class CoarsenCopyTransaction<DIM> represents a single copy communication transaction between two processors or a local data copy for coaren schedules. Note that to there is an implicit hand-shaking between objects of this class and the CoarsenSchedule<DIM> object that constructs them. Following the coarsen schedule implementation, the source patch data index for a copy transaction always refers to the source data, and the destination patch data index for a copy transaction is always the destination data, all as defined in the CoarsenClasses<DIM> class. More...

#include <source/transfer/datamovers/standard/CoarsenCopyTransaction.h>

Inheritance diagram for SAMRAI::xfer::CoarsenCopyTransaction< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CoarsenCopyTransaction (tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::PatchLevel< DIM > > src_level, tbox::Pointer< hier::BoxOverlap< DIM > > overlap, int dst_patch, int src_patch, int coarsen_item_id)
virtual ~CoarsenCopyTransaction ()
virtual bool canEstimateIncomingMessageSize ()
virtual int computeIncomingMessageSize ()
virtual int computeOutgoingMessageSize ()
virtual int getSourceProcessor ()
virtual int getDestinationProcessor ()
virtual void packStream (tbox::AbstractStream &stream)
virtual void unpackStream (tbox::AbstractStream &stream)
virtual void copyLocalData ()
virtual void printClassData (std::ostream &stream) const

Static Public Member Functions

static void setCoarsenItems (const typename CoarsenClasses< DIM >::Data **coarsen_items, int num_coarsen_items)
static void unsetCoarsenItems ()

Detailed Description

template<int DIM>
class SAMRAI::xfer::CoarsenCopyTransaction< DIM >

Class CoarsenCopyTransaction<DIM> represents a single copy communication transaction between two processors or a local data copy for coaren schedules. Note that to there is an implicit hand-shaking between objects of this class and the CoarsenSchedule<DIM> object that constructs them. Following the coarsen schedule implementation, the source patch data index for a copy transaction always refers to the source data, and the destination patch data index for a copy transaction is always the destination data, all as defined in the CoarsenClasses<DIM> class.

See also:
xfer::CoarsenSchedule

xfer::CoarsenClasses

tbox::Schedule

tbox::Transaction


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::xfer::CoarsenCopyTransaction< DIM >::CoarsenCopyTransaction ( tbox::Pointer< hier::PatchLevel< DIM > >  dst_level,
tbox::Pointer< hier::PatchLevel< DIM > >  src_level,
tbox::Pointer< hier::BoxOverlap< DIM > >  overlap,
int  dst_patch,
int  src_patch,
int  coarsen_item_id 
)

Construct a transaction with the specified source and destination levels, patches, and patch data components found in the coarsen class item with the given id owned by the calling coarsen schedule. In general, this constructor is called by a CoarsenSchedule<DIM> object for each data transaction (not involving time interpolation) that must occur. This transaction will be responsible for one of the following: (1) a local data copy, (2) packing a message stream with source patch data, or (3) unpacking destination patch data from a message stream.

Parameters:
dst_level tbox::Pointer to destination patch level.
src_level tbox::Pointer to source patch level.
overlap tbox::Pointer to overlap region between patches.
dst_patch Integer index of destination patch in destination patch level.
src_patch Integer index of source patch in source patch level.
coarsen_item_id Integer id of coarsen data item owned by coarsen schedule.
When assertion checking is active, an assertion will result if any of the pointer arguments is null, or if any of the integer arguments are invalid (i.e., < 0);

template<int DIM>
SAMRAI::xfer::CoarsenCopyTransaction< DIM >::~CoarsenCopyTransaction (  )  [virtual]

The virtual destructor for the copy transaction releases all memory associated with the transaction.


Member Function Documentation

template<int DIM>
void SAMRAI::xfer::CoarsenCopyTransaction< DIM >::setCoarsenItems ( const typename CoarsenClasses< DIM >::Data **  coarsen_items,
int  num_coarsen_items 
) [static]

Static member function to set the array of coarsen class data items that is shared by all object instances of this copy transaction class during data transfers. The array must be set before any transactions are executed. The array is set in the CoarsenSchedule<DIM> class.

template<int DIM>
void SAMRAI::xfer::CoarsenCopyTransaction< DIM >::unsetCoarsenItems (  )  [static]

Static member function to unset the array of coarsen class data items that is shared by all object instances of this copy transaction class during data transfers. The unset function is used to prevent erroneous execution of different schedules. The array is unset in the CoarsenSchedule<DIM> class.

template<int DIM>
bool SAMRAI::xfer::CoarsenCopyTransaction< DIM >::canEstimateIncomingMessageSize (  )  [virtual]

Return a boolean indicating whether this transaction can estimate the size of an incoming message. If this is false, then a different communication protocol kicks in and the message size is transmitted between nodes.

Implements SAMRAI::tbox::Transaction.

template<int DIM>
int SAMRAI::xfer::CoarsenCopyTransaction< DIM >::computeIncomingMessageSize (  )  [virtual]

Return the integer buffer space (in bytes) needed for the incoming message. This routine is only called if the transaction can estimate the size of the incoming message. See canEstimateIncomingMessageSize().

Implements SAMRAI::tbox::Transaction.

template<int DIM>
int SAMRAI::xfer::CoarsenCopyTransaction< DIM >::computeOutgoingMessageSize (  )  [virtual]

Return the integer buffer space (in bytes) needed for the outgoing message.

Implements SAMRAI::tbox::Transaction.

template<int DIM>
int SAMRAI::xfer::CoarsenCopyTransaction< DIM >::getSourceProcessor (  )  [virtual]

Return the sending processor number for the communications transaction.

Implements SAMRAI::tbox::Transaction.

template<int DIM>
int SAMRAI::xfer::CoarsenCopyTransaction< DIM >::getDestinationProcessor (  )  [virtual]

Return the receiving processor number for the communications transaction.

Implements SAMRAI::tbox::Transaction.

template<int DIM>
void SAMRAI::xfer::CoarsenCopyTransaction< DIM >::packStream ( tbox::AbstractStream stream  )  [virtual]

Pack the transaction data into the message stream.

Implements SAMRAI::tbox::Transaction.

template<int DIM>
void SAMRAI::xfer::CoarsenCopyTransaction< DIM >::unpackStream ( tbox::AbstractStream stream  )  [virtual]

Unpack the transaction data from the message stream.

Implements SAMRAI::tbox::Transaction.

template<int DIM>
void SAMRAI::xfer::CoarsenCopyTransaction< DIM >::copyLocalData (  )  [virtual]

Perform the local data copy for the transaction.

Implements SAMRAI::tbox::Transaction.

template<int DIM>
void SAMRAI::xfer::CoarsenCopyTransaction< DIM >::printClassData ( std::ostream &  stream  )  const [virtual]

Print out transaction information.

Implements SAMRAI::tbox::Transaction.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:29:10 2009 for SAMRAI by  doxygen 1.5.1