SAMRAI::mesh::StandardTagAndInitialize< DIM > Class Template Reference

#include <source/mesh/gridding/StandardTagAndInitialize.h>

Inheritance diagram for SAMRAI::mesh::StandardTagAndInitialize< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 StandardTagAndInitialize (const std::string &object_name, StandardTagAndInitStrategy< DIM > *tag_strategy, tbox::Pointer< tbox::Database > input_db=tbox::Pointer< tbox::Database >((0)))
virtual ~StandardTagAndInitialize ()
bool usesTimeIntegration () const
int getErrorCoarsenRatio () const
void checkCoarsenRatios (const tbox::Array< hier::IntVector< DIM > > &ratio_to_coarser)
void initializeLevelData (const tbox::Pointer< hier::BasePatchHierarchy< DIM > > hierarchy, const int level_number, const double init_data_time, const bool can_be_refined, const bool initial_time, const tbox::Pointer< hier::BasePatchLevel< DIM > > old_level=tbox::Pointer< hier::BasePatchLevel< DIM > >((0)), const bool allocate_data=true)
void resetHierarchyConfiguration (const tbox::Pointer< hier::BasePatchHierarchy< DIM > > hierarchy, const int coarsest_level, const int finest_level)
void preprocessErrorEstimation (const tbox::Pointer< hier::BasePatchHierarchy< DIM > > hierarchy, const int level_number, const double regrid_time, const double regrid_start_time, const bool initial_time)
void tagCellsForRefinement (const tbox::Pointer< hier::BasePatchHierarchy< DIM > > level, const int level_number, const double regrid_time, const int tag_index, const bool initial_time, const bool coarsest_sync_level, const bool can_be_refined, const double regrid_start_time=0)
bool coarsestLevelBoxesOK (const hier::BoxArray< DIM > &boxes) const
bool refineUserBoxInputOnly () const
void turnOnGradientDetector ()
void turnOffGradientDetector ()
void turnOnRichardsonExtrapolation ()
void turnOffRichardsonExtrapolation ()
void turnOnRefineBoxes ()
void turnOffRefineBoxes ()
void getFromInput (tbox::Pointer< tbox::Database > db)

Detailed Description

template<int DIM>
class SAMRAI::mesh::StandardTagAndInitialize< DIM >

Class StandardTagAndInitialize<DIM> defines an implementation for level initialization and cell tagging routines needed by the GriddingAlgorithm<DIM> class. This class is derived from the abstract base class TagAndInitializeStrategy<DIM>. It invokes problem-specific level initialization routines after AMR patch hierarchy levels change and routines for tagging cells for refinement using one (or more) of the following methods:

It is possible to use combinations of these three methods (e.g., use gradient detection, Richardson extrapolation, and static refine boxes at the same time). The order in which they are executed is fixed ( Richardson extrapolation first, gradient detection second, and refine boxes third). An input entry for this class is optional. If none is provided, the class will by default not use any criteria to tag cells for refinement.

Required input keys and data types: NONE

Optional input keys, data types, and defaults:

 *
 *    tagging_method = "GRADIENT_DETECTOR", "REFINE_BOXES"
 *    <refine boxes input> (@see mesh::TagAndInitializeStrategy)
 *    
 * 

This class supplies the routines for tagging cells and invoking problem-specific level initialization routines after AMR patch hierarchy levels change. A number of problem-specific operations are performed in the StandardTagAndInitStrategy<DIM> data member, for which methods are specified in a derived subclass.

See also:
mesh::TagAndInitializeStrategy

mesh::GriddingAlgorithm

mesh::StandardTagAndInitStrategy


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::mesh::StandardTagAndInitialize< DIM >::StandardTagAndInitialize ( const std::string &  object_name,
StandardTagAndInitStrategy< DIM > *  tag_strategy,
tbox::Pointer< tbox::Database input_db = tbox::Pointertbox::Database >((0)) 
)

Constructor for StandardTagAndInitialize<DIM> which may read inputs from the provided input_db. If no input database is provided, the class interprets that no tagging is desired so no cell-tagging will be performed.

template<int DIM>
SAMRAI::mesh::StandardTagAndInitialize< DIM >::~StandardTagAndInitialize (  )  [virtual]

Virtual destructor for StandardTagAndInitialize<DIM>.


Member Function Documentation

template<int DIM>
bool SAMRAI::mesh::StandardTagAndInitialize< DIM >::usesTimeIntegration (  )  const [inline, virtual]

