Ordinary differential equations solvers#
Warning
Some capabilities may require the installation of GEMSEO with all its features and some others may depend on plugins.
Warning
All the features of the wrapped libraries may not be exposed through GEMSEO.
Note
The algorithm settings can be passed to a function of the form
function(..., settings_model: AlgorithmSettings | None = None, **settings: Any)
either one by one:
function(..., setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)
or using the argument name "settings_model"
and the Pydantic model associated with the algorithm:
settings_model = AlgorithmSettings(setting_name_1=setting_name_1, setting_name_2=setting_name_2, ...)
function(..., settings_model=settings_model)
BDF#
Module: gemseo.algos.ode.scipy_ode.scipy_ode
Implicit multi-step variable-order (1 to 5) method based on a backward differentiation formula for the derivative approximation
from gemseo.settings.ode import BDF_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.BDF.html.
- Optional settings
atol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The absolute tolerance.
By default it is set to 1e-06.
first_step : typing.Optional[typing.Annotated[float, Gt(gt=0)]], optional
The initial step size.
If
None
, let the algorithm choose.By default it is set to None.
jac_sparsity : typing.Optional[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[float]]], optional
Sparsity structure of the Jacobian matrix.
By default it is set to None.
max_step : <class 'float'>, optional
The maximum allowed step size.
By default it is set to inf.
rtol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The relative tolerance.
By default it is set to 0.001.
DOP853#
Module: gemseo.algos.ode.scipy_ode.scipy_ode
Explicit Runge-Kutta method of order 8
from gemseo.settings.ode import DOP853_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.DOP853.html.
- Optional settings
atol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The absolute tolerance.
By default it is set to 1e-06.
first_step : typing.Optional[typing.Annotated[float, Gt(gt=0)]], optional
The initial step size.
If
None
, let the algorithm choose.By default it is set to None.
max_step : <class 'float'>, optional
The maximum allowed step size.
By default it is set to inf.
rtol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The relative tolerance.
By default it is set to 0.001.
LSODA#
Module: gemseo.algos.ode.scipy_ode.scipy_ode
Adams/BDF method with automatic stiffness detection/switching
from gemseo.settings.ode import LSODA_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.LSODA.html.
- Optional settings
atol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The absolute tolerance.
By default it is set to 1e-06.
first_step : typing.Optional[typing.Annotated[float, Gt(gt=0)]], optional
The initial step size.
If
None
, let the algorithm choose.By default it is set to None.
lband : typing.Optional[int], optional
The lower boundary of the bandwidth of the Jacobian.
The SciPy documentation does not mention what happens if
None
.By default it is set to None.
max_step : <class 'float'>, optional
The maximum allowed step size.
By default it is set to inf.
min_step : <class 'int'>, optional
Minimum allowed step size.
By default it is set to 0.
rtol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The relative tolerance.
By default it is set to 0.001.
uband : typing.Optional[int], optional
The upper boundary of the bandwidth of the Jacobian.
The SciPy documentation does not mention what happens if
None
.By default it is set to None.
RK23#
Module: gemseo.algos.ode.scipy_ode.scipy_ode
Explicit Runge-Kutta method of order 3(2)
from gemseo.settings.ode import RK23_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.RK23.html.
- Optional settings
atol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The absolute tolerance.
By default it is set to 1e-06.
first_step : typing.Optional[typing.Annotated[float, Gt(gt=0)]], optional
The initial step size.
If
None
, let the algorithm choose.By default it is set to None.
max_step : <class 'float'>, optional
The maximum allowed step size.
By default it is set to inf.
rtol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The relative tolerance.
By default it is set to 0.001.
RK45#
Module: gemseo.algos.ode.scipy_ode.scipy_ode
Explicit Runge-Kutta method of order 5(4)
from gemseo.settings.ode import RK45_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.RK45.html.
- Optional settings
atol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The absolute tolerance.
By default it is set to 1e-06.
first_step : typing.Optional[typing.Annotated[float, Gt(gt=0)]], optional
The initial step size.
If
None
, let the algorithm choose.By default it is set to None.
max_step : <class 'float'>, optional
The maximum allowed step size.
By default it is set to inf.
rtol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The relative tolerance.
By default it is set to 0.001.
Radau#
Module: gemseo.algos.ode.scipy_ode.scipy_ode
Implicit Runge-Kutta method of the Radau IIA type of order 5
from gemseo.settings.ode import Radau_Settings
More details about the algorithm and its settings on https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.Radau.html.
- Optional settings
atol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The absolute tolerance.
By default it is set to 1e-06.
first_step : typing.Optional[typing.Annotated[float, Gt(gt=0)]], optional
The initial step size.
If
None
, let the algorithm choose.By default it is set to None.
jac_sparsity : typing.Optional[gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[float]]], optional
Sparsity structure of the Jacobian matrix.
By default it is set to None.
max_step : <class 'float'>, optional
The maximum allowed step size.
By default it is set to inf.
rtol : typing.Union[typing.Annotated[float, Gt(gt=0)], gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[typing.Annotated[float, Gt(gt=0)]]]], optional
The relative tolerance.
By default it is set to 0.001.