Skip to content

Commit 5f348c8

Browse files
authored
Merge pull request #150 from milankl/ssprk
ssprk3 corrected stage numbering
2 parents 190566e + 6c182a5 commit 5f348c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/TimeIntegration.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ function time_integration( Prog::PrognosticVars{Tprog},
113113

114114
@unpack s,kn,mn,kna,knb,Δt_Δnc,Δt_Δn = S.constants.SSPRK3c
115115

116-
for rki = 1:s # number of stages
117-
if rki > 1
116+
for rki = 2:s+1 # number of stages (from 2:s+1 to match Ketcheson et al 2014)
117+
if rki > 2
118118
ghost_points_η!(η1,S)
119119
end
120120

@@ -147,7 +147,7 @@ function time_integration( Prog::PrognosticVars{Tprog},
147147

148148
# special stage that is needed later for the kn-th stage, store in u0,v0,η0 therefore
149149
# or for the last step, as u0,v0,η0 is used as the last step's result of any RK scheme.
150-
if rki == mn || rki == s
150+
if rki == mn || rki == s+1
151151
copyto!(u0,u1)
152152
copyto!(v0,v1)
153153
ghost_points_η!(η1,S)

0 commit comments

Comments
 (0)