Skip to content

Commit a9f89eb

Browse files
committed
small change to initial_condition_manufactured
1 parent 02f6aff commit a9f89eb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/equations/serre_green_naghdi_1d.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,14 @@ A smooth manufactured solution in combination with [`source_terms_manufactured`]
111111
function initial_condition_manufactured(x, t,
112112
equations::SerreGreenNaghdiEquations1D,
113113
mesh)
114-
eta = 3 + cos(pi*(2 * (x - 2 * t)))
114+
h = 3 + cos(pi*(2 * (x - 2 * t)))
115115
v = (1 + sin(pi*(2 * (x - t / 2))))
116116

117117

118-
return SVector(eta, v, 0.0)
118+
return SVector(h, v, zero(h))
119119
end
120120

121-
"""
122-
source_terms_manufactured(q, x, t, equations::SerreGreenNaghdiEquations1D, mesh)
123121

124-
A smooth manufactured solution in combination with [`initial_condition_manufactured`](@ref).
125-
"""
126122

127123
#=
128124
The source terms where calculated using a CAS, here Symbolics.jl
@@ -137,6 +133,11 @@ dv = (h * v_t - 1//3 * Dx(h^3 * v_tx) + 1//2 * g * Dx(h^2) + 1//2 * h * Dx(v^2)
137133
138134
and after this some substitutions to clean everything up.
139135
=#
136+
"""
137+
source_terms_manufactured(q, x, t, equations::SerreGreenNaghdiEquations1D, mesh)
138+
139+
A smooth manufactured solution in combination with [`initial_condition_manufactured`](@ref).
140+
"""
140141
function source_terms_manufactured(q, x, t, equations::SerreGreenNaghdiEquations1D{BathymetryFlat})
141142
g = gravity(equations)
142143

0 commit comments

Comments
 (0)