Skip to content

Commit

Permalink
Set abstol to 1e-7 also
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Oct 7, 2024
1 parent 8a5d7db commit 74e4ed0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const nodetypes = collect(keys(nodekinds))
dtmin::Float64 = 0.0
dtmax::Union{Float64, Nothing} = nothing
force_dtmin::Bool = false
abstol::Float64 = 1e-6
abstol::Float64 = 1e-7
reltol::Float64 = 1e-7
water_balance_abstol::Float64 = 1e-3
water_balance_reltol::Float64 = 1e-2
Expand Down
2 changes: 1 addition & 1 deletion core/test/docs.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dt = 60.0 # optional, remove for adaptive time stepping
dtmin = 0.0 # optional, default 0.0
dtmax = 0.0 # optional, default length of simulation
force_dtmin = false # optional, default false
abstol = 1e-6 # optional, default 1e-6
abstol = 1e-7 # optional, default 1e-7
reltol = 1e-7 # optional, default 1e-7
water_balance_abstol = 1e-3 # optional, default 1e-3
water_balance_reltol = 1e-2 # optional, default 1e-2
Expand Down
2 changes: 1 addition & 1 deletion docs/concept/equations.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ For more a more in-depth discussion of numerical computations see [Numerical con
There are many things that can influence the calculations times, for instance:

- [Solver tolerance](https://docs.sciml.ai/DiffEqDocs/stable/basics/faq/#What-does-tolerance-mean-and-how-much-error-should-I-expect):
By default we use absolute and relative tolerances of `1e-6` and `1e-7` respectively.
By default both the absolute and relative tolerance is `1e-7`.
- [ODE solvers](https://diffeq.sciml.ai/stable/solvers/ode_solve/):
The `QNDF` method we use is robust to oscillations and massive stiffness, however other solvers should be tried as well.
- Forcing: Every time new forcing data is injected into the model, it needs to pause.
Expand Down
2 changes: 1 addition & 1 deletion python/ribasim/ribasim/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Solver(ChildModel):
If a smaller dt than dtmin is needed to meet the set error tolerances, the simulation stops, unless force_dtmin = true
(Optional, defaults to False)
abstol : float
The absolute tolerance for adaptive timestepping (Optional, defaults to 1e-6)
The absolute tolerance for adaptive timestepping (Optional, defaults to 1e-7)
reltol : float
The relative tolerance for adaptive timestepping (Optional, defaults to 1e-7)
maxiters : int
Expand Down

0 comments on commit 74e4ed0

Please sign in to comment.