SAMRAI::algs::MethodOfLinesPatchStrategy< DIM > Class Template Reference

#include <source/algorithm/method_of_lines/MethodOfLinesPatchStrategy.h>

Inheritance diagram for SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >:

Inheritance graph
[legend]
List of all members.

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::VariableContextgetInteriorWithGhostsContext () const
tbox::Pointer< hier::VariableContextgetInteriorContext () const
void setInteriorWithGhostsContext (tbox::Pointer< hier::VariableContext > context)
void setInteriorContext (tbox::Pointer< hier::VariableContext > context)

Detailed Description

template<int DIM>
class SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >

Class MethodOfLinesPatchStrategy<DIM> is an abstract type defining the interface for operations invoked during the integration routines defined in the MethodOfLinesIntegrator<DIM> class. This class is derived from the xfer::RefinePatchStrategy<DIM> and xfer::CoarsenPatchStrategy<DIM> abstract base classes. These base classes define the interfaces for user-defined interlevel data refining and coarsening operations and the specification of physical boundary conditions.

See also:
algs::MethodOfLinesIntegrator

xfer::RefinePatchStrategy

xfer::CoarsenPatchStrategy


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::MethodOfLinesPatchStrategy (  ) 

Blank constructor for MethodOfLinesPatchStrategy<DIM>.

template<int DIM>
SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::~MethodOfLinesPatchStrategy (  )  [pure virtual]

Virtual destructor for MethodOfLinesPatchStrategy<DIM>.


Member Function Documentation

template<int 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.

template<int DIM>
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.

template<int DIM>
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.

template<int DIM>
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.

Parameters:
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

template<int DIM>
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.

template<int DIM>
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 >.

template<int 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 >.

template<int 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 >.

template<int 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.

Parameters:
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 >.

template<int 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 >.

template<int 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 >.

template<int 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.

Parameters:
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 >.

template<int 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.

template<int DIM>
tbox::Pointer<hier::VariableContext> SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::getInteriorContext (  )  const [inline]

Return pointer to data context with NO ghosts.

template<int DIM>
void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::setInteriorWithGhostsContext ( tbox::Pointer< hier::VariableContext context  )  [inline]

Set pointer to data context with ghosts.

template<int DIM>
void SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >::setInteriorContext ( tbox::Pointer< hier::VariableContext context  )  [inline]

Set pointer to data context with NO ghosts.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:21 2009 for SAMRAI by  doxygen 1.5.1