Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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

Manage implicit time integration over an AMR patch hierarchy. More...

#include <source/algorithm/implicit/ImplicitIntegrator.h>

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

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ImplicitIntegrator (const string &object_name, tbox::Pointer< tbox::Database > input_db, ImplicitEquationStrategy< DIM > *implicit_equations, solv::NonlinearSolverStrategy< DIM > *nonlinear_solver, const tbox::Pointer< hier::PatchHierarchy< DIM > > hierarchy)
virtual ~ImplicitIntegrator ()
void initialize ()
int advanceSolution (const double dt, const bool first_step)
 Integrate entire patch hierarchy through the specified time increment.
double getNextDt (const bool good_solution, const int solver_retcode)
bool checkNewSolution (const int solver_retcode) const
double updateSolution ()
double getInitialTime () const
double getFinalTime () const
double getCurrentTime () const
double getCurrentDt () const
int getIntegratorStep () const
int getMaxIntegratorSteps () const
bool stepsRemaining () const
void printClassData (ostream &os) const
void putToDatabase (tbox::Pointer< tbox::Database > db)

Detailed Description

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

Manage implicit time integration over an AMR patch hierarchy.

Class ImplicitIntegrator<DIM> manages implicit time integration over an AMR patch hierarchy. It maintains references to ImplicitEquationStrategy<DIM> and solv::NonlinearSolverStrategy<DIM> objects, which provide operations describing the implicit equations and solving the problem at each time step, respectively. When a time step is performed, data on all levels is integrated through the same time increment.

Initialization of an ImplicitIntegrator<DIM> object is performed via a combination of default parameters and values read from input. Data read from input is summarized as follows:

Required input keys and data types:

Parameters:
initial_time double value for the initial simulation time.
final_time double value for the final simulation time.
max_integrator_steps integer value for the maximum number of timesteps allowed.
All input data items described above, except for initial_time, may be overwritten by new input values when continuing from restart.

A sample input file entry might look like:

  initial_time = 0.0
  final_time   = 1.0
  max_integrator_steps = 100

See also:
algs::ImplicitEquationStrategy

solv::NonlinearSolverStrategy


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::algs::ImplicitIntegrator< DIM >::ImplicitIntegrator const string &  object_name,
tbox::Pointer< tbox::Database input_db,
ImplicitEquationStrategy< DIM > *  implicit_equations,
solv::NonlinearSolverStrategy< DIM > *  nonlinear_solver,
const tbox::Pointer< hier::PatchHierarchy< DIM > >  hierarchy
 

The constructor for ImplicitIntegrator<DIM> initializes the default state of the integrator. The integrator is configured with the concrete strategy objects in the argument list that provide operations related to the nonlinear solver and implicit equations to solve. Data members are initialized from the input and restart databases.

Note that no vectors are created in the constructor. Vectors are created and the nonlinear solver is initialized in the initialize() member function.

If assertion checking is turned on, an unrecoverable assertion will result if any of the database, strategy, or hierarchy pointers is null. Exceptions may also be thrown if any checks for consistency among input parameters fail.

template<int DIM>
SAMRAI::algs::ImplicitIntegrator< DIM >::~ImplicitIntegrator  )  [virtual]
 

Empty destructor for ImplicitIntegrator<DIM>


Member Function Documentation

template<int DIM>
void SAMRAI::algs::ImplicitIntegrator< DIM >::initialize  ) 
 

Initialize state of time integrator. This includes creating solution vector and initializing solver components.

template<int DIM>
int SAMRAI::algs::ImplicitIntegrator< DIM >::advanceSolution const double  dt,
const bool  first_step
 

Integrate entire patch hierarchy through the specified time increment.

Integrate entire patch hierarchy through the specified time increment. The time advance assumes the use of a nonlinear solver to implicitly integrate the discrete equations. The integer return value is the return code generated by the particular solver package in use. It is the user's responsibility to interpret this code in a manner consistent with the solver she is using.

The boolean first_step argument is true when this is the very first call to the advance function or if the call occurs immediately after the hierarchy has changed due to regridding. Otherwise it is false. Note that, when the argument is true, the use of extrapolation to construct the initial guess for the advanced solution may not be possible.

Parameters:
dt Time step size
first_step Whether this is the first step after grid change
Returns:
value is the return code generated by the particular solver package in use

template<int DIM>
double SAMRAI::algs::ImplicitIntegrator< DIM >::getNextDt const bool  good_solution,
const int  solver_retcode
 

Return time increment for next solution advance. Timestep selection is generally based on whether the nonlinear solution iteration converged and, if so, whether the solution meets some user-defined criteria. This routine assumes that, before it is called, the routine checkNewSolution() was called. The boolean argument is the return value from that call. The integer argument is the return code generated by the nonlinear solver package that computed the solution.

template<int DIM>
bool SAMRAI::algs::ImplicitIntegrator< DIM >::checkNewSolution const int  solver_retcode  )  const
 

Check time advanced solution to determine whether it is acceptable. Return true if the solution is acceptable; return false otherwise. The integer argument is the return code generated by the call to the nonlinear solver "solve" routine. The meaning of this value depends on the particular nonlinear solver in use and must be intepreted properly by the user-supplied solution checking routine.

template<int DIM>
double SAMRAI::algs::ImplicitIntegrator< DIM >::updateSolution  ) 
 

Update solution (e.g., reset pointers for solution data, update dependent variables, etc.) after time advance. It is assumed that when this routine is invoked, an acceptable new solution has been computed. The double return value is the simulation time corresponding to the advanced solution.

template<int DIM>
double SAMRAI::algs::ImplicitIntegrator< DIM >::getInitialTime  )  const [inline]
 

Return initial integration time.

template<int DIM>
double SAMRAI::algs::ImplicitIntegrator< DIM >::getFinalTime  )  const [inline]
 

Return final integration time.

template<int DIM>
double SAMRAI::algs::ImplicitIntegrator< DIM >::getCurrentTime  )  const [inline]
 

Return current integration time.

template<int DIM>
double SAMRAI::algs::ImplicitIntegrator< DIM >::getCurrentDt  )  const [inline]
 

Return current timestep.

template<int DIM>
int SAMRAI::algs::ImplicitIntegrator< DIM >::getIntegratorStep  )  const [inline]
 

Return current integration step number.

template<int DIM>
int SAMRAI::algs::ImplicitIntegrator< DIM >::getMaxIntegratorSteps  )  const [inline]
 

Return maximum number of integration steps.

template<int DIM>
bool SAMRAI::algs::ImplicitIntegrator< DIM >::stepsRemaining  )  const [inline]
 

Return true if the number of integration steps performed by the integrator has not reached the specified maximum; return false otherwise.

template<int DIM>
void SAMRAI::algs::ImplicitIntegrator< DIM >::printClassData ostream &  os  )  const
 

Print out all members of integrator instance to given output stream.

template<int DIM>
void SAMRAI::algs::ImplicitIntegrator< DIM >::putToDatabase tbox::Pointer< tbox::Database db  ) 
 

Write out state of object to 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 Fri Dec 2 11:22:39 2005 for SAMRAI by  doxygen 1.4.2