|
IBAMR
IBAMR version 0.19.
|
Class MultiblockCoarsenSchedule<DIM> encapsulates the AMR communication pattern to coarsen data from a finer level to a coarser level. More...
#include <MultiblockCoarsenSchedule.h>

Public Member Functions | |
| MultiblockCoarsenSchedule (tbox::Pointer< hier::MultiblockPatchLevel< DIM > > crse_level, tbox::Pointer< hier::MultiblockPatchLevel< DIM > > fine_level, const tbox::Pointer< xfer::CoarsenClasses< DIM > > coarsen_classes, tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > > multiblock, MultiblockCoarsenPatchStrategy< DIM > *coarsen_strategy, MultiblockRefinePatchStrategy< DIM > *refine_strategy, bool fill_coarse_data) | |
| Constructor for coarsen schedule from fine level to coarse level. More... | |
| virtual | ~MultiblockCoarsenSchedule () |
| The virtual destructor for the schedule releases all internal storage. More... | |
| void | coarsenData () const |
| Execute the stored communication schedule and perform the data movement. More... | |
| const tbox::Pointer< xfer::CoarsenClasses< DIM > > & | getEquivalenceClasses () const |
| Return const reference to the pointer to coarsen equivalence classes used in schedule. More... | |
Private Member Functions | |
| MultiblockCoarsenSchedule (const MultiblockCoarsenSchedule< DIM > &) | |
| void | operator= (const MultiblockCoarsenSchedule< DIM > &) |
| void | setCoarsenItems (const tbox::Pointer< xfer::CoarsenClasses< DIM > > coarsen_classes) |
| set the internal pointer to equivalence classes More... | |
| void | initialCheckCoarsenClassItems () const |
| Utility function to check that patch data has sufficient ghosts. More... | |
| void | setupRefineAlgorithm () |
| Set up refine algorithm for temporary coarse level filling. More... | |
| void | generateSchedule () |
| Generate schedule for moving data from temp storage to destination. More... | |
| void | coarsenSourceData (MultiblockCoarsenPatchStrategy< DIM > *patch_strategy) const |
| Execute the coarsening operation. More... | |
| void | generateTemporaryLevel () |
| Create a temporary coarse level for data storage during coarsen. More... | |
Private Attributes | |
| tbox::Pointer< xfer::CoarsenClasses< DIM > > | d_coarsen_classes |
| int | d_number_coarsen_items |
| const xfer::CoarsenClasses< DIM >::Data ** | d_coarsen_items |
| tbox::Pointer< hier::MultiblockPatchLevel< DIM > > | d_mblk_crse_level |
| tbox::Pointer< hier::MultiblockPatchLevel< DIM > > | d_mblk_fine_level |
| tbox::Pointer< hier::MultiblockPatchLevel< DIM > > | d_mblk_temp_crse_level |
| MultiblockCoarsenPatchStrategy< DIM > * | d_mblk_coarsen_patch_strategy |
| MultiblockRefinePatchStrategy< DIM > * | d_mblk_refine_strategy |
| tbox::Pointer< tbox::Schedule > | d_schedule |
| bool | d_fill_coarse_data |
| tbox::Pointer< MultiblockRefineAlgorithm< DIM > > | d_mblk_refine_alg |
| tbox::Pointer< MultiblockRefineSchedule< DIM > > | d_mblk_refine_sched |
| hier::ComponentSelector | d_sources |
| hier::IntVector< DIM > | d_ratio |
| tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > > | d_multiblock_hier |
| tbox::Pointer< tbox::Timer > | t_gen_sched |
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. 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 MultiblockCoarsenAlgorithm<DIM> header file.
| SAMRAI::xfer::MultiblockCoarsenSchedule< DIM >::MultiblockCoarsenSchedule | ( | tbox::Pointer< hier::MultiblockPatchLevel< DIM > > | crse_level, |
| tbox::Pointer< hier::MultiblockPatchLevel< DIM > > | fine_level, | ||
| const tbox::Pointer< xfer::CoarsenClasses< DIM > > | coarsen_classes, | ||
| tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > > | multiblock, | ||
| MultiblockCoarsenPatchStrategy< DIM > * | coarsen_strategy, | ||
| MultiblockRefinePatchStrategy< DIM > * | refine_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 MultiblockCoarsenAlgorithm<DIM> object. For possible variations on data coarsening, see the Multiblock_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 xfer::CoarsenAlgorithm<DIM> object. |
| multiblock | Multiblock hierarchy where the operation occurs |
| coarsen_strategy | Pointer to a coarsen patch strategy object that provides user-defined coarsen operations. This pointer may be null, in which case no user-defined coarsen operations will be performed. |
| refine_strategy | Pointer to a refine patch strategy object that provides user-defined coarsen operations. This is needed in specific cases where a user-defined coarsen operation requires data to be filled on the coarse scratch level prior to execution of the coarsening operator. If such functionality is not needed, set this pointer to null. |
| 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.
|
virtual |
|
private |
| void SAMRAI::xfer::MultiblockCoarsenSchedule< DIM >::coarsenData | ( | ) | const |
| const tbox::Pointer< xfer::CoarsenClasses<DIM> >& SAMRAI::xfer::MultiblockCoarsenSchedule< DIM >::getEquivalenceClasses | ( | ) | const |
|
private |
|
private |
Utility function to set up local copies of patch data source, destination, etc. indices and necessary data coarsening information stored in the coarsen classes object generated by the coarsen algorithm. An array of coarsen data items is stored locally here to facilitate interaction with transations.
| coarsen_classes | The equivalence classes which store the identifiers of the data to be |
|
private |
Utility function to check check coarsen items to see whether source and destination patch data components have sufficient ghost cell widths to satisfy the "ghost width to coarsen" functionality described in the xfer::CoarsenAlgorithm<DIM> class header. Specifically, the destination data must have a ghost cell width at least as large as the ghost cell width to coarsen. The source data must have a ghost cell width at least as large as the ghost cell width to coarsen refined to the source (finer) level index space. Although it is redundant if the coarsen algorithm created the coarsen classes, the routine xfer::CoarsenClasses<DIM>::checkCoarsenItem() is also called.
If any entries are erroneous an assertion is thrown with a descriptive error message and program halts.
|
private |
Set up refine algorithm to fill temporary coarse level before coarsening operations, if necessary. The associated refine schedule is set in the generateSchedule() routine.
|
private |
Generate communication schedule that moves source patch data from the temporary level into the destination patch data of the destination (coarse) level.
|
private |
Coarsen source patch data from the fine patch level into the source patch data on the coarse temporary patch level.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17