Skip to content

Commit

Permalink
Merge branch 'main' into reset
Browse files Browse the repository at this point in the history
  • Loading branch information
visr authored Oct 7, 2024
2 parents 377e769 + e9339b8 commit 907ee0e
Show file tree
Hide file tree
Showing 16 changed files with 2,300 additions and 2,586 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core_testmodels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cache-registries: "true"
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Prepare pixi
run: pixi run install-ci
- name: Run testmodels with Ribasim Core
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cache-registries: "true"
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Test Ribasim Core
run: |
pixi run test-ribasim-core-cov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cache-registries: "true"
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Prepare pixi
run: pixi run install-ci

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/julia_auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Update Julia manifest file
run: |
pixi run install-julia
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Run mypy on python/ribasim
run: |
pixi run mypy-ribasim-python
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pixi_auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- name: Set up pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.30.0
run-install: false
- name: Update lockfiles
run: |
Expand All @@ -31,7 +32,7 @@ jobs:
commit-message: Update pixi lockfile
title: Update pixi lockfile
body-path: diff.md
branch: update-pixi
branch: update/pixi-lock
base: main
delete-branch: true
add-paths: pixi.lock
2 changes: 1 addition & 1 deletion .github/workflows/python_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Test if codegen runs without errors
run: pixi run codegen
- name: Ensure that no code has been generated
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Test Ribasim Python
run: pixi run --environment ${{ matrix.pixi-environment }} test-ribasim-python-cov
- name: Upload coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qgis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
pixi-version: v0.30.0
- name: Run tests
run: pixi run test-ribasim-qgis-docker
- name: Upload coverage to Codecov
Expand Down
12 changes: 8 additions & 4 deletions core/src/config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ using OrdinaryDiffEqNonlinearSolve: NLNewton
using OrdinaryDiffEqLowOrderRK: Euler, RK4
using OrdinaryDiffEqTsit5: Tsit5
using OrdinaryDiffEqSDIRK: ImplicitEuler, KenCarp4, TRBDF2
using OrdinaryDiffEqBDF: QNDF
using OrdinaryDiffEqRosenbrock: Rodas5, Rosenbrock23
using OrdinaryDiffEqBDF: FBDF, QNDF
using OrdinaryDiffEqRosenbrock: Rosenbrock23, Rodas4P, Rodas5P

export Config, Solver, Results, Logging, Toml
export algorithm,
Expand Down Expand Up @@ -213,9 +213,11 @@ Map from config string to a supported algorithm type from [OrdinaryDiffEq](https
Supported algorithms:
- `QNDF`
- `FBDF`
- `Rosenbrock23`
- `TRBDF2`
- `Rodas5`
- `Rodas4P`
- `Rodas5P`
- `KenCarp4`
- `Tsit5`
- `RK4`
Expand All @@ -224,9 +226,11 @@ Supported algorithms:
"""
const algorithms = Dict{String, Type}(
"QNDF" => QNDF,
"FBDF" => FBDF,
"Rosenbrock23" => Rosenbrock23,
"TRBDF2" => TRBDF2,
"Rodas5" => Rodas5,
"Rodas4P" => Rodas4P,
"Rodas5P" => Rodas5P,
"KenCarp4" => KenCarp4,
"Tsit5" => Tsit5,
"RK4" => RK4,
Expand Down
2 changes: 1 addition & 1 deletion core/test/run_models_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ end
@test sparse_fdm.integrator.u sparse_ad.integrator.u atol = 4
@test dense_fdm.integrator.u sparse_ad.integrator.u atol = 4

config = Ribasim.Config(toml_path; solver_algorithm = "Rodas5", solver_autodiff = true)
config = Ribasim.Config(toml_path; solver_algorithm = "Rodas5P", solver_autodiff = true)
time_ad = Ribasim.run(config)
@test successful_retcode(time_ad)
@test time_ad.integrator.u sparse_ad.integrator.u atol = 10
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/usage.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If your model does not converge, or your performance is lower than expected, it

The default solver `algorithm = "QNDF"`, which is a multistep method similar to Matlab's `ode15s` [@shampine1997matlab].
It is an implicit method that supports the default adaptive timestepping.
The full list of available solvers is: `QNDF`, `Rosenbrock23`, `TRBDF2`, `Rodas5`, `KenCarp4`, `Tsit5`, `RK4`, `ImplicitEuler`, `Euler`.
The full list of available solvers is: `QNDF`, `FBDF`, `Rosenbrock23`, `Rodas4P`, `Rodas5P`, `TRBDF2`, `KenCarp4`, `Tsit5`, `RK4`, `ImplicitEuler`, `Euler`.
Information on the solver algorithms can be found on the [ODE solvers page](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/).

By default Ribasim uses adaptive timestepping, though not all algorithms support adaptive timestepping.
Expand Down
Loading

0 comments on commit 907ee0e

Please sign in to comment.