Class LocallyActiveDataRefineSchedule<DIM> performs the communication operations that refine data to, copy data to, or fill physical boundary data on a destination patch level, where the data may be defined only on some patches (i.e., the patch data is "locally-active"). This class is based on the RefineSchedule<DIM> class. However, it has a reduced set of functionality since it treats locally-active data. For example, this class does not support time interpolation, and there is only one version of the constructor (vs. three for RefineSchedule<DIM>), the schedule cannot be reset, etc.
More...
|
| | LocallyActiveDataRefineSchedule (tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > dst_level_mgr, tbox::Pointer< hier::PatchLevel< DIM > > src_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > src_level_mgr, const tbox::Pointer< xfer::RefineClasses< DIM > > refine_classes, tbox::Pointer< xfer::LocallyActiveDataRefineTransactionFactory< DIM > > transaction_factory, xfer::LocallyActiveDataRefinePatchStrategy< 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. More...
|
| |
| | LocallyActiveDataRefineSchedule (tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > dst_level_mgr, tbox::Pointer< hier::PatchLevel< DIM > > src_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > src_level_mgr, int next_coarser_level, tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const tbox::Pointer< xfer::RefineClasses< DIM > > refine_classes, tbox::Pointer< xfer::LocallyActiveDataRefineTransactionFactory< DIM > > transaction_factory, xfer::LocallyActiveDataRefinePatchStrategy< 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. More...
|
| |
| virtual | ~LocallyActiveDataRefineSchedule () |
| |
| void | fillData (double fill_time, bool do_physical_boundary_fill=true) const |
| | Execute the stored communication schedule and perform the data movement. More...
|
| |
| virtual void | printClassData (std::ostream &stream) const |
| |
|
| | LocallyActiveDataRefineSchedule (const LocallyActiveDataRefineSchedule &) |
| |
| void | operator= (const LocallyActiveDataRefineSchedule &) |
| |
| | LocallyActiveDataRefineSchedule (tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > dst_level_mgr, tbox::Pointer< hier::PatchLevel< DIM > > src_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > src_level_mgr, int next_coarser_level, tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const tbox::Pointer< xfer::RefineClasses< DIM > > refine_classes, tbox::Pointer< xfer::LocallyActiveDataRefineTransactionFactory< DIM > > transaction_factory, const tbox::Array< xfer::LocallyActiveDataFillBoxSet< DIM > > &la_fill_boxes, xfer::LocallyActiveDataRefinePatchStrategy< DIM > *patch_strategy) |
| | This private constructor creates a communication schedule that fills the destination level on the specified fill boxes only. More...
|
| |
| void | finishScheduleConstruction (tbox::Pointer< hier::PatchLevel< DIM > > src_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > src_level_mgr, int next_coarser_level, tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, const tbox::Array< xfer::LocallyActiveDataFillBoxSet< DIM > > &la_fill_boxes, bool use_time_interpolation) |
| | Finish the schedule construction by recursing to coarser levels as needed. More...
|
| |
| void | recursiveFill (double fill_time, bool do_physical_boundary_fill) const |
| | Recursively fill the destination level with data at the given time. More...
|
| |
| void | fillPhysicalBoundaries (tbox::Pointer< hier::PatchLevel< DIM > > level, double fill_time) const |
| | Fill the physical boundaries for each patch on the specified patch level. More...
|
| |
| void | allocateScratchSpace (tbox::Pointer< hier::PatchLevel< DIM > > level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > level_mgr, double fill_time, hier::LocallyActiveDataPatchLevelManager< DIM > &allocate_mgr) const |
| | Allocate scratch space on the specified level and return the allocated patch data indices in the allocate manager for later deallocation. More...
|
| |
| void | copyScratchToDestination (tbox::Pointer< hier::PatchLevel< DIM > > level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > level_mgr) const |
| | Copy the scratch space into the destination space. More...
|
| |
| void | refineScratchData () const |
| | Refine scratch data between coarse and fine patch levels. More...
|
| |
| void | generateCommunicationSchedule (tbox::Pointer< tbox::Schedule > coarse_priority_schedule, tbox::Pointer< tbox::Schedule > fine_priority_schedule, tbox::Pointer< hier::PatchLevel< DIM > > dst_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > dst_level_mgr, tbox::Pointer< hier::PatchLevel< DIM > > src_level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > src_level_mgr, const tbox::Array< xfer::LocallyActiveDataFillBoxSet< DIM > > &la_fill_boxes, tbox::Array< xfer::LocallyActiveDataFillBoxSet< DIM > > &la_unfilled_boxes, const bool use_time_interpolation) |
| |
| void | allocateDefaultFillBoxes (tbox::Array< xfer::LocallyActiveDataFillBoxSet< DIM > > &la_fill_boxes, tbox::Pointer< hier::PatchLevel< DIM > > level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > level_mgr, const hier::IntVector< DIM > &fill_ghost_width) |
| | Calculate the default fill boxes for the specified patch level. More...
|
| |
| hier::IntVector< DIM > | getMaxDestinationGhosts () const |
| | Calculate the maximum ghost cell width of all destination patch data components. More...
|
| |
| hier::IntVector< DIM > | getMaxScratchGhosts () const |
| | Calculate the maximum ghost cell width of all scratch patch data components. More...
|
| |
| hier::IntVector< DIM > | getMaxStencilGhosts () const |
| | Calculate the maximum ghost cell width required for all stencils. More...
|
| |
| void | initializeDomainAndGhostInformation (bool recursive_schedule) |
| | This function is called from each constructor to cache local copies of hierachy information and to compute the necessary scratch data, destination data, and interpolation stencil ghost cell widths used during schedule construction. More...
|
| |
| void | setRefineItems (const tbox::Pointer< xfer::RefineClasses< DIM > > refine_classes) |
| | Utility function to set up local copies of patch data source, destination, etc. indices and necessary data interpolation information stored in the refine classes object generated by the refine algorithm. More...
|
| |
| void | clearRefineItems () |
| | Utility function to clear local copies of refine items. More...
|
| |
| void | initialCheckRefineClassItems () const |
| | Utility function to check whether scratch data items in collection of refine classes have sufficient ghost cell widths to handle user-defined interpolation operations. More...
|
| |
template<int DIM>
class SAMRAI::xfer::LocallyActiveDataRefineSchedule< DIM >
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 for locally-active patch data, see the LocallyActiveDataRefineAlgorithm<DIM> header file.
NOTE: Algorithmic variations are available by calling the static method LocallyActiveDataRefineSchedule<DIM>::setScheduleGenerationMethod(), which sets the option for all instances of the class.
- See also
- xfer::LocallyActiveDataRefineAlgorithm
-
xfer::LocallyActiveRefinePatchStrategy
-
xfer::RefineClasses
Only data on the intersection of the source and destination patch components, where both data are defined, 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 LocallyActiveDataRefineAlgorithm<DIM> object.
- Parameters
-
| dst_level | Pointer to destination patch level; cannot be null. |
| dst_level_mgr | Pointer to destination level data manager; cannot be null. |
| 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. |
| src_level_mgr | Pointer to source level data manager; may be null only if src_level pointer is null. |
| 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 number 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 LocallyActiveDataRefineAlgorithm<DIM> object. This pointer cannot be null. |
| transaction_factory | Pointer to a factory object that will create data transactions; cannot be null. |
| 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, an unrecoverable assertion will result if a null pointer is passed as described above.
Static function to set box intersection algorithm to use during schedule construction for all LocallyActiveDataRefineSchedule<DIM> objects. If this method is not called, the default will be used.
Note that the ability to change the method from the default case is disabled currently.
- 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.
Flag indicating whether user's physical boundary data filling routine should be forced at last step of level filling process.
This flag is true when doing recursive filling, because the ghost data may be needed by finer levels (regardless of whether the user requested ghost boundary filling). This variable is set in the constructors, which knows whether the object is being constructed for recursive filling.
For efficiency, we only force boundary filling when, during object construction, we determine that the ghost cells do exist.