You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* no runtime-dispatch for MPDeC + StaticArrays and first benchmarks npzd model
* order reduction in convergence benchmark
* MPDeC in NPZD benchmark
* MPDeC in NPZD benchmark
* bugfix
* mpded in npzd and robertson benchmark
* increased MPDeC default small_constant to run stratospheric reaction benchmark with constant time steps
* bugfix
* mpdec in stratospheric reaction benchmark
* minor changes
* Apply suggestions from code review
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
* compat entry for DoubleFloats
* removed function sqmtr
* format
---------
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
The PDS is conservative since the sum of the right-hand side terms equals zero.
17
-
An implementation of the problem is given next.
18
+
An implementation of this problem is given next.
18
19
19
20
20
21
```@example eoc
@@ -29,94 +30,102 @@ nothing # hide
29
30
30
31
To use `analyticless_test_convergence` from [DiffEqDevTools.jl](https://github.com/SciML/DiffEqDevTools.jl), we need to pick a solver to compute the reference solution and specify tolerances.
31
32
Since the problem is not stiff, we use the high-order explicit solver `Vern9()` from [OrdinaryDiffEqVerner.jl](https://docs.sciml.ai/OrdinaryDiffEq/stable/).
32
-
Moreover, we choose time step sizes to investigate the convergence behavior.
33
-
34
33
```@example eoc
35
34
using OrdinaryDiffEqVerner
36
35
using DiffEqDevTools: analyticless_test_convergence
37
36
38
37
# solver and tolerances to compute reference solution
To keep the code short, we also define an auxiliary function that outputs a convergence table, which lists the errors obtained with the respective time step size ``Δ t`` as well as the estimated order of convergence in parentheses.
The table shows that all schemes converge as expected.
84
96
85
-
### Third-order MPRK schemes
97
+
### Higher-order MPRK schemes
86
98
87
-
In this section, we proceed as above, but consider third-order MPRK schemes instead.
99
+
To actually see the order of higher-order methods we need to use more accurate floating-point numbers. Here, we use [`DoubleFloats`](https://github.com/JuliaMath/DoubleFloats.jl).
It was shown in [Torlo, Öffner, Ranocha: Issues with positivity-preserving Patankar-type schemes with positivity-preserving Patankar-type schemes](https://doi.org/10.1016/j.apnum.2022.07.014) that some MPRK methods
174
+
suffer from order reduction if the solution of the PDS is too close to zero.
175
+
We demonstrate this by solving a problem where one component of the initial condition is equal to zero.
176
+
177
+
The problem is
178
+
179
+
```math
180
+
\begin{aligned}
181
+
u_1' &= -u_1, & u_1(0)&=1, \\
182
+
u_2' & = u_1, & u_2(0)&=0,
183
+
\end{aligned}
184
+
```
185
+
186
+
for ``0≤ t≤ 1`` and can be implemented as follows.
187
+
166
188
167
189
```@example eoc
168
-
# compute errors and experimental order of convergence
0 commit comments