#include <source/transfer/datamovers/standard/CoarsenSchedule.h>
Public Member Functions | |
CoarsenSchedule (tbox::Pointer< hier::PatchLevel< DIM > > crse_level, tbox::Pointer< hier::PatchLevel< DIM > > fine_level, const tbox::Pointer< xfer::CoarsenClasses< DIM > > coarsen_classes, tbox::Pointer< xfer::CoarsenTransactionFactory< DIM > > transaction_factory, xfer::CoarsenPatchStrategy< DIM > *patch_strategy, bool fill_coarse_data) | |
virtual | ~CoarsenSchedule () |
void | reset (const tbox::Pointer< xfer::CoarsenClasses< DIM > > coarsen_classes) |
void | coarsenData () const |
const tbox::Pointer< xfer::CoarsenClasses< DIM > > & | getEquivalenceClasses () const |
virtual void | printClassData (std::ostream &stream) const |
Static Public Member Functions | |
static void | setScheduleGenerationMethod (const std::string &method) |
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 CoarsenAlgorithm<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 refine schedules, see the CoarsenAlgorithm<DIM> header file.
NOTE: Algorithmic variations are available by calling the static method CoarsenSchedule<DIM>::setScheduleGenerationMethod(), which sets the option for all instances of the class.
SAMRAI::xfer::CoarsenSchedule< DIM >::CoarsenSchedule | ( | tbox::Pointer< hier::PatchLevel< DIM > > | crse_level, | |
tbox::Pointer< hier::PatchLevel< DIM > > | fine_level, | |||
const tbox::Pointer< xfer::CoarsenClasses< DIM > > | coarsen_classes, | |||
tbox::Pointer< xfer::CoarsenTransactionFactory< DIM > > | transaction_factory, | |||
xfer::CoarsenPatchStrategy< 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 CoarsenAlgorithm<DIM> object. For possible variations on data coarsening, see the CoarsenAlgorithm<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().
crse_level | Pointer to coarse (destination) patch level. | |
fine_level | Pointer to fine (source) patch level. | |
coarsen_classes | Pointer to structure containing patch data and operator information. In general, this is constructed by the calling CoarsenAlgorithm<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. |
SAMRAI::xfer::CoarsenSchedule< DIM >::~CoarsenSchedule | ( | ) | [virtual] |
The virtual destructor for the schedule releases all internal storage.
void SAMRAI::xfer::CoarsenSchedule< DIM >::setScheduleGenerationMethod | ( | const std::string & | method | ) | [static] |
Static function to set box intersection algorithm to use during schedule construction for all CoarsenSchedule objects. If this method is not called, the default will be used.
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. |
void SAMRAI::xfer::CoarsenSchedule< DIM >::reset | ( | const tbox::Pointer< xfer::CoarsenClasses< DIM > > | coarsen_classes | ) |
Reset this coarsen schedule to perform data transfers asssociated with coarsen class items in function argument. In general, this function is called by a CoarsenAlgorithm<DIM> object.
coarsen_classes | Pointer to structure containing patch data and operator information. In general, this is constructed by the calling CoarsenAlgorithm<DIM> object. This pointer must be non-null. |
void SAMRAI::xfer::CoarsenSchedule< DIM >::coarsenData | ( | ) | const |
Execute the stored communication schedule and perform the data movement.
const tbox::Pointer< xfer::CoarsenClasses< DIM > > & SAMRAI::xfer::CoarsenSchedule< DIM >::getEquivalenceClasses | ( | ) | const |
Return const reference to the pointer to coarsen equivalence classes used in schedule.
void SAMRAI::xfer::CoarsenSchedule< DIM >::printClassData | ( | std::ostream & | stream | ) | const [virtual] |
Print the coarsen schedule state to the specified data stream.
stream | Output data stream. |