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 : gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[float]] | None, 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 : int | None, 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 : int | None, 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.
PETSC_ODE_ALPHA#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_BASICSYMPLECTIC#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_BEULER#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_CN#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_EIMEX#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_ERKIMEX#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_EULER#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_GL#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_GLEE#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_IRK#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_MPRK#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_RK#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_ROSW#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_SSP#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
PETSC_ODE_THETA*#
Note
The plugin gemseo_petsc is required.
Module: gemseo_petsc.ode.ts_library
More details about the algorithm and its settings on https://petsc.org/release/manualpages/TS/.
- Required settings
maximum_steps : <class 'int'>
Total number of time steps to run
time_step : <class 'float'>
Value of the time step.
- Optional settings
atol : <class 'float'>, optional
The absolute convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
compute_adjoint : <class 'bool'>, optional
Whether to use adjoint to compute the derivatives.
By default it is set to False.
final_time_behaviour : gemseo_petsc.ode.settings.petsc_ts_settings.FinalTimeBehavior | None, optional
- Behaviour to adopt near the final time.
For more information, see https://petsc.org/release/manualpages/TS/TSExactFinalTimeOption/
By default it is set to TS_EXACTFINALTIME_MATCHSTEP.
max_disk_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on the disk.
When zero, no maximum is set. For more information on checkpoints, see: [https://petsc4py.readthedocs.io/en/stable/manual/sensitivity_analysis/#checkpointing] Maps the PETSC.TS ts_trajectory_max_cps_disk option.
By default it is set to 0.
max_memory_checkpoints : <class 'int'>, optional
- Maximum number of checkpoints stored on in memory.
When zero, no maximum is set. Maps the PETSC.TS ts_trajectory_max_cps_ram option. When both max_memory_checkpoints and max_disk_checkpoints are set, an automatic mix checkpointing (disk and RAM) scheme is setup.
By default it is set to 0.
ode_solver_type : gemseo_petsc.ode.settings.petsc_ts_settings.ODESolverType | None, optional
The type of ODE solver.
By default it is set to PETSC_ODE_RK.
rtol : <class 'float'>, optional
The relative convergence tolerance.
Set tolerance for local truncation error when using an adaptive controller. See: [https://petsc.org/main/manualpages/TS/TSSetTolerances/]
By default it is set to 1e-06.
use_jacobian : <class 'bool'>, optional
Whether to use the jacobian of the RHS.
By default it is set to False.
use_memory_checkpoints : <class 'bool'>, optional
- Whether to store checkpoints in the RAM.
By default the checkpoints are stored on the disk as binary files. Maps the PETSC.TS ts_trajectory_type memory option.
By default it is set to False.
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 : gemseo.utils.pydantic_ndarray._NDArrayPydantic[typing.Any, numpy.dtype[float]] | None, 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.