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

Class LocallyActiveDataCoarsenSchedule<DIM> performs the communication operations that coarsen locally-active data from a finer level to a coarser level. More...

#include <source/transfer/datamovers/locally_active/LocallyActiveDataCoarsenSchedule.h>

List of all members.

Public Member Functions

 LocallyActiveDataCoarsenSchedule (tbox::Pointer< hier::PatchLevel< DIM > > crse_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > crse_level_mgr, tbox::Pointer< hier::PatchLevel< DIM > > fine_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > fine_level_mgr, tbox::Pointer< xfer::CoarsenClasses< DIM > > coarsen_classes, tbox::Pointer< xfer::LocallyActiveDataCoarsenTransactionFactory< DIM > > transaction_factory, xfer::LocallyActiveDataCoarsenPatchStrategy< DIM > *patch_strategy, bool fill_coarse_data)
virtual ~LocallyActiveDataCoarsenSchedule ()
void coarsenData () const
virtual void printClassData (std::ostream &stream) const

Static Public Member Functions

static void setScheduleGenerationMethod (const std::string &method)


Detailed Description

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

Class LocallyActiveDataCoarsenSchedule<DIM> performs the communication operations that coarsen locally-active data from a finer level to a coarser level.

Typically, data is coarsened from the interiors of source patch components on the source patch level into interiors of destination patch components on the destination level. However, variations are possible for special situations; see the LocallyActiveDataCoarsenAlgorithm<DIM> class header for more information. Generally, the source patch data must contain sufficient ghost cells to satisfy the coarsening operators involved. If a coarsen operator has a non-zero ghost cell width, then the source ghost cells must be filled before the coarsen schedule is executed. The communication schedule is executed by calling member function coarsenData().

Each schedule object is typically created by a coarsen algorithm and represents communication dependencies for a particular configuration of the AMR hierarchy. The communication schedule is only valid for that particular configuration and must be regenerated when the AMR patch hierarchy changes. However, as long as the patch levels involved in the creation of the schedule remain unchanged, the schedule may be used for multiple communication cycles. For more information about creating coarsen schedules, see the LocallyActiveDataCoarsenAlgorithm<DIM> header file.

NOTE: Algorithmic variations are available by calling the static method LocallyActiveCoarsenSchedule<DIM>::setScheduleGenerationMethod(), which sets the option for all instances of the class.

See also:
xfer::LocallyActiveDataCoarsenAlgorithm

xfer::LocallyActiveDataCoarsenPatchStrategy

xfer::CoarsenClasses


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::xfer::LocallyActiveDataCoarsenSchedule< DIM >::LocallyActiveDataCoarsenSchedule ( tbox::Pointer< hier::PatchLevel< DIM > >  crse_level,
tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > >  crse_level_mgr,
tbox::Pointer< hier::PatchLevel< DIM > >  fine_level,
tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > >  fine_level_mgr,
tbox::Pointer< xfer::CoarsenClasses< DIM > >  coarsen_classes,
tbox::Pointer< xfer::LocallyActiveDataCoarsenTransactionFactory< DIM > >  transaction_factory,
xfer::LocallyActiveDataCoarsenPatchStrategy< DIM > *  patch_strategy,
bool  fill_coarse_data 
)

Constructor to create a coarsen schedule that coarsens data from source patch data components on the fine level into the destination patch data components on the coarse level. In general, this constructor is called by a LocallyActiveDataCoarsenAlgorithm<DIM> object. For possible variations on data coarsening, see the LocallyActiveDataCoarsenAlgorithm<DIM> class header information.

If the coarsening operators require data from ghost cells, then the associated source patch data components must have a sufficient ghost cell width and and they must be filled with valid data before calling coarsenData().

Parameters:
crse_level Pointer to coarse (destination) patch level; cannot be null.
crse_level_mgr Pointer to coarse level data manager; cannot be null.
fine_level Pointer to fine (source) patch level; cannot be null.
fine_level_mgr Pointer to fine level data manager; cannot be null.
coarsen_classes Pointer to structure containing patch data and operator information. In general, this is constructed by the calling LocallyActiveDataCoarsenAlgorithm<DIM> object.
transaction_factory Pointer to a factory object that will create data transactions.
patch_strategy Pointer to a coarsen patch strategy object that provides user-defined coarsen operations. This ponter may be null, in which case no user-defined coarsen operations will be performed.
fill_coarse_data Boolean indicating whether coarse data should be filled before coarsening operations are done.
When assertion checking is active, unrecoverable assertions will result if either patch level pointer, or the refine classes pointer, is null.

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

The virtual destructor for the schedule releases all internal storage.


Member Function Documentation

template<int DIM>
void SAMRAI::xfer::LocallyActiveDataCoarsenSchedule< DIM >::setScheduleGenerationMethod ( const std::string &  method  )  [static]

Static function to set box intersection algorithm to use during schedule construction for all xfer::LocallyActiveDataCoarsenSchedule<DIM> objects. If this method is not called, the default will be used.

Parameters:
method string identifying box intersection method. Valid choices are: "BOX_TREE" (default case), "BOX_GRAPH", and "ORIG_NSQUARED". More details can be found below in the comments for the generateSchedule() routine.
If an invalid string is passed, an unrecoverable error will result.

template<int DIM>
void SAMRAI::xfer::LocallyActiveDataCoarsenSchedule< DIM >::coarsenData (  )  const

Execute the stored communication schedule and perform the data movement.

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

Print the coarsen schedule state to the specified data stream.

Parameters:
stream Output data stream.


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