File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 9494 @test_nowarn display (boundary_conditions)
9595end
9696
97+ @testitem " KdVEquation1D" setup= [Setup] begin
98+ equations = @test_nowarn @inferred KdVEquation1D (gravity = 1.0 )
99+ @test_nowarn print (equations)
100+ @test_nowarn display (equations)
101+ conversion_functions = [
102+ waterheight_total,
103+ waterheight
104+ ]
105+ for conversion in conversion_functions
106+ @test DispersiveShallowWater. varnames (conversion, equations) isa Tuple
107+ end
108+ q = [42.0 ]
109+ @test isapprox (@inferred (cons2prim (prim2cons (q, equations), equations)), q)
110+ @test @inferred (prim2prim (q, equations)) == q
111+ @test @inferred (waterheight_total (q, equations)) == 42.0
112+ @test @inferred (waterheight (q, equations)) == 43.0
113+ @test @inferred (still_water_surface (q, equations)) == 0.0
114+ @test @inferred (prim2phys (q, equations)) == @inferred (prim2prim (q, equations))
115+ end
116+
97117@testitem " BBMEquation1D" setup= [Setup] begin
98118 equations = @test_nowarn @inferred BBMEquation1D (gravity = 1.0 )
99119 @test_nowarn print (equations)
You can’t perform that action at this time.
0 commit comments