SAMRAI::xfer::RefinePatchStrategy< DIM > Class Template Reference

Class RefinePatchStrategy<DIM> is an abstract base class that defines a Strategy pattern interface for operations that a user must supply for application-specific refining of data between levels in an AMR patch hierarchy and filling of physical boundary values. A concrete subclass must define four member functions to perform the following tasks:. More...

#include <source/transfer/datamovers/standard/RefinePatchStrategy.h>

Inheritance diagram for SAMRAI::xfer::RefinePatchStrategy< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 RefinePatchStrategy ()
virtual ~RefinePatchStrategy ()
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=0
virtual void preprocessRefine (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::Box< DIM > &fine_box, const hier::IntVector< DIM > &ratio)=0
virtual void postprocessRefine (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::Box< DIM > &fine_box, const hier::IntVector< DIM > &ratio)=0
virtual void preprocessRefineBoxes (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::BoxList< DIM > &fine_boxes, const hier::IntVector< DIM > &ratio)
virtual void postprocessRefineBoxes (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::BoxList< DIM > &fine_boxes, const hier::IntVector< DIM > &ratio)

Detailed Description

template<int DIM>
class SAMRAI::xfer::RefinePatchStrategy< DIM >

Class RefinePatchStrategy<DIM> is an abstract base class that defines a Strategy pattern interface for operations that a user must supply for application-specific refining of data between levels in an AMR patch hierarchy and filling of physical boundary values. A concrete subclass must define four member functions to perform the following tasks:.

Note that the preprocess member function is called before standard data refine using RefineOperators and the postprocessor member function is called afterwards.

There are two versions of the preprocess and postprocess functions. The default abstract function only takes a single box. The user may also over-ride preprocess and postprocess functions that take a box list and process an entire patch at one time. By default, the box list version loops over all of the boxes in the box list and calls the other version.

See also:
xfer::RefineAlgorithm

xfer::RefineSchedule


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::xfer::RefinePatchStrategy< DIM >::RefinePatchStrategy (  ) 

The constructor for patch strategy does nothing interesting.

template<int DIM>
SAMRAI::xfer::RefinePatchStrategy< DIM >::~RefinePatchStrategy (  )  [virtual]

The virtual destructor for refine strategy does nothing interesting.


Member Function Documentation

template<int DIM>
virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::setPhysicalBoundaryConditions ( hier::Patch< DIM > &  patch,
const double  fill_time,
const hier::IntVector< DIM > &  ghost_width_to_fill 
) [pure virtual]

Pure virtual function to set data associated with the given list of patch data indices at patch boundaries that intersect the physical domain boundary. The specific boundary conditions are determined by the user. The patch data components set in this routine correspond to the "scratch" components specified in calls to the registerRefine() function in the RefineAlgorithm<DIM> class.

Parameters:
patch hier::Patch on which to fill boundary data.
fill_time Double simulation time for boundary filling.
ghost_width_to_fill Integer vector describing maximum ghost width to fill over all registered scratch components.

Implemented in SAMRAI::xfer::MultiblockRefinePatchStrategy< DIM >, SAMRAI::mesh::MultiblockGriddingTagger< DIM >, SAMRAI::solv::CartesianRobinBcHelper< DIM >, SAMRAI::algs::HyperbolicPatchStrategy< DIM >, SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >, and SAMRAI::appu::EmbeddedBoundaryGeometry< DIM >.

template<int DIM>
virtual hier::IntVector<DIM> SAMRAI::xfer::RefinePatchStrategy< DIM >::getRefineOpStencilWidth (  )  const [pure virtual]

Pure virtual function to return maximum stencil width needed over user-defined data interpolation operations. This is needed to determine the correct interpolation data dependencies.

Implemented in SAMRAI::xfer::MultiblockRefinePatchStrategy< DIM >, SAMRAI::mesh::MultiblockGriddingTagger< DIM >, SAMRAI::solv::CartesianRobinBcHelper< DIM >, SAMRAI::algs::HyperbolicPatchStrategy< DIM >, SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >, and SAMRAI::appu::EmbeddedBoundaryGeometry< DIM >.

template<int DIM>
virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::preprocessRefine ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::Box< DIM > &  fine_box,
const hier::IntVector< DIM > &  ratio 
) [pure virtual]

Pure virtual function to perform user-defined preprocess data refine operations. This member function is called before standard refine operations (expressed using concrete subclasses of the RefineOperator<DIM> base class). The preprocess 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.

Implemented in SAMRAI::xfer::MultiblockRefinePatchStrategy< DIM >, SAMRAI::mesh::MultiblockGriddingTagger< DIM >, SAMRAI::solv::CartesianRobinBcHelper< DIM >, SAMRAI::algs::HyperbolicPatchStrategy< DIM >, SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >, and SAMRAI::appu::EmbeddedBoundaryGeometry< DIM >.

template<int DIM>
virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::postprocessRefine ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::Box< DIM > &  fine_box,
const hier::IntVector< DIM > &  ratio 
) [pure 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.

Implemented in SAMRAI::xfer::MultiblockRefinePatchStrategy< DIM >, SAMRAI::mesh::MultiblockGriddingTagger< DIM >, SAMRAI::solv::CartesianRobinBcHelper< DIM >, SAMRAI::algs::HyperbolicPatchStrategy< DIM >, SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >, and SAMRAI::appu::EmbeddedBoundaryGeometry< DIM >.

template<int DIM>
void SAMRAI::xfer::RefinePatchStrategy< DIM >::preprocessRefineBoxes ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::BoxList< DIM > &  fine_boxes,
const hier::IntVector< DIM > &  ratio 
) [virtual]

Virtual function to perform user-defined refine operations. This member function is called before standard refining operations (expressed using concrete subclasses of the RefineOperator<DIM> base class). The preprocess 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 regions.

Typically, only the pure virtual members of this class are implemented in user-defined subclasses of this base class. This version of the preprocess function operates on an entire box list. By default, this version simply loops over the box list and calls the single-box version, which is a pure virtual function.

Parameters:
fine Fine patch containing destination data.
coarse Coarse patch containing source data.
fine_boxes tbox::List of box regions on fine patch into which data is refined.
ratio Integer vector containing ratio relating index space between coarse and fine patches.

Reimplemented in SAMRAI::solv::CartesianRobinBcHelper< DIM >.

template<int DIM>
void SAMRAI::xfer::RefinePatchStrategy< DIM >::postprocessRefineBoxes ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::BoxList< DIM > &  fine_boxes,
const hier::IntVector< DIM > &  ratio 
) [virtual]

Virtual function to perform user-defined refine operations. This member function is called after standard refining 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 regions.

Typically, only the pure virtual members of this class are implemented in user-defined subclasses of this base class. This version of the postprocess function operates on an entire box list. By default, this version simply loops over the box list and calls the single-box version, which is a pure virtual function.

Parameters:
fine Fine patch containing destination data.
coarse Coarse patch containing source data.
fine_boxes tbox::List of box regions on fine patch into which data is refined.
ratio Integer vector containing ratio relating index space between coarse and fine patches.

Reimplemented in SAMRAI::solv::CartesianRobinBcHelper< DIM >.


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