Methods Module¶
Contents¶
This is the abstract base class for all multi-step ODE methods. |
|
Sets uniform constant labels for different solution methods. |
Members¶
This module provides functions that define \(\theta\) coefficients, corresponding values of p-order / k-step, and other parameters associated with different Explicit, Implicit and Implicit + 1 methods.
Explicit methods of order \(p = k\):
Families of methods:
Adams-Bashforth: \(p \in [1, \infty]\)
EDF: \(p \in [1, \infty ]\)
Nystrom: \(p \in [2, 5]\)
EDC1: \(p \in [3, 6]\) containing EDC22, EDC23, EDC24, EDC45
EDC2: \(p \in [3, 6]\) containing EDC22, EDC23, EDC34, EDC45
EDC3: \(p \in [3, 6]\) containing EDC22, EDC33, EDC24, EDC45
EDC4: \(p \in [3, 6]\) containing EDC22, EDC33, EDC34, EDC45
Individual / single-order methods:
EDC22: p = 3
EDC23: p = 4
EDC33: p = 4
EDC24: p = 5
EDC34: p = 5
EDC45: p = 6
Implicit methods of order \(p = k\):
Families of methods:
Backward Differentiation Formula (BDF) \(p \in [1, 5]\)
Rockswold: \(p \in [2, 4]\)
Individual / single-order methods:
Kregel: p = 3
Implicit methods of order \(p = k+1\):
Families of methods:
Adams-Moulton: \(p \in [3, \infty]\)
dcBDF: \(p \in [2, \infty]\)
Note
(Version 0.9.0) dcBDF \(\theta\) values require checking as the original MATALB code has conflicting statements in this area.
IDC1: \(p \in [4, 7]\) containing IDC23, IDC24, IDC45, IDC56
IDC2: \(p \in [4, 7]\) containing IDC23, IDC34, IDC45, IDC56
Individual / single-order methods:
Milne2 p = 4
Note
(Version 0.9.0) Milne2 p = 4 source code is not implemented / quarantined. Refer to source code for explanation.
Milne4: p = 5
Note
(Version 0.9.0) Milne4 is implemented but does not appear to be stable or work with the current algorithm.
IDC23: p = 4
IDC24: p = 5
IDC34: p = 5
IDC45: p = 6
IDC56: p = 7
- class modespy.methods.Multistep(solver_type: SolverType, p_theta: Dict[int, Sequence[float]] = None)¶
Bases:
ABC
This is the abstract base class for all multi-step ODE methods.
- p_defaults(int, int)
Recommended p range (low, high).
- p_limits(int, int) or (int, None)
Absoluste p limits (low, high) or alternatively (low, None) if there is noupper limit.
Note
p_default and p_limit values must separately provided for each instance if p_theta is not supplied during creation.
- __init__(solver_type: SolverType, p_theta: Dict[int, Sequence[float]] = None)¶
- Parameters:
p_theta (Dict[int, array-like], optional) – Dict containing each order p as a key and a corresponding sequence of theta values that define the method.
- _abc_impl = <_abc._abc_data object>¶
- k(p: int) int ¶
Returns the number of steps k used by this method to generate a new point based the given order p.
- theta(p: int) ndarray ¶
Returns an array of \(\theta\) values corresponding to the given order p.