# Time_Integration¶

## Time Integrators’ Base Class¶

class TimeIntegratorBase(options_dict=None)

Bases: object

Base class defining the time integration process.

Time Integrator constructor.

Parameters: model – Model Object options_dict – Dictionary object with all time integration objects Support configurations: ‘model’: None, ‘initial_state’: None, ‘checkpoints’: None, ‘initial_time’: None, ‘final_time’: None, ‘step_size’: None, ‘rel_tol’: 1e-3, ‘abs_tol’: 1e-3, ‘int_method’: 0, ‘adaptive_stepping’: False, ‘fixed_stepping’: True

Methods

__init__(options_dict=None)
integrate(initial_state=None, checkpoints=None, step_size=None, rel_tol=None, abs_tol=None)

Integrates forward in time with a variable timestep with relative, rel_tol, and absolute, abs_tol, tolerances between checkpoints(i) and checkpoints(i+1).

Parameters: initial_state – initial state of the model checkpoints – out times for the model states. This list of model states corresponds to the times in checkpoints. step_size – time integration step size. rel_tol – relative tolerance for adaptive integration abs_tol – absolute tolerance for adaptive integration A list of solution vectors corresponding to the times specified in checkpoints or self._checkpoints soln_state
set_coeffs()

set method coefficients

set_options(options_dict)

Set the options of the time integrators. If only a single dictionary is provided, update current dictionary with new values, otherwise reconcile with the default options dictionary. Then update class variables with the provided / reconciled dictionary values.

Parameters: options_dict – a dictionary object with the following keys: model – The model object to be integrated forward in time. initial_state – initial state of the model. initial_time – initial model time. final_time – final model time. step_size – time integration step size. rel_tol – relative tolerance for adaptive integration. abs_tol – absolute tolerance for adaptive integration. int_method – a key corresponding to the integration method chosen. adaptive_stepping – A boolean value, that forces use of adaptive time stepping. fixed_stepping – A boolean value, that forces use of fixed time stepping. def_options_dict (optional) – a dictionary object with same keys as above.
sub_iterate(local_t0, local_tf)

Integrates across a single subinterval of the time integration window.

Parameters: local_t0 – beginning time of local integration window. local_tf – end time of local integration window. solution at local_tf soln_state