pathsim.solvers._rungekutta module
- class pathsim.solvers._rungekutta.ExplicitRungeKutta(*solver_args, **solver_kwargs)[source]
Bases:
ExplicitSolverBase class for explicit Runge-Kutta integrators which implements the timestepping at intermediate stages and the error control if the coefficients for the local truncation error estimate are defined.
Notes
This class is not intended to be used directly!!!
- error_controller(dt)[source]
Compute scaling factor for adaptive timestep based on absolute and relative local truncation error estimate, also checks if the error tolerance is achieved and returns a success metric.
- Parameters:
dt (float) – integration timestep
- Returns:
success (bool) – timestep was successful
err (float) – truncation error estimate
scale (float) – timestep rescale from error controller
- class pathsim.solvers._rungekutta.DiagonallyImplicitRungeKutta(*solver_args, **solver_kwargs)[source]
Bases:
ImplicitSolverBase class for diagonally implicit Runge-Kutta (DIRK) integrators which implements the timestepping at intermediate stages, involving the numerical solution of the implicit update equation and the error control if the coefficients for the local truncation error estimate are defined.
Extensions and checks to also handle explicit first stages (ESDIRK) and additional final evaluation coefficients (not stiffly accurate)
Notes
This class is not intended to be used directly!!!
- error_controller(dt)[source]
Compute scaling factor for adaptive timestep based on absolute and relative local truncation error estimate, also checks if the error tolerance is achieved and returns a success metric.
- Parameters:
dt (float) – integration timestep
- Returns:
success (bool) – timestep was successful
err (float) – truncation error estimate
scale (float) – timestep rescale from error controller