Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 176 additions & 39 deletions libs/Theseus/src/imex/tableau.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,81 @@ struct IMEXButcher{T1 <: AbstractArray, T2 <: AbstractArray} <: RKTableau
c_im::T2
end

"""
SP111()

The symplectic Euler method, a first-order, one-stage type I IMEX method
combining an explicit and an implicit Euler method.

## References
- Sebastiano Boscarino and Giovanni Russo (2024)
*Asymptotic preserving methods for quasilinear hyperbolic systems with stiff relaxation: a review.*
[DOI: 10.1007/s40324-024-00351-x](https://doi.org/10.1007/s40324-024-00351-x)
"""
struct SP111 <: RKIMEX{1} end
function RKTableau(alg::SP111, RealT)
nstage = 1
a = zeros(RealT, nstage, nstage)
b = zeros(RealT, nstage)
b[1] = 1
c = zeros(RealT, nstage)
a_im = zeros(RealT, nstage, nstage)
a_im[1, 1] = 1
b_im = zeros(RealT, nstage)
b_im[1] = 1
c_im = zeros(RealT, nstage)
c_im[1] = 1
return IMEXButcher(a, b, c, a_im, b_im, c_im)
end

"""
H222()

A second-order, two-stage type I IMEX method.
The explicit part is strong stability preserving (SSP), the implicit part
is A-stable but not L-stable.

## References
- Sebastiano Boscarino, Lorenzo Pareschi, and Giovanni Russo (2025)
Implicit-explicit methods for evolutionary partial differential equations.
[DOI: 10.1137/1.9781611978209](https://doi.org/10.1137/1.9781611978209)
"""
struct H222 <: RKIMEX{2} end
function RKTableau(alg::H222, RealT)
nstage = 2
a = zeros(RealT, nstage, nstage)
a[2, 1] = 1
b = zeros(RealT, nstage)
b[1] = 1 // 2
b[2] = 1 // 2
c = zeros(RealT, nstage)
c[2] = 1
a_im = zeros(RealT, nstage, nstage)
a_im[1, 1] = 1 // 2
a_im[2, 2] = 1 // 2
b_im = zeros(RealT, nstage)
b_im[1] = 1 // 2
b_im[2] = 1 // 2
c_im = zeros(RealT, nstage)
c_im[1] = 1 // 2
c_im[2] = 1 // 2
return IMEXButcher(a, b, c, a_im, b_im, c_im)
end

"""
SSP2222()

A second-order type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
A second-order, two-stage type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
is L-stable.

## References
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
[DOI: 10.1007/s10915-004-4636-4](https://doi.org/10.1007/s10915-004-4636-4)
- Sebastiano Boscarino and Giovanni Russo (2024)
*Asymptotic preserving methods for quasilinear hyperbolic systems with stiff relaxation: a review.*
- Sebastiano Boscarino and Giovanni Russo (2024)
*Asymptotic preserving methods for quasilinear hyperbolic systems with stiff relaxation: a review.*
[DOI: 10.1007/s40324-024-00351-x](https://doi.org/10.1007/s40324-024-00351-x)
"""
struct SSP2222 <: RKIMEX{2} end
Expand Down Expand Up @@ -52,14 +112,14 @@ end
"""
SSP2322()

A second-order type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
A second-order, three-stage type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
is stiffly accurate (SA) and thus L-stable.

## References
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
[DOI: 10.1007/s10915-004-4636-4](https://doi.org/10.1007/s10915-004-4636-4)
"""
struct SSP2322 <: RKIMEX{3} end
Expand Down Expand Up @@ -91,17 +151,17 @@ end
"""
SSP2332()

A second-order type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
A second-order, three-stage type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
is stiffly accurate (SA) and thus L-stable.

## References
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
[DOI: 10.1007/s10915-004-4636-4](https://doi.org/10.1007/s10915-004-4636-4)
- Sebastiano Boscarino and Giovanni Russo (2024)
*Asymptotic preserving methods for quasilinear hyperbolic systems with stiff relaxation: a review.*
- Sebastiano Boscarino and Giovanni Russo (2024)
*Asymptotic preserving methods for quasilinear hyperbolic systems with stiff relaxation: a review.*
[DOI: 10.1007/s40324-024-00351-x](https://doi.org/10.1007/s40324-024-00351-x)
"""
struct SSP2332 <: RKIMEX{3} end
Expand Down Expand Up @@ -139,14 +199,14 @@ end
"""
SSP3332()

A third-order type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
is L-stable.
A second-order, three-stage type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP) and third-order accurate,
the implicit part is L-stable.

## References
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
[DOI: 10.1007/s10915-004-4636-4](https://doi.org/10.1007/s10915-004-4636-4)
"""
struct SSP3332 <: RKIMEX{3} end
Expand Down Expand Up @@ -185,17 +245,17 @@ end
"""
SSP3433()

A third-order type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP), the implicit part
is L-stable.
A third-order, four-stage type I IMEX method developed by Pareschi and Russo (2005).
The explicit part is strong stability preserving (SSP) and third-order accurate,
the implicit part is L-stable.

## References
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
- Lorenzo Pareschi and Giovanni Russo (2005)
*Implicit–Explicit Runge–Kutta schemes and applications to hyperbolic systems with relaxation.*
*Journal of Computational Physics* 203(2):469–491.
[DOI: 10.1007/s10915-004-4636-4](https://doi.org/10.1007/s10915-004-4636-4)
- Sebastiano Boscarino and Giovanni Russo (2024)
*Asymptotic preserving methods for quasilinear hyperbolic systems with stiff relaxation: a review.*
- Sebastiano Boscarino and Giovanni Russo (2024)
*Asymptotic preserving methods for quasilinear hyperbolic systems with stiff relaxation: a review.*
[DOI: 10.1007/s40324-024-00351-x](https://doi.org/10.1007/s40324-024-00351-x)
"""
struct SSP3433 <: RKIMEX{4} end
Expand Down Expand Up @@ -237,11 +297,44 @@ function RKTableau(alg::SSP3433, RealT)
return IMEXButcher(a, b, c, a_im, b_im, c_im)
end

