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

Class CoarsenPatchStrategy<DIM> is an abstract base class that defines a Strategy pattern interface for operations that a user must supply for application-specific coarsening of data between two levels in an AMR patch hierarchy. A concrete subclass must define three member functions to perform the following tasks:. More...

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

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

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CoarsenPatchStrategy ()
virtual ~CoarsenPatchStrategy ()
virtual hier::IntVector< DIM > getCoarsenOpStencilWidth () const=0
virtual void preprocessCoarsen (hier::Patch< DIM > &coarse, const hier::Patch< DIM > &fine, const hier::Box< DIM > &coarse_box, const hier::IntVector< DIM > &ratio)=0
virtual void postprocessCoarsen (hier::Patch< DIM > &coarse, const hier::Patch< DIM > &fine, const hier::Box< DIM > &coarse_box, const hier::IntVector< DIM > &ratio)=0

Detailed Description

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

Class CoarsenPatchStrategy<DIM> is an abstract base class that defines a Strategy pattern interface for operations that a user must supply for application-specific coarsening of data between two levels in an AMR patch hierarchy. A concrete subclass must define three member functions to perform the following tasks:.

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

See also:
xfer::CoarsenAlgorithm

xfer::CoarsenSchedule


Constructor & Destructor Documentation

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

The constructor for coarsen strategy does nothing interesting.

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

The virtual destructor for coarsen strategy does nothing interesting.


Member Function Documentation

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

Return maximum stencil width needed over all user-defined data coarsening operations. This is needed to determine the correct coarsening data dependencies.

Implemented in SAMRAI::algs::HyperbolicPatchStrategy< DIM >, and SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >.

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

Perform user-defined coarsening operations. This member function is called before standard coarsening operations (expressed using concrete subclasses of the CoarsenOperator<DIM> base class). The preprocess 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 coarsened.
ratio Integer vector containing ratio relating index space between coarse and fine patches.

Implemented in SAMRAI::xfer::MultiblockCoarsenPatchStrategy< DIM >, SAMRAI::algs::HyperbolicPatchStrategy< DIM >, and SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >.

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

Implemented in SAMRAI::xfer::MultiblockCoarsenPatchStrategy< DIM >, SAMRAI::algs::HyperbolicPatchStrategy< DIM >, and SAMRAI::algs::MethodOfLinesPatchStrategy< DIM >.


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