Skip to content

Commit

Permalink
Merge #127
Browse files Browse the repository at this point in the history
127: Move ARS docs to new types, delete old imp r=charleskawczynski a=charleskawczynski

This PR:
 - Deletes the old ARS implementation
 - Moves the documentation of the tableaus to the new types
 - Adds the doc links for these types to the docs

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
  • Loading branch information
bors[bot] and charleskawczynski authored Dec 23, 2022
2 parents 7050289 + 08b338f commit c58a73d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 302 deletions.
7 changes: 6 additions & 1 deletion docs/src/algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ ARK548L2SA2KennedyCarpenter

### ARS

TODO: add `ARS111`, `ARS121`, and `ARS343` docs.
```@docs
ARS111
ARS121
ARS232
ARS343
```

## Multirate

Expand Down
1 change: 0 additions & 1 deletion src/ClimaTimeSteppers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ include("solvers/multirate.jl")
include("solvers/lsrk.jl")
include("solvers/ssprk.jl")
include("solvers/ark.jl")
# include("solvers/ars.jl") # previous implementations of ARS schemes
include("solvers/mis.jl")
include("solvers/wickerskamarock.jl")
include("solvers/rosenbrock.jl")
Expand Down
299 changes: 0 additions & 299 deletions src/solvers/ars.jl

This file was deleted.

32 changes: 31 additions & 1 deletion src/solvers/imex_ark_tableaus.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export AbstractIMEXARKTableau
export ARS111, ARS121, ARS122, ARS233, ARS232, ARS222, ARS443
export ARS111, ARS121, ARS122, ARS233, ARS232, ARS222, ARS343, ARS443
export IMKG232a, IMKG232b, IMKG242a, IMKG242b, IMKG252a, IMKG252b
export IMKG253a, IMKG253b, IMKG254a, IMKG254b, IMKG254c, IMKG342a, IMKG343a
export DBM453, HOMMEM1
Expand Down Expand Up @@ -48,13 +48,31 @@ end
# the number of explicit stages, and p is the order of accuracy

# This algorithm is equivalent to OrdinaryDiffEq.IMEXEuler.

"""
ARS111
The Forward-Backward (1,1,1) implicit-explicit (IMEX) Runge-Kutta scheme of
[ARS1997](@cite), section 2.1.
This is equivalent to the `OrdinaryDiffEq.IMEXEuler` algorithm.
"""
struct ARS111 <: AbstractIMEXARKTableau end

function tableau(::ARS111)
IMEXARKTableau(; a_exp = @SArray([0 0; 1 0]), a_imp = @SArray([0 0; 0 1]))
end

"""
ARS121
The Forward-Backward (1,2,1) implicit-explicit (IMEX) Runge-Kutta scheme of
[ARS1997](@cite), section 2.2.
This is equivalent to the `OrdinaryDiffEq.IMEXEulerARK` algorithm.
"""
struct ARS121 <: AbstractIMEXARKTableau end

function tableau(::ARS121)
IMEXARKTableau(; a_exp = @SArray([0 0; 1 0]), b_exp = @SArray([0, 1]), a_imp = @SArray([0 0; 0 1]))
end
Expand Down Expand Up @@ -88,6 +106,12 @@ function tableau(::ARS233)
)
end

"""
ARS232
The Forward-Backward (2,3,2) implicit-explicit (IMEX) Runge-Kutta scheme of
[ARS1997](@cite), section 2.5.
"""
struct ARS232 <: AbstractIMEXARKTableau end
function tableau(::ARS232)
γ = 1 - 2 / 2
Expand Down Expand Up @@ -122,6 +146,12 @@ function tableau(::ARS222)
]))
end

"""
ARS343
The L-stable, third-order (3,4,3) implicit-explicit (IMEX) Runge-Kutta scheme of
[ARS1997](@cite), section 2.7.
"""
struct ARS343 <: AbstractIMEXARKTableau end
function tableau(::ARS343)
γ = 0.4358665215084590
Expand Down

0 comments on commit c58a73d

Please sign in to comment.