ITADN

`plot_inital = true` does not work

#254Closedpnavaro 创建于 2025-11-18
P
pnavarocommented
Hi In many situations, the plot argument `plot_inital = true` does not work and the exact solution at time t is plotted instead. ```julia using OrdinaryDiffEqTsit5 using DispersiveShallowWater using Plots equations = BBMBBMEquations1D(bathymetry_type = bathymetry_flat, gravity = 9.81) mesh = Mesh1D(-35.0, 35.0, 512) semi = Semidiscretization(mesh, equations, initial_condition_convergence_test, Solver(mesh, 4), boundary_conditions = boundary_condition_periodic) 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 = velocity, plot_initial = true, plot_bathymetry = false, suptitle = "Velocity with Initial Condition", step = 100) ``` [JOSS review #9361](https://github.com/openjournals/joss-reviews/issues/9361)
关闭于 2025-11-18 2 条评论