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

Class RefineSchedule<DIM> performs the communication operations that refine data to, copy data to, or fill physical boundary data on a destination patch level. More...

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

List of all members.

Public Member Functions

 RefineSchedule (const std::string &fill_pattern, tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::PatchLevel< DIM > > src_level, const tbox::Pointer< xfer::RefineClasses< DIM > > refine_classes, tbox::Pointer< xfer::RefineTransactionFactory< DIM > > transaction_factory, xfer::RefinePatchStrategy< DIM > *patch_strategy, bool use_time_interpolation=false)
 Constructor to create a refine schedule that moves data from the interiors of source patch data components on the source level into the interiors and ghost cells of destination patch data components on the destination level.
 RefineSchedule (const std::string &fill_pattern, tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::PatchLevel< DIM > > src_level, int next_coarser_level, tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const tbox::Pointer< xfer::RefineClasses< DIM > > refine_classes, tbox::Pointer< xfer::RefineTransactionFactory< DIM > > transaction_factory, xfer::RefinePatchStrategy< DIM > *patch_strategy, bool use_time_interpolation=false)
 Constructor to create a refine schedule that moves data from the interiors of source patch data components on the source level and coarser levels in the patch hierarchy into the interiors and ghost cells of destination patch data components on the destination level.
virtual ~RefineSchedule ()
void reset (const tbox::Pointer< xfer::RefineClasses< DIM > > refine_classes)
 Reset this refine schedule to perform data transfers asssociated with refine class items in function argument.
void fillData (double fill_time, bool do_physical_boundary_fill=true) const
 Execute the stored communication schedule and perform the data movement.
void initializeSourceVector (hier::ComponentSelector &allocate_vector) const
 Initialize a component selector to store the components needed to allocate source data.
void allocateDestinationSpace (double fill_time, hier::ComponentSelector &allocate_vector) const
 Allocate destination space on the destination level and return the allocated patch data indices in the component selector for later deallocation.
void allocateScratchSpace (tbox::Pointer< hier::PatchLevel< DIM > > level, double fill_time, hier::ComponentSelector &allocate_vector) const
 Allocate scratch space on the specified level and return the allocated patch data indices in the component selector for later deallocation.
void initializeDestinationVector (hier::ComponentSelector &allocate_vector) const
const tbox::Pointer< RefineClasses<
DIM > > & 
getEquivalenceClasses () const
 Return const reference to the pointer to refine equivalence classes used in schedule.
const hier::IntVector< DIM > & getBoundaryFillGhostWidth () 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::RefineSchedule< DIM >

Class RefineSchedule<DIM> performs the communication operations that refine data to, copy data to, or fill physical boundary data on a destination patch level.

Source data is copied into the provided scratch space for temporary processing. The scratch space must contain sufficient ghost cells to accommodate the stencil width of the given interpolation operators and any physical boundary data that must be filled. The scratch data is copied into the destination space at the end of the process. The communication schedule is executed by calling member function fillData().

Each schedule object is typically created by a refine algorithm and represents the 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 RefineAlgorithm<DIM> header file.

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

Some constructors accept the argument fill_pattern. This string controls which types of cells are filled and which are omitted from the filling process. Valid values are:

See also:
xfer::RefineAlgorithm

xfer::RefinePatchStrategy

xfer::RefineClasses


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::xfer::RefineSchedule< DIM >::RefineSchedule ( const std::string &  fill_pattern,
tbox::Pointer< hier::PatchLevel< DIM > >  dst_level,
tbox::Pointer< hier::PatchLevel< DIM > >  src_level,
const tbox::Pointer< xfer::RefineClasses< DIM > >  refine_classes,
tbox::Pointer< xfer::RefineTransactionFactory< DIM > >  transaction_factory,
xfer::RefinePatchStrategy< DIM > *  patch_strategy,
bool  use_time_interpolation = false 
)

Constructor to create a refine schedule that moves data from the interiors of source patch data components on the source level into the interiors and ghost cells of destination patch data components on the destination level.

Only data on the intersection of the source and destination patch components will be copied. The source and destination patch levels must reside in the same index space. However, the levels do not have to be in the same AMR patch hierarchy. Generally, this constructor is called by a RefineAlgorithm<DIM> object.

Parameters:
fill_pattern Indicates which parts of the destination level to fill. See RefineSchedule for valid values.
dst_level Pointer to destination patch level.
src_level Pointer to source patch level.
refine_classes Pointer to structure containing patch data and operator information. In general, this is constructed by the calling RefineAlgorithm<DIM> object.
transaction_factory Pointer to a factory object that will create data transactions.
patch_strategy Pointer to a refine patch strategy object that provides user-defined physical boundary filling operations. This pointer may be null, in which case no boundary filling operations will occur.
use_time_interpolation Optional boolean flag indicating whether to use time interpolation when setting data on the destination level. Default is no time interpolation.
When assertion checking is active, unrecoverable assertions will result if either patch level pointer, the refine classes pointer, or the transaction factory pointer, is null.

template<int DIM>
SAMRAI::xfer::RefineSchedule< DIM >::RefineSchedule ( const std::string &  fill_pattern,
tbox::Pointer< hier::PatchLevel< DIM > >  dst_level,
tbox::Pointer< hier::PatchLevel< DIM > >  src_level,
int  next_coarser_level,
tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy,
const tbox::Pointer< xfer::RefineClasses< DIM > >  refine_classes,
tbox::Pointer< xfer::RefineTransactionFactory< DIM > >  transaction_factory,
xfer::RefinePatchStrategy< DIM > *  patch_strategy,
bool  use_time_interpolation = false 
)

