Skip to content

Commit d299219

Browse files
Harsh SinghHarsh Singh
authored andcommitted
Add MREEF multirate extrapolated Euler method with tests and proper integration
1 parent 55f3a50 commit d299219

File tree

7 files changed

+662
-2191
lines changed

7 files changed

+662
-2191
lines changed
Lines changed: 16 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,22 @@
11
module OrdinaryDiffEqLowOrderRK
22

3-
import OrdinaryDiffEqCore:
4-
alg_order,
5-
isfsal,
6-
beta2_default,
7-
beta1_default,
3+
import OrdinaryDiffEqCore: alg_order, isfsal, beta2_default, beta1_default,
84
alg_stability_size,
9-
ssp_coefficient,
10-
OrdinaryDiffEqAlgorithm,
5+
ssp_coefficient, OrdinaryDiffEqAlgorithm,
116
OrdinaryDiffEqExponentialAlgorithm,
12-
explicit_rk_docstring,
13-
generic_solver_docstring,
7+
explicit_rk_docstring, generic_solver_docstring,
148
trivial_limiter!,
159
OrdinaryDiffEqAdaptiveAlgorithm,
16-
unwrap_alg,
17-
initialize!,
18-
perform_step!,
10+
unwrap_alg, initialize!, perform_step!,
1911
calculate_residuals,
20-
calculate_residuals!,
21-
_ode_addsteps!,
22-
@OnDemandTableauExtract,
12+
calculate_residuals!, _ode_addsteps!, @OnDemandTableauExtract,
2313
constvalue,
24-
OrdinaryDiffEqMutableCache,
25-
uses_uprev,
26-
OrdinaryDiffEqConstantCache,
27-
@fold,
28-
@cache,
29-
CompiledFloats,
30-
alg_cache,
31-
CompositeAlgorithm,
32-
AutoAlgSwitch,
33-
_ode_interpolant,
34-
_ode_interpolant!,
35-
full_cache,
36-
accept_step_controller,
37-
DerivativeOrderNotPossibleError,
38-
du_cache,
39-
u_cache,
40-
get_fsalfirstlast,
41-
copyat_or_push!,
42-
_unwrap_val
14+
OrdinaryDiffEqMutableCache, uses_uprev,
15+
OrdinaryDiffEqConstantCache, @fold,
16+
@cache, CompiledFloats, alg_cache, CompositeAlgorithm,
17+
AutoAlgSwitch, _ode_interpolant, _ode_interpolant!, full_cache,
18+
accept_step_controller, DerivativeOrderNotPossibleError,
19+
du_cache, u_cache, get_fsalfirstlast, copyat_or_push!, _unwrap_val
4320
using SciMLBase
4421
import MuladdMacro: @muladd
4522
import FastBroadcast: @..
@@ -64,33 +41,10 @@ include("low_order_rk_addsteps.jl")
6441
include("split_perform_step.jl")
6542
include("fixed_timestep_perform_step.jl")
6643

67-
export Euler,
68-
SplitEuler,
69-
MREEF,
70-
Heun,
71-
Ralston,
72-
Midpoint,
73-
RK4,
74-
BS3,
75-
OwrenZen3,
76-
OwrenZen4,
77-
OwrenZen5,
78-
BS5,
79-
DP5,
80-
Anas5,
81-
RKO65,
82-
FRK65,
83-
RKM,
84-
MSRK5,
85-
MSRK6,
86-
PSRK4p7q6,
87-
PSRK3p5q4,
88-
PSRK3p6q5,
89-
Stepanov5,
90-
SIR54,
91-
Alshina2,
92-
Alshina3,
93-
Alshina6,
94-
AutoDP5
44+
export Euler, SplitEuler, MREEF, Heun, Ralston, Midpoint, RK4,
45+
BS3, OwrenZen3, OwrenZen4, OwrenZen5, BS5,
46+
DP5, Anas5, RKO65, FRK65, RKM, MSRK5, MSRK6,
47+
PSRK4p7q6, PSRK3p5q4, PSRK3p6q5, Stepanov5, SIR54,
48+
Alshina2, Alshina3, Alshina6, AutoDP5
9549

9650
end

lib/OrdinaryDiffEqLowOrderRK/src/alg_utils.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ alg_stability_size(alg::DP5) = 3.3066
4141

4242
ssp_coefficient(alg::Euler) = 1
4343

44-
function prepare_alg(alg::SplitEuler, u0::AbstractArray, p, prob)
44+
function prepare_alg(
45+
alg::SplitEuler,
46+
u0::AbstractArray,
47+
p, prob
48+
)
4549
return alg
4650
end
4751

0 commit comments

Comments
 (0)