Specifies whether the chosen method advances the solution data in the regridding process (Richardson extrapolation does, the others will not).

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
int SAMRAI::mesh::StandardTagAndInitialize< DIM >::getErrorCoarsenRatio (  )  const [inline, virtual]

Return coarsen ratio used for applying cell tagging. An error coarsen ratio other than 2 or 3 will throw an error.

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::checkCoarsenRatios ( const tbox::Array< hier::IntVector< DIM > > &  ratio_to_coarser  )  [virtual]

Some restrictions may be placed on the coarsen ratio used for cell tagging. Check these here.

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::initializeLevelData ( const tbox::Pointer< hier::BasePatchHierarchy< DIM > >  hierarchy,
const int  level_number,
const double  init_data_time,
const bool  can_be_refined,
const bool  initial_time,
const tbox::Pointer< hier::BasePatchLevel< DIM > >  old_level = tbox::Pointerhier::BasePatchLevel< DIM > >((0)),
const bool  allocate_data = true 
) [virtual]

Pass the request to initialize the data on a new level in the hierarchy to the StandardTagAndInitStrategy<DIM> data member. Required arguments specify the grid hierarchy, level number being initialized, simulation time at which the data is initialized, whether the level can be refined, and whether it is the initial time. Optional arguments include an old level, from which data may be used to initialize this level, and a flag that indicates whether data on the initialized level must first be allocated. For more information on the operations that must be performed, see the TagAndInitializeStrategy<DIM>::initializeLevelData() method.

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::resetHierarchyConfiguration ( const tbox::Pointer< hier::BasePatchHierarchy< DIM > >  hierarchy,
const int  coarsest_level,
const int  finest_level 
) [virtual]

Pass the request to reset information that depends on the hierarchy configuration to the StandardTagAndInitStrategy<DIM> data member. For more information on the operations that must be performed, see the TagAndInitializeStrategy<DIM>::resetHierarchyConfiguration() method.

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::preprocessErrorEstimation ( const tbox::Pointer< hier::BasePatchHierarchy< DIM > >  hierarchy,
const int  level_number,
const double  regrid_time,
const double  regrid_start_time,
const bool  initial_time 
) [virtual]

Certain cases may require pre-processing of error estimation data before tagging cells, which is handled by this method. For more information on the operations that must be performed, see the TagAndInitializeStrategy<DIM>::preprocessErrorEstimation() method

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::tagCellsForRefinement ( const tbox::Pointer< hier::BasePatchHierarchy< DIM > >  level,
const int  level_number,
const double  regrid_time,
const int  tag_index,
const bool  initial_time,
const bool  coarsest_sync_level,
const bool  can_be_refined,
const double  regrid_start_time = 0 
) [virtual]

Pass the request to set tags on the given level where refinement of that level should occur. Gradient detection, Richardson extrapolation, and tagging on static refine boxes is performed here.

For more information on the operations that must be performed, see the TagAndInitializeStrategy<DIM>::tagCellsForRefinement() routine.

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
bool SAMRAI::mesh::StandardTagAndInitialize< DIM >::coarsestLevelBoxesOK ( const hier::BoxArray< DIM > &  boxes  )  const [virtual]

Return true if boxes for coarsest hierarchy level are not appropriate for gridding strategy. Otherwise, return false. If false is returned, it is useful to provide a detailed explanatory message describing the problems with the boxes.

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
bool SAMRAI::mesh::StandardTagAndInitialize< DIM >::refineUserBoxInputOnly (  )  const [inline, virtual]

Return whether refinement is being performed using ONLY user-supplied refine boxes. If any method is used that invokes tagging, this will return false.

Implements SAMRAI::mesh::TagAndInitializeStrategy< DIM >.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::turnOnGradientDetector (  )  [inline]

Turn on gradient detector to tag cells for refinement.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::turnOffGradientDetector (  )  [inline]

Turn off gradient detector.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::turnOnRichardsonExtrapolation (  )  [inline]

Turn on Richardson extrapolation to tag cells for refinement.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::turnOffRichardsonExtrapolation (  )  [inline]

Turn off Richardson extrapolation.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::turnOnRefineBoxes (  )  [inline]

Turn on static refine box regions where refinement should occur.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::turnOffRefineBoxes (  )  [inline]

Turn off static refine box regions.

template<int DIM>
void SAMRAI::mesh::StandardTagAndInitialize< DIM >::getFromInput ( tbox::Pointer< tbox::Database db  ) 

Read input values, indicated above, from given database.

When assertion checking is active, the database pointer must be non-null.


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