#include <source/algorithm/implicit/ImplicitEquationStrategy.h>
Public Member Functions | |
ImplicitEquationStrategy () | |
virtual | ~ImplicitEquationStrategy () |
virtual void | setupSolutionVector (tbox::Pointer< solv::SAMRAIVectorReal< DIM, double > > solution)=0 |
virtual double | getInitialDt ()=0 |
virtual double | getNextDt (const bool good_solution, const int solver_retcode)=0 |
virtual void | setInitialGuess (const bool first_step, const double current_time, const double current_dt, const double old_dt)=0 |
virtual bool | checkNewSolution (const int solver_retcode)=0 |
virtual void | updateSolution (const double new_time)=0 |
This is an abstract base class defining the interface between ImplicitIntegrator<DIM> object and routines specific to the system of equations to be solved. These methods include defining the components which comprise the state of the nonlinear solution vector, computing time increments used in the implicit integration process, testing whether a newly computed solution is acceptable, etc. The interface follows the Strategy design pattern. The methods declared in the interface are provided in a user-supplied concrete equation class derived from this base class.
|
Empty constructor for ImplicitEquationStrategy<DIM>. |
|
Empty destructor for ImplicitEquationStrategy<DIM> |
|
Add components to the solution vector to define the state of the solution for the implicit time integrator. |
|
Return time increment for advancing the solution at the first timestep. |
|
Return time increment for next solution advance based on the arguments provided. The boolean argument good_solution is the return value from the checkNewSolution() routine. It should be assumed that that routine is invoked prior to a call to this function. The integer argument solver_retcode is the return code generated by the nonlinear solver package that computed the solution. It is the responsibility of the subclass of this base class to interpret the arguments properly when determining the time step. |
|
Set initial guess for time advanced solution vector. The first_step is true if the subsequent time advance is the first in the simulation, or if it immediately follows a regridding of the patch hierarchy. In either case, extrapolation of the solution may not be possible since there may be no old solution to use. Otherwise, first_step is false. The current_time argument is the current solution time. The current_dt and old_dt arguments represent the time increments used in the cuurent and previous advances, respectively. Thus, the new integration time to which we will attempt to advance the solution will be current_time + current_dt. |
|
Return true if the most recently computed time advanced solution is acceptable. Otherwise, return false. The integer argument is the return code generated by the nonlinear solver package that computed the solution. It is the responsibility of the subclass of this base class to interpret that return code properly. |
|
Assuming that an acceptable time advanced solution has been found, update the state of the solution (e.g., reset solution pointers) and all dependent variables. The argument is the integration time to which the new solution corresponds. |