Skip to content

Solver protocols¤

S = TypeVar('S') module-attribute ¤

Solution ¤

An protocol that defines expected solution types.

num_steps: int instance-attribute ¤

The number of steps taken by the solver.

solution_full: Any instance-attribute ¤

A full description of the solution (beyond 'u', e.g. for dense outputs).

t: Array instance-attribute ¤

The timepoints that the solution is expressed on.

u: S instance-attribute ¤

The IVP solution state.

This is the usually the same type as the initial condition.

Solver ¤

An protocol that defines expected solver types.

init(t, u: T_contra, *, damp: float) -> S ¤

Initialise the solver's state.

interpolate(*, t, interp_from: S, interp_to: S) -> Any ¤

Interpolate between two solver states.

interpolate_at_t1(*, t, interp_from: S, interp_to: S) -> Any ¤

Interpolate close to a checkpoint.

is_suitable_for_save_at: bool property ¤

Whether or not the solver can be used with adaptive time-stepping.

step(state: S, *, dt: float, damp: float) -> S ¤

Perform a step.

userfriendly_output(*, solution: S, solution0: S) -> S ¤

Postprocess the solution before returning.

T = TypeVar('T') module-attribute ¤

T_contra = TypeVar('T_contra', contravariant=True) module-attribute ¤

__all__ = ['Solution', 'Solver'] module-attribute ¤