"""
HT222()

A second-order, two-stage type II IMEX method.
The explicit part is strong stability preserving (SSP), the implicit part
is A-stable but not L-stable.

## References
- Sebastiano Boscarino, Lorenzo Pareschi, and Giovanni Russo (2025)
Implicit-explicit methods for evolutionary partial differential equations.
[DOI: 10.1137/1.9781611978209](https://doi.org/10.1137/1.9781611978209)
"""
struct HT222 <: RKIMEX{2} end
function RKTableau(alg::HT222, RealT)
nstage = 2
a = zeros(RealT, nstage, nstage)
a[2, 1] = 1
b = zeros(RealT, nstage)
b[1] = 1 // 2
b[2] = 1 // 2
c = zeros(RealT, nstage)
c[2] = 1
a_im = zeros(RealT, nstage, nstage)
a_im[2, 1] = 1 // 2
a_im[2, 2] = 1 // 2
b_im = zeros(RealT, nstage)
b_im[1] = 1 // 2
b_im[2] = 1 // 2
c_im = zeros(RealT, nstage)
c_im[2] = 1
return IMEXButcher(a, b, c, a_im, b_im, c_im)
end

"""
ARS111()

A first-order, globally stiffly accurate (GSA) type II IMEX method developed by
Ascher, Ruuth, and Spiteri (1997).
A first-order, effectively one-stage, globally stiffly accurate (GSA) type II IMEX method
developed by Ascher, Ruuth, and Spiteri (1997).

## References

Expand Down Expand Up @@ -279,8 +372,8 @@ end
"""
ARS222()

A second-order, globally stiffly accurate (GSA) type II IMEX method developed by
Ascher, Ruuth, and Spiteri (1997).
A second-order, effectively two-stage, globally stiffly accurate (GSA) type II IMEX method
developed by Ascher, Ruuth, and Spiteri (1997).

## References

Expand Down Expand Up @@ -325,11 +418,55 @@ function RKTableau(alg::ARS222, RealT)
return IMEXButcher(a, b, c, a_im, b_im, c_im)
end

"""
ARS233()

A third-order, effectively three-stage type II IMEX method
developed by Ascher, Ruuth, and Spiteri (1997).
The implicit part is A-stable but not L-stable.

## References

- Uri M. Ascher, Steven J. Ruuth, and Raymond J Spiteri (1997)
Implicit-explicit Runge-Kutta methods for time-dependent
partial differential equations.
[DOI: 10.1016/S0168-9274(97)00056-1](https://doi.org/10.1016/S0168-9274(97)00056-1)
- Sebastiano Boscarino, Lorenzo Pareschi, and Giovanni Russo (2025)
Implicit-explicit methods for evolutionary partial differential equations.
[DOI: 10.1137/1.9781611978209](https://doi.org/10.1137/1.9781611978209)
"""
struct ARS233 <: RKIMEX{3} end
function RKTableau(alg::ARS233, RealT)
nstage = 3
gamma = (3 + sqrt(3)) / 6
a = zeros(RealT, nstage, nstage)
a[2, 1] = gamma
a[3, 1] = gamma - 1
a[3, 2] = 2 * (1 - gamma)
b = zeros(RealT, nstage)
b[2] = 1 // 2
b[3] = 1 // 2
c = zeros(RealT, nstage)
c[2] = gamma
c[3] = 1 - gamma
a_im = zeros(RealT, nstage, nstage)
a_im[2, 2] = gamma
a_im[3, 2] = 1 - 2 * gamma
a_im[3, 3] = gamma
b_im = zeros(RealT, nstage)
b_im[2] = 1 // 2
b_im[3] = 1 // 2
c_im = zeros(RealT, nstage)
c_im[2] = gamma
c_im[3] = 1 - gamma
return IMEXButcher(a, b, c, a_im, b_im, c_im)
end

"""
ARS443()

A third-order, globally stiffly accurate (GSA) type II IMEX method developed by
Ascher, Ruuth, and Spiteri (1997).
A third-order, effectively four-stage, globally stiffly accurate (GSA) type II IMEX method
developed by Ascher, Ruuth, and Spiteri (1997).

## References

Expand Down
Loading
Loading