Skip to content

Commit 8807ee9

Browse files
authored
Theseus.jl: update gamma calculation to use RealT conversion for two ARS methods (#119)
1 parent de7695e commit 8807ee9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/Theseus/src/imex/tableau.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ struct ARS222 <: RKIMEX{3} end
393393
function RKTableau(alg::ARS222, RealT)
394394
# ARS(2,2,2) IMEX Runge-Kutta - Second order
395395
nstage = 3
396-
gamma = 1 - sqrt(2) / 2
396+
gamma = 1 - sqrt(convert(RealT, 2)) / 2
397397
delta = 1 - 1 / (2 * gamma)
398398
a = zeros(RealT, nstage, nstage)
399399
a[2, 1] = gamma
@@ -438,7 +438,7 @@ The implicit part is A-stable but not L-stable.
438438
struct ARS233 <: RKIMEX{3} end
439439
function RKTableau(alg::ARS233, RealT)
440440
nstage = 3
441-
gamma = (3 + sqrt(3)) / 6
441+
gamma = (3 + sqrt(convert(RealT, 3))) / 6
442442
a = zeros(RealT, nstage, nstage)
443443
a[2, 1] = gamma
444444
a[3, 1] = gamma - 1

0 commit comments

Comments
 (0)