#include <source/transfer/datamovers/locally_active/LocallyActiveDataRefineAlgorithm.h>
Public Member Functions | |
LocallyActiveDataRefineAlgorithm () | |
virtual | ~LocallyActiveDataRefineAlgorithm () |
void | registerRefine (const int dst, const int src, const int scratch, tbox::Pointer< xfer::RefineOperator< DIM > > oprefine) |
void | registerRefine (const int dst, const int src, const int src_told, const int src_tnew, const int scratch, tbox::Pointer< RefineOperator< DIM > > oprefine, tbox::Pointer< TimeInterpolateOperator< DIM > > optime) |
tbox::Pointer< xfer::LocallyActiveDataRefineSchedule< DIM > > | createSchedule (tbox::Pointer< hier::PatchLevel< DIM > > level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > level_mgr, xfer::LocallyActiveDataRefinePatchStrategy< DIM > *patch_strategy=((xfer::LocallyActiveDataRefinePatchStrategy< DIM > *)(0)), tbox::Pointer< xfer::LocallyActiveDataRefineTransactionFactory< DIM > > transaction_factory=(xfer::LocallyActiveDataRefineTransactionFactory< DIM > *)(0)) |
Create a communication schedule that moves data from the interiors of the source data components into the interior and boundary cells of the destination data components on the same level where those sources and destinations overlap. | |
tbox::Pointer< xfer::LocallyActiveDataRefineSchedule< DIM > > | createSchedule (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, xfer::LocallyActiveDataRefinePatchStrategy< DIM > *patch_strategy=((xfer::LocallyActiveDataRefinePatchStrategy< DIM > *)(0)), bool use_time_interpolation=false, tbox::Pointer< xfer::LocallyActiveDataRefineTransactionFactory< DIM > > transaction_factory=(xfer::LocallyActiveDataRefineTransactionFactory< DIM > *)(0)) |
Create a communication schedule that moves data from the interiors of the source data components on a source level into the interior and boundary cells of the destination data components on a destination level where those sources and destinations overlap. | |
tbox::Pointer< xfer::LocallyActiveDataRefineSchedule< DIM > > | createSchedule (tbox::Pointer< hier::PatchLevel< DIM > > level, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > level_mgr, const int next_coarser_level, tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, xfer::LocallyActiveDataRefinePatchStrategy< DIM > *patch_strategy=((xfer::LocallyActiveDataRefinePatchStrategy< DIM > *)(0)), bool use_time_interpolation=false, tbox::Pointer< xfer::LocallyActiveDataRefineTransactionFactory< DIM > > transaction_factory=(xfer::LocallyActiveDataRefineTransactionFactory< DIM > *)(0)) |
Create a communication schedule that moves data from the interiors of the source data components on the patch level and coarser levels in the patch hierarchy into the interior and boundary cells of the destination data components on the given patch level where those sources and destinations overlap. Data is time interpolated between old and new sources on coarser levels when and where time interpolation is needed and copied from the source components on the patch level into the destination components otherwise. | |
tbox::Pointer< xfer::LocallyActiveDataRefineSchedule< DIM > > | createSchedule (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 int next_coarser_level, tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy, xfer::LocallyActiveDataRefinePatchStrategy< DIM > *patch_strategy=((xfer::LocallyActiveDataRefinePatchStrategy< DIM > *)(0)), bool use_time_interpolation=false, tbox::Pointer< xfer::LocallyActiveDataRefineTransactionFactory< DIM > > transaction_factory=(xfer::LocallyActiveDataRefineTransactionFactory< DIM > *)(0)) |
Create a communication schedule that moves data from the interiors of the source data components on the source level and coarser levels in the hierarchy into the interior and boundary cells of the destination data components on the destination level where those sources and destinations overlap. Data is time interpolated between old and new sources on coarser levels when and where time interpolation is needed and from the source data components on the source level into the destination data components otherwise. | |
void | printClassData (ostream &stream) const |
Note that this algorithm class is similar in functionality and usage to the RefineAlgorithm<DIM> class.
Each data communication procedure generally consists of three parts: an algorithm, a schedule, and a patch strategy. The algorithm describes the patch data components and time and space interpolation operations, but is independent of the configuration of the patches in an AMR hierarchy. Patch data items and their associated spatial and time interpolation operators are registered with an instantiation of this algorithm class. To generate the communication dependencies for a particular patch hierarchy configuration, the algorithm creates a refine schedule based on the state of a given hierarchy and the information in the algorithm. The schedule can then perform the communication operations that move data to the destination patch level using the associated operators. User-defined operations (such as filling physical boundaries and special interpolation procedures) are provided through a refine patch strategy object.
In general, source data is copied into the designated scratch data 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 storage is copied into the destination data space at the end of the communication process. Thus, copy operations between source, scratch, and destination patch data objects must be defined. In general, it is the user's responsibility to register valid operations with the refine algorithm so that the data communication can occur.
In general, the destination and scratch data components may be the same (assuming that the scratch component has a sufficient ghost cells width). The source and scratch components SHOULD NOT be the same generally, since the interiors of the source space may be changed by the use of the scratch data as temporary work space.
Note that each refine schedule created by a refine algorithm remains valid as long as the patches involved in the communication process do not change; thus, they can be used for multiple data communication cycles.
Typical usage of a refine algorithm to perform inter-patch communication on an AMR hierarchy involves four steps:
|
Construct a refinement algorithm and initialize its basic state. Note that refinement operations must be registered with this algorithm before it can do anything useful. See the registerRefine() routines for details. |
|
The virtual destructor for the algorithm releases all internal storage. |
|
Register a refine operation with the refine algorithm object. This routine does not support time interpolation. Data values will be moved from the source component to the destination component using scratch component as a temporary work space. The scratch component must have sufficient ghost cells to cover the required operator stencil width and any needed physical boundary ghost cells.
|
|
Register a refine operation with the refine algorithm object. This routine supports time interpolation. Time interpolation will take place between the old and new source data components on coarser levels. On the destination level, data will be moved from the source component to the destination component using scratch component as a temporary work space. The scratch component must have sufficient ghost cells to cover the required operator stencil width and any needed physical boundary ghost cells. The time interpolation operator cannot be null. When assertion checking is active, passing in a null pointer will result in an unrecoverable exception.
|
|
Create a communication schedule that moves data from the interiors of the source data components into the interior and boundary cells of the destination data components on the same level where those sources and destinations overlap. No spatial interpolation is performed. Note that the schedule remains valid as long as the patches on the level do not change; thus, it can be used for multiple data communication cycles.
|
|
Create a communication schedule that moves data from the interiors of the source data components on a source level into the interior and boundary cells of the destination data components on a destination level where those sources and destinations overlap. Note that both levels must reside in the same AMR hierarchy index space, or in index spaces that represent the same level of mesh refinement. No spatial interpolation is performed. Note that the schedule remains valid as long as the patches on the levels do not change; thus, it can be used for multiple data communication cycles.
|
|
Create a communication schedule that moves data from the interiors of the source data components on the patch level and coarser levels in the patch hierarchy into the interior and boundary cells of the destination data components on the given patch level where those sources and destinations overlap. Data is time interpolated between old and new sources on coarser levels when and where time interpolation is needed and copied from the source components on the patch level into the destination components otherwise. In certain rare cases in may be necessary to perform time interpolation between old and new sources on the given patch level. In this case the optional argument use_time_interpolation should be set to true. Regardless of the value of this argument, time interpolation on coarser levels will always occur whenever needed. Note that the schedule remains valid as long as the patches on the levels involved in its creation do not change; thus, it can be used for multiple data communication cycles.
|
|
Create a communication schedule that moves data from the interiors of the source data components on the source level and coarser levels in the hierarchy into the interior and boundary cells of the destination data components on the destination level where those sources and destinations overlap. Data is time interpolated between old and new sources on coarser levels when and where time interpolation is needed and from the source data components on the source level into the destination data components otherwise. This form of schedule construction is typically used after regridding (where the source level is the patch level being replaced by the destination level in the patch hierarchy) or when the data on destination patch level is to be overwritten by data interpolated from coarser levels in the patch hierarchy. In the first case, data on the destination level will be copied from the source level in regions where those two levels overlap and filled with interpolated values from the hierarchy elsewhere. In the latter case, the source level pointer may be null. Then, data on the destination level will be filled using interpolated data from coarser hierarchy levels. In certain cases it may be necessary to perform time interpolation between old and new sources onto the destination level. In this case the optional argument use_time_interpolation should be set to true. Regardless of the value of this argument, time interpolation on coarser levels will always occur whenever needed. Note that when the source level pointer is non-null, the source and destination levels must correspond to the same index space. Note that the schedule remains valid as long as the patches on the levels involved in its creation do not change; thus, it can be used for multiple data communication cycles.
|
|
Print the refine algorithm state to the specified data stream.
|