ITADN

plotting : "total water elevation"

#255Openpnavaro 创建于 2025-11-18
P
pnavarocommented
When plotting the solution, the y-axis label is under some circumstances set to "total water elevation" but the curve displayed actually shows "surface elevation". The function argument is also named `waterheight_total`, which could be confusing. ```julia using OrdinaryDiffEqTsit5 using DispersiveShallowWater using Plots equations = BBMBBMEquations1D(bathymetry_type = bathymetry_flat, gravity = 9.81) initial_condition = initial_condition_convergence_test boundary_conditions = boundary_condition_periodic coordinates_min = -35.0 coordinates_max = 35.0 N = 512 mesh = Mesh1D(coordinates_min, coordinates_max, N) accuracy_order = 4 solver = Solver(mesh, accuracy_order) semi = Semidiscretization(mesh, equations, initial_condition, solver, boundary_conditions = boundary_conditions) tspan = (0.0, 30.0) ode = semidiscretize(semi, tspan) saveat = range(tspan..., length = 100) sol = solve(ode, Tsit5(), abstol = 1e-7, reltol = 1e-7, save_everystep = false, saveat = saveat) plot(semi => sol, conversion = waterheight_total, plot_bathymetry = true, suptitle = "Total Water Height", step = 100) ``` [JOSS review #9361](https://github.com/openjournals/joss-reviews/issues/9361)
9 条评论