Constructor to create a refine schedule that moves data from the interiors of source patch data components on the source level and coarser levels in the patch hierarchy into the interiors and ghost cells of destination patch data components on the destination level.

Only data on the intersection of the source and destination patch components will be copied. If portions of the destination level remain unfilled, then the algorithm recursively fills those unfilled portions from coarser levels in the AMR hierarchy. The source and destination patch levels must reside in the same index space. However, the levels do not have to be in the same AMR patch hierarchy. In general, this constructor is called by a RefineAlgorithm<DIM> object.

Parameters:
fill_pattern Indicates which parts of the destination level to fill. See RefineSchedule for valid values.
dst_level Pointer to destination patch level.
src_level Pointer to source patch level; must be in same index space as destination level. This pointer may be null, in which case the destination level will be filled only using data interpolated from coarser levels in the AMR hierarchy.
next_coarser_level Integer number of next coarser level in AMR patch hierarchy relative to the destination level. Note that when the destination level has number zero (i.e., the coarsest level), this value should be < 0.
hierarchy Pointer to patch hierarchy. This pointer may be null only if the next_coarser_level value is < 0, indicating that there is no level in the hierarchy coarser than the destination level.
refine_classes Pointer to structure containing patch data and operator information. In general, this is constructed by the calling RefineAlgorithm<DIM> object.
transaction_factory Pointer to a factory object that will create data transactions.
patch_strategy Pointer to a refine patch strategy object that provides user-defined physical boundary filling operations. This pinter may be null, in which case no boundary filling or user-defined refine operations will occur.
use_time_interpolation Optional boolean flag indicating whether to use time interpolation when setting data on the destination level. Default is no time interpolation.
When assertion checking is active, unrecoverable assertions will result if either patch level pointer, the refine classes pointer, or the transaction factory pointer, is null.

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

Virtual destructor for the schedule releases all internal storage.


Member Function Documentation

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

Static function to set box intersection algorithm to use during schedule construction for all RefineSchedule 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::RefineSchedule< DIM >::reset ( const tbox::Pointer< xfer::RefineClasses< DIM > >  refine_classes  ) 

Reset this refine schedule to perform data transfers asssociated with refine class items in function argument.

In general, this function is called by a RefineAlgorithm<DIM> object.

Parameters:
refine_classes Pointer to structure containing patch data and operator information. In general, this is constructed by the calling RefineAlgorithm<DIM> object. This pointer must be non-null.

template<int DIM>
void SAMRAI::xfer::RefineSchedule< DIM >::fillData ( double  fill_time,
bool  do_physical_boundary_fill = true 
) const

Execute the stored communication schedule and perform the data movement.

Parameters:
fill_time Double time for filling operation.
do_physical_boundary_fill Boolean flag used to bypass the physical boundary data filling operations on the destination level. The default value is true indicating that boundary data will be filled (assuming a non-null refine patch strategy pointer was passed to the createSchedule() function. Note that even when the value is false, boundary routines may be called on levels coarser than the destination level if such data is needed for proper interpolation.

template<int DIM>
void SAMRAI::xfer::RefineSchedule< DIM >::initializeSourceVector ( hier::ComponentSelector allocate_vector  )  const

Initialize a component selector to store the components needed to allocate source data.

Parameters:
allocate_vector An empty hier::ComponentSelector that will be set to contain the patch data indices for source data.

template<int DIM>
void SAMRAI::xfer::RefineSchedule< DIM >::allocateDestinationSpace ( double  fill_time,
hier::ComponentSelector allocate_vector 
) const

Allocate destination space on the destination level and return the allocated patch data indices in the component selector for later deallocation.

Parameters:
fill_time Double time for filling operation.
allocate_vector Component selector that will store the allocated patch data indices.

template<int DIM>
void SAMRAI::xfer::RefineSchedule< DIM >::allocateScratchSpace ( tbox::Pointer< hier::PatchLevel< DIM > >  level,
double  fill_time,
hier::ComponentSelector allocate_vector 
) const

Allocate scratch space on the specified level and return the allocated patch data indices in the component selector for later deallocation.

template<int DIM>
void SAMRAI::xfer::RefineSchedule< DIM >::initializeDestinationVector ( hier::ComponentSelector allocate_vector  )  const

Initialize a component selector to store the components needed to allocate source data.

Parameters:
allocate_vector An empty hier_ComponentSelector that will be set to contain the patch data indices for destination data.

template<int DIM>
const tbox::Pointer< xfer::RefineClasses< DIM > > & SAMRAI::xfer::RefineSchedule< DIM >::getEquivalenceClasses (  )  const

Return const reference to the pointer to refine equivalence classes used in schedule.

template<int DIM>
const hier::IntVector< DIM > & SAMRAI::xfer::RefineSchedule< DIM >::getBoundaryFillGhostWidth (  )  const

Return width of ghost cell region to fill which is passed to user supplied physical boundary condition routine.

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

Print the refine schedule data 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:11 2009 for SAMRAI by  doxygen 1.5.1