desolver.integrators package

Submodules

desolver.integrators.integration_schemes module

desolver.integrators.integrator_template module

class desolver.integrators.integrator_template.IntegratorTemplate

Bases: ABC

property adaptation_fn
abstract dense_output()
get_error_estimate()
property is_adaptive
order = None
symplectic = False
update_timestep(ignore_custom_adaptation=False)
class desolver.integrators.integrator_template.RichardsonIntegratorTemplate

Bases: IntegratorTemplate, ABC

property adaptive
symplectic = False

desolver.integrators.integrator_types module

class desolver.integrators.integrator_types.ExplicitSymplecticIntegrator(sys_dim, dtype=None, staggered_mask=None, rtol=None, atol=None, device=None)

Bases: TableauIntegrator

A base class for all symplectic numerical integration methods.

A ExplicitSymplecticIntegrator derived object corresponds to a numerical integrator tailored to a particular dynamical system with an integration scheme defined by the sequence of drift-kick coefficients in tableau.

An explicit symplectic integrator may be considered as a sequence of carefully picked drift and kick stages that build off the previous stage which is the implementation considered here. A masking array of indices indicates the drift and kick variables that are updated at each stage.

In a system defined by a Hamiltonian of q and p (generalised position and generalised momentum respectively), the drift stages update q and the kick stages update p. For a conservative Hamiltonian, a symplectic method will minimise the drift in the Hamiltonian during the integration.

tableau

A numpy array with N stages and 3 entries per stage where the first column is the timestep fraction and the remaining columns are the drift/kick coefficients.

Type:

numpy array, shape (N, N+1)

symplectic

True if the method is symplectic.

Type:

bool

dense_output()
step(rhs, initial_time, initial_state, constants, timestep)
symplectic = True
class desolver.integrators.integrator_types.RungeKuttaIntegrator(sys_dim, dtype, rtol=None, atol=None, device=None)

Bases: TableauIntegrator, ABC

algebraic_system(next_state, rhs, initial_time, initial_state, timestep, constants)
algebraic_system_jacobian(next_state, rhs, initial_time, initial_state, timestep, constants)
get_error_estimate()
step(rhs, initial_time, initial_state, constants, timestep)
tableau_final = None
desolver.integrators.integrator_types.generate_richardson_integrator(basis_integrator, richardson_iter=2)

A function for generating an integrator that uses local Richardson Extrapolation to find the change in state ΔY over a timestep h by estimating lim ΔY as h->0.

Takes any integrator as input and returns a specialisation of the RichardsonExtrapolatedIntegrator class that uses basis_integrator as the underlying integration mechanism.

Parameters:

basis_integrator (A subclass of IntegratorTemplate or a class that implements the methods and attributes of IntegratorTemplate.)

Returns:

returns the Richardson Extrapolated specialisation of basis_integrator

Return type:

RichardsonExtrapolatedIntegrator

Module contents

desolver.integrators.available_methods(names=True)
desolver.integrators.explicit_methods()
desolver.integrators.implicit_methods()