#include <source/algorithm/method_of_lines/MethodOfLinesPatchStrategy.h>
Inheritance diagram for SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >:
Public Member Functions | |
MethodOfLinesPatchStrategy () | |
virtual | ~MethodOfLinesPatchStrategy ()=0 |
virtual void | registerModelVariables (MethodOfLinesIntegrator< DIM > *integrator)=0 |
virtual void | initializeDataOnPatch (hier::Patch< DIM > &patch, const double time, const bool initial_time) const =0 |
virtual double | computeStableDtOnPatch (hier::Patch< DIM > &patch, const double time) const =0 |
virtual void | singleStep (hier::Patch< DIM > &patch, const double dt, const double alpha_1, const double alpha_2, const double beta) const =0 |
virtual void | tagGradientDetectorCells (hier::Patch< DIM > &patch, const double regrid_time, const bool initial_error, const int tag_index, const bool uses_richardson_extrapolation_too) |
virtual void | setPhysicalBoundaryConditions (hier::Patch< DIM > &patch, const double fill_time, const hier::IntVector< DIM > &ghost_width_to_fill)=0 |
virtual hier::IntVector< DIM > | getRefineOpStencilWidth () const |
virtual void | preprocessRefine (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::Box< DIM > &fine_box, const hier::IntVector< DIM > &ratio) |
virtual void | postprocessRefine (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::Box< DIM > &fine_box, const hier::IntVector< DIM > &ratio) |
virtual hier::IntVector< DIM > | getCoarsenOpStencilWidth () const |
virtual void | preprocessCoarsen (hier::Patch< DIM > &coarse, const hier::Patch< DIM > &fine, const hier::Box< DIM > &coarse_box, const hier::IntVector< DIM > &ratio) |
virtual void | postprocessCoarsen (hier::Patch< DIM > &coarse, const hier::Patch< DIM > &fine, const hier::Box< DIM > &coarse_box, const hier::IntVector< DIM > &ratio) |
tbox::Pointer< hier::VariableContext > | getInteriorWithGhostsContext () const |
tbox::Pointer< hier::VariableContext > | getInteriorContext () const |
void | setInteriorWithGhostsContext (tbox::Pointer< hier::VariableContext > context) |
void | setInteriorContext (tbox::Pointer< hier::VariableContext > context) |
SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::MethodOfLinesPatchStrategy | ( | ) |
Blank constructor for MethodOfLinesPatchStrategy<DIM>.
SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::~MethodOfLinesPatchStrategy | ( | ) | [pure virtual] |
Virtual destructor for MethodOfLinesPatchStrategy<DIM>.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::registerModelVariables | ( | MethodOfLinesIntegrator< DIM > * | integrator | ) | [pure virtual] |
Register variables specific to the problem to be solved with the integrator using the registerVariable function. This defines the way data for each quantity will be manipulated on the patches. For more information, refer to MethodOfLinesIntegrator<DIM>::registerVariable.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::initializeDataOnPatch | ( | hier::Patch< DIM > & | patch, | |
const double | time, | |||
const bool | initial_time | |||
) | const [pure virtual] |
Set the initial data on a patch interior (i.e., NO GHOST CELLS). Setting "initial_time" true will initialize data at time. Setting it false will interpolate data from the appropriate coarser patch.
virtual double SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::computeStableDtOnPatch | ( | hier::Patch< DIM > & | patch, | |
const double | time | |||
) | const [pure virtual] |
Compute the stable time increment for a patch.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::singleStep | ( | hier::Patch< DIM > & | patch, | |
const double | dt, | |||
const double | alpha_1, | |||
const double | alpha_2, | |||
const double | beta | |||
) | const [pure virtual] |
Advance a single Runge Kutta step.
patch | patch that RK step is being applied | |
dt | timestep | |
alpha_1 | first coefficient applied in the RK step | |
alpha_2 | second coefficient | |
beta | third coefficient |
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::tagGradientDetectorCells | ( | hier::Patch< DIM > & | patch, | |
const double | regrid_time, | |||
const bool | initial_error, | |||
const int | tag_index, | |||
const bool | uses_richardson_extrapolation_too | |||
) | [inline, virtual] |
Using a user-specified gradient detection scheme, determine cells which have high gradients and, consequently, should be refined.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::setPhysicalBoundaryConditions | ( | hier::Patch< DIM > & | patch, | |
const double | fill_time, | |||
const hier::IntVector< DIM > & | ghost_width_to_fill | |||
) | [pure virtual] |
Set user-defined boundary conditions at the physical domain boundary.
Implements SAMRAI::xfer::RefinePatchStrategy< DIM >.
virtual hier::IntVector<DIM> SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::getRefineOpStencilWidth | ( | ) | const [inline, virtual] |
Return maximum stencil width needed for user-defined data interpolation operations. Default is to return zero, assuming no user-defined operations provided.
Implements SAMRAI::xfer::RefinePatchStrategy< DIM >.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::preprocessRefine | ( | hier::Patch< DIM > & | fine, | |
const hier::Patch< DIM > & | coarse, | |||
const hier::Box< DIM > & | fine_box, | |||
const hier::IntVector< DIM > & | ratio | |||
) | [inline, virtual] |
Pre- and post-processing routines for implementing user-defined spatial interpolation routines applied to variables. The interpolation routines are used in the MOL AMR algorithm for filling patch ghost cells before advancing data on a level and after regridding a level to fill portions of the new level from some coarser level. These routines are called automatically from within patch boundary filling schedules; thus, some concrete function matching these signatures must be provided in the user's patch model. However, the routines only need to perform some operations when "USER_DEFINED_REFINE" is given as the interpolation method for some variable when the patch model registers variables with the MOL integration algorithm, typically. If the user does not provide operations that refine such variables in either of these routines, then they will not be refined.
The order in which these operations are used in each patch boundary filling schedule is:
Also, user routines that implement these functions must use data corresponding to the d_scratch context on both coarse and fine patches.
Implements SAMRAI::xfer::RefinePatchStrategy< DIM >.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::postprocessRefine | ( | hier::Patch< DIM > & | fine, | |
const hier::Patch< DIM > & | coarse, | |||
const hier::Box< DIM > & | fine_box, | |||
const hier::IntVector< DIM > & | ratio | |||
) | [inline, virtual] |
Pure virtual function to perform user-defined postprocess data refine operations. This member function is called after standard refine operations (expressed using concrete subclasses of the RefineOperator<DIM> base class). The postprocess function must refine data from the scratch components of the coarse patch into the scratch components of the fine patch on the specified fine box region. Recall that the scratch components are specified in calls to the registerRefine() function in the RefineAlgorithm<DIM> class.
fine | Fine patch containing destination data. | |
coarse | Coarse patch containing source data. | |
fine_box | hier::Box region on fine patch into which data is refined. | |
ratio | Integer vector containing ratio relating index space between coarse and fine patches. |
Implements SAMRAI::xfer::RefinePatchStrategy< DIM >.
virtual hier::IntVector<DIM> SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::getCoarsenOpStencilWidth | ( | ) | const [inline, virtual] |
Return maximum stencil width needed for user-defined data coarsen operations. Default is to return zero, assuming no user-defined operations provided.
Implements SAMRAI::xfer::CoarsenPatchStrategy< DIM >.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::preprocessCoarsen | ( | hier::Patch< DIM > & | coarse, | |
const hier::Patch< DIM > & | fine, | |||
const hier::Box< DIM > & | coarse_box, | |||
const hier::IntVector< DIM > & | ratio | |||
) | [inline, virtual] |
Pre- and post-processing routines for implementing user-defined spatial coarsening routines applied to variables. The coarsening routines are used in the MOL AMR algorithm synchronizing coarse and fine levels when they have been integrated to the same point. These routines are called automatically from within the data synchronization coarsen schedules; thus, some concrete function matching these signatures must be provided in the user's patch model. However, the routines only need to perform some operations when "USER_DEFINED_COARSEN" is given as the coarsening method for some variable when the patch model registers variables with the MOL level integration algorithm, typically. If the user does not provide operations that coarsen such variables in either of these routines, then they will not be coarsened.
The order in which these operations are used in each coarsening schedule is:
Also, user routines that implement these functions must use corresponding to the d_new context on both coarse and fine patches for time-dependent quantities.
Implements SAMRAI::xfer::CoarsenPatchStrategy< DIM >.
virtual void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::postprocessCoarsen | ( | hier::Patch< DIM > & | coarse, | |
const hier::Patch< DIM > & | fine, | |||
const hier::Box< DIM > & | coarse_box, | |||
const hier::IntVector< DIM > & | ratio | |||
) | [inline, virtual] |
Perform user-defined coarsening operations. This member function is called after standard coarsening operations (expressed using concrete subclasses of the CoarsenOperator<DIM> base class). The postprocess function should move data from the source components on the fine patch into the source components on the coarse patch in the specified coarse box region. Recall that the source components are specified in calls to the registerCoarsen() function in the CoarsenAlgorithm<DIM> class.
coarse | Coarse patch containing destination data. | |
fine | Fine patch containing source data. | |
coarse_box | hier::Box region on coarse patch into which data is copied. | |
ratio | Integer vector containing ratio |
Implements SAMRAI::xfer::CoarsenPatchStrategy< DIM >.
tbox::Pointer<hier::VariableContext> SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::getInteriorWithGhostsContext | ( | ) | const [inline] |
The method of lines integrator controls the context for the data to be used in the numerical routines implemented in the concrete patch strategy. These accessor methods allow the patch strategy to access the particular data contexts used in the integrator.
Return pointer to data context with ghost cells.
tbox::Pointer<hier::VariableContext> SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::getInteriorContext | ( | ) | const [inline] |
Return pointer to data context with NO ghosts.
void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::setInteriorWithGhostsContext | ( | tbox::Pointer< hier::VariableContext > | context | ) | [inline] |
Set pointer to data context with ghosts.
void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::setInteriorContext | ( | tbox::Pointer< hier::VariableContext > | context | ) | [inline] |
Set pointer to data context with NO ghosts.