Skip to content

Commit 54aeeb6

Browse files
Merge #105
105: Remove old and unused imex ark algo r=charleskawczynski a=charleskawczynski This PR does a bit of house cleaning and removes some of the old imex ark algorithm pieces Co-authored-by: Charles Kawczynski <[email protected]>
2 parents aa6677c + 5a35a2b commit 54aeeb6

File tree

14 files changed

+97
-824
lines changed

14 files changed

+97
-824
lines changed

docs/src/algorithms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ ForwardEulerODEFunction
1515
## IMEX ARK methods
1616

1717
```@docs
18-
OldIMEXARKAlgorithm
19-
Oldmake_IMEXARKTableau
18+
IMEXARKAlgorithm
19+
IMEXARKTableau
2020
```
2121

2222
The convergence orders of the provided methods are verified using test cases from [ARKode](http://runge.math.smu.edu/ARKode_example.pdf). Plots of the solutions to these test cases, the errors of these solutions, and the convergence orders with respect to `dt` are shown below.

perf/flame.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ end
1717
(s, parsed_args) = parse_commandline()
1818
cts = joinpath(dirname(@__DIR__));
1919
include(joinpath(cts, "test", "problems.jl"))
20-
function do_work!(integrator, not_generated_cache)
20+
function do_work!(integrator, cache)
2121
for _ in 1:100_000
22-
CTS.not_generated_step_u!(integrator, not_generated_cache)
22+
CTS.step_u!(integrator, cache)
2323
end
2424
end
2525
problem_str = parsed_args["problem"]
@@ -30,16 +30,16 @@ elseif problem_str=="fe"
3030
else
3131
error("Bad option")
3232
end
33-
algorithm = CTS.OldIMEXARKAlgorithm(OldARS343(), NewtonsMethod(; max_iters = 2))
33+
algorithm = CTS.IMEXARKAlgorithm(ARS343(), NewtonsMethod(; max_iters = 2))
3434
dt = 0.01
3535
integrator = DiffEqBase.init(prob, algorithm; dt)
36-
not_generated_cache = CTS.not_generated_cache(prob, algorithm)
37-
do_work!(integrator, not_generated_cache) # compile first
36+
cache = CTS.cache(prob, algorithm)
37+
do_work!(integrator, cache) # compile first
3838
import Profile
3939
Profile.clear_malloc_data()
4040
Profile.clear()
4141
prof = Profile.@profile begin
42-
do_work!(integrator, not_generated_cache)
42+
do_work!(integrator, cache)
4343
end
4444

4545
import ProfileCanvas

perf/jet.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ end
1515
cts = joinpath(dirname(@__DIR__));
1616
include(joinpath(cts, "test", "problems.jl"))
1717
function config_integrators(problem)
18-
algorithm = CTS.OldIMEXARKAlgorithm(OldARS343(), NewtonsMethod(; linsolve = linsolve_direct, max_iters = 2))
18+
algorithm = CTS.IMEXARKAlgorithm(ARS343(), NewtonsMethod(; linsolve = linsolve_direct, max_iters = 2))
1919
dt = 0.01
2020
integrator = DiffEqBase.init(problem, algorithm; dt)
21-
not_generated_integrator = DiffEqBase.init(problem, algorithm; dt)
2221
integrator.cache = CTS.cache(problem, algorithm)
23-
not_generated_integrator.cache = CTS.not_generated_cache(problem, algorithm)
24-
return (; integrator_generated=integrator, not_generated_integrator)
22+
return (; integrator)
2523
end
2624
prob = if parsed_args["problem"]=="ode_fun"
2725
split_linear_prob_wfact_split()
@@ -30,8 +28,7 @@ elseif parsed_args["problem"]=="fe"
3028
else
3129
error("Bad option")
3230
end
33-
(; not_generated_integrator) = config_integrators(prob)
34-
integrator = not_generated_integrator
31+
(; integrator) = config_integrators(prob)
3532

36-
JET.@test_opt CTS.not_generated_step_u!(integrator, integrator.cache)
33+
JET.@test_opt CTS.step_u!(integrator, integrator.cache)
3734

src/ClimaTimeSteppers.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,10 @@ include("solvers/update_signal_handler.jl")
9494
include("solvers/convergence_condition.jl")
9595
include("solvers/convergence_checker.jl")
9696
include("solvers/newtons_method.jl")
97-
include("solvers/imex_ark.jl")
97+
include("solvers/imex_ark_tableaus.jl")
9898
include("solvers/imex_ark2.jl")
9999

100100
# Include concrete implementations
101-
include("solvers/imex_ark_tableaus.jl")
102101
include("solvers/multirate.jl")
103102
include("solvers/lsrk.jl")
104103
include("solvers/ssprk.jl")

src/convergence_orders.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const second_order_tableau = [
3636
#####
3737
const third_order_tableau = [
3838
ARS233,
39-
OldARS343,
4039
ARS343,
4140
ARS443,
4241
IMKG342a,

0 commit comments

Comments
 (0)