Skip to content

Commit c1ed8d4

Browse files
committed
SSPRK2/3 stability tests
1 parent 7dba5fd commit c1ed8d4

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

test/runtests.jl

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,39 @@ end
3838
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
3939
@test all(Prog.u .!= 0.0f0)
4040
end
41+
42+
@testset "SSPRK2 tests" begin
43+
Prog = RunModel(time_scheme="SSPRK2",RKs=2,cfl=0.7,nstep_advcor=1)
44+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
45+
@test all(Prog.u .!= 0.0f0)
46+
47+
Prog = RunModel(time_scheme="SSPRK2",RKs=3,cfl=1.2,nstep_advcor=1)
48+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
49+
@test all(Prog.u .!= 0.0f0)
50+
51+
Prog = RunModel(time_scheme="SSPRK2",RKs=4,cfl=1.4,nstep_advcor=1)
52+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
53+
@test all(Prog.u .!= 0.0f0)
54+
55+
Prog = RunModel(time_scheme="SSPRK2",RKs=2,cfl=0.7,nstep_advcor=0)
56+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
57+
@test all(Prog.u .!= 0.0f0)
58+
59+
Prog = RunModel(time_scheme="SSPRK2",RKs=3,cfl=1.2,nstep_advcor=0)
60+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
61+
@test all(Prog.u .!= 0.0f0)
62+
63+
Prog = RunModel(time_scheme="SSPRK2",RKs=4,cfl=1.2,nstep_advcor=0)
64+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
65+
@test all(Prog.u .!= 0.0f0)
66+
end
67+
68+
@testset "SSPRK3 tests" begin
69+
Prog = RunModel(time_scheme="SSPRK3",cfl=1.2,nstep_advcor=1)
70+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
71+
@test all(Prog.u .!= 0.0f0)
72+
73+
Prog = RunModel(time_scheme="SSPRK3",cfl=1.2,nstep_advcor=0)
74+
@test all(abs.(Prog.η) .< 10) # sea surface height shouldn't exceed +-10m
75+
@test all(Prog.u .!= 0.0f0)
76+
end

0 commit comments

Comments
 (0)