class AMRLevel

abstract base class for time-dependent data at a level of refinement.

Inheritance:

AMRLevel


public members:

constructors, destructor and defines
AMRLevel ()
virtual ~AMRLevel ()
virtual void define (AMRLevel* a_coarser_level_ptr, const Box& a_problem_domain, int a_level, int a_ref_ratio)
virtual void define (AMRLevel* a_coarser_level_ptr, const ProblemDomain & a_problem_domain, int a_level, int a_ref_ratio)

Modification functions
virtual void finerLevelPtr (AMRLevel* a_finer_level_ptr)
virtual void dt (Real a_dt)
virtual void time (Real a_time)

Access functions
virtual Real dt () const
virtual Real time () const
virtual void initialDtMultiplier(Real a_initial_dt_multiplier)

Access functions
virtual Real initialDtMultiplier() const
virtual const ProblemDomain & problemDomain () const
virtual Vector <Box> boxes () const
bool isDefined() const
virtual int refRatio () const
static void verbosity (int a_verbosity)
static int verbosity ()

algorithm functions
virtual Real advance ()
virtual void postTimeStep ()
virtual void tagCells ( IntVectSet & a_tags)
virtual void tagCellsInit ( IntVectSet & a_tags)
virtual void regrid (const Vector <Box>& a_new_grids)
virtual void postRegrid (int a_base_level)
virtual void initialGrid (const Vector <Box>& a_new_grids)
virtual void initialData ()
virtual void postInitialize ()
virtual Real computeDt ()
virtual Real computeInitialDt ()

File I/O functions
virtual void writeCheckpointHeader ( HDF5Handle & a_handle) const
virtual void writeCheckpointLevel ( HDF5Handle & a_handle) const
virtual void readCheckpointHeader ( HDF5Handle & a_handle)
virtual void readCheckpointLevel ( HDF5Handle & a_handle)
virtual void writePlotHeader ( HDF5Handle & a_handle) const
virtual void writePlotLevel ( HDF5Handle & a_handle) const

Documentation

This is an abstract base class for data at the same level of refinement within a hierarchy of levels. The concrete class derived from AMRLevel is called a physics class. The domain of a level is a disjoint union of rectangles in a logically rectangular index space. Data is defined within this domain. There is also a problem domain, which may be larger, within which data can, in theory, be interpolated from some coarser level.

AMRLevel is intimately entangled with the class AMR. The AMR contains a collection of AMRLevels which represent a hierarchy of levels of refinement. The class AMR is responsible for calling the correct member functions of AMRLevel. The user is responsible for implementing the physics class, and might never call any AMRLevel functions described here.

AMRLevel ()
Default constructor.

virtual ~AMRLevel ()
Destructor.

virtual void define (AMRLevel* a_coarser_level_ptr, const Box& a_problem_domain, int a_level, int a_ref_ratio)
Defines this AMRLevel.

Arguments:
a_coarser_level_ptr (not modified): pointer to next coarser level object.
a_problem_domain (not modified): problem domain of this level.
a_level (not modified): index of this level. The base level is zero.
a_ref_ratio (not modified): the refinement ratio between this level and the next finer level.

virtual void define (AMRLevel* a_coarser_level_ptr, const ProblemDomain & a_problem_domain, int a_level, int a_ref_ratio)
Defines this AMRLevel.

Arguments:
a_coarser_level_ptr (not modified): pointer to next coarser level object.
a_problem_domain (not modified): problem domain of this level.
a_level (not modified): index of this level. The base level is zero.
a_ref_ratio (not modified): the refinement ratio between this level and the next finer level.

virtual void finerLevelPtr (AMRLevel* a_finer_level_ptr)
Sets the pointer-to-finer-level member to a_finer_level_ptr.

virtual void dt (Real a_dt)
Sets the time step to a_dt.

virtual void time (Real a_time)
Sets the time to a_time.

virtual Real dt () const
Returns the current value of the time step.

virtual Real time () const
Returns the current value of the time on this level virtual

virtual void initialDtMultiplier (Real a_initial_dt_multiplier)
Sets the initial dt multiplier to a_initial_dt_multiplier.

virtual Real initialDtMultiplier () const
Returns the initial dt multiplier.

virtual const ProblemDomain & problemDomain () const
Returns the problem domain of this level.

virtual Vector <Box> boxes () const
Returns the domain of this level.

bool isDefined () const
Returns true if any AMRLevel::define function has been called, false otherwise.

virtual int refRatio () const
Returns the refinement ratio between this level and the next finer level.

static void verbosity (int a_verbosity)
Sets verbosity level to a_verbosity. Minimum verbosity is 0, for which nothing is printed.

static int verbosity ()
Returns current verbosity level. Minimum verbosity is 0, for which nothing is printed.

virtual Real advance ()
Advances this level by one time step.

This is a pure virtual function and MUST be defined in the derived class.

virtual void postTimeStep ()
Things to do after advancing this level by one time step.

This is a pure virtual function and MUST be defined in the derived class.

virtual void tagCells ( IntVectSet & a_tags)
Creates tagged cells for dynamic mesh refinement.

This is a pure virtual function and MUST be defined in the derived class.

virtual void tagCellsInit ( IntVectSet & a_tags)
Creates tagged cells for mesh refinement at initialization.

This is a pure virtual function and MUST be defined in the derived class.

virtual void regrid (const Vector <Box>& a_new_grids)
Redefines this level to have the specified domain a_new_grids.

This is a pure virtual function and MUST be defined in the derived class.

virtual void postRegrid (int a_base_level)
Performs any post-regridding operations which are necessary.

This is not a pure virtual function to preserve compatibility with earlier versions of AMRLevel. The AMRLevel::postRegrid() instantiation is a no-op.

virtual void initialGrid (const Vector <Box>& a_new_grids)
Initializes this level to have the specified domain a_new_grids.

This is a pure virtual function and MUST be defined in the derived class.

virtual void initialData ()
Initializes data.

This is a pure virtual function and MUST be defined in the derived class.

virtual void postInitialize ()
Things to do after initialization.

This is a pure virtual function and MUST be defined in the derived class.

virtual Real computeDt ()
Returns maximum stable time step for this level.

This is a pure virtual function and MUST be defined in the derived class.

virtual Real computeInitialDt ()
Returns maximum stable time step for this level with initial data.

This is a pure virtual function and MUST be defined in the derived class.

virtual void writeCheckpointHeader ( HDF5Handle & a_handle) const
Writes checkpoint header.

This is a pure virtual function and MUST be defined in the derived class.

virtual void writeCheckpointLevel ( HDF5Handle & a_handle) const
Write checkpoint data for this level.

This is a pure virtual function and MUST be defined in the derived class.

virtual void readCheckpointHeader ( HDF5Handle & a_handle)
Reads checkpoint header.

This is a pure virtual function and MUST be defined in the derived class.

virtual void readCheckpointLevel ( HDF5Handle & a_handle)
Reads checkpoint data for this level.

This is a pure virtual function and MUST be defined in the derived class.

virtual void writePlotHeader ( HDF5Handle & a_handle) const
Writes plot header.

This is a pure virtual function and MUST be defined in the derived class.

virtual void writePlotLevel ( HDF5Handle & a_handle) const
Write plot file for this level.

This is a pure virtual function and MUST be defined in the derived class.


this class has no child classes.

alphabetic index hierarchy of classes


Chombo

Copyright Notice

This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.

It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.

This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.