You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/basic_example.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,15 +127,19 @@ nothing # hide
127
127
128
128

129
129
130
-
By default, this will plot the bathymetry, but not the initial (analytical) solution.
130
+
By default, this will plot the bathymetry, but neither the initial nor the analytical solution.
131
131
132
-
You can adjust this by passing the boolean values `plot_bathymetry` (if `true`, always plot bathymetry in the first subplot) and `plot_initial`. Note that `plot_initial = true` will evaluate and plot the initial condition function at the same time `t` as the numerical solution being displayed (the final time by default). This means if your initial condition function represents an analytical solution, setting `plot_initial = true` will plot the analytical solution at that specific time for comparison.
132
+
You can adjust this by passing the boolean values `plot_bathymetry` (if `true`, always plot bathymetry in the first subplot),
133
+
`plot_initial`, and `plot_analytical`. Note that `plot_analytical = true` will evaluate and plot the initial condition function
134
+
at the same time `t` as the numerical solution being displayed (the final time by default). This means if your initial condition
135
+
function represents an analytical solution, setting `plot_analytical = true` will plot the analytical solution at that specific
136
+
time for comparison. On the other hand, `plot_initial = true` will always plot the initial condition at time `t = first(tspan)`.
133
137
134
138
Plotting an animation over time can, e.g., be done by the following command, which uses `step` to plot the solution at a specific time step. Here `conversion = waterheight_total` makes it so that we only look at the total water height ``\eta`` and not also the velocity ``v``. More on tutorials for plotting can be found in the chapter [Plotting Simulation Results](@ref plotting).
Copy file name to clipboardExpand all lines: docs/src/plotting.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ nothing # hide
47
47
48
48
## Variable Conversion and Visualization Options
49
49
50
-
The plotting system supports different variable conversions and visualization options. By default, the physical variables (returned by [`prim2phys`](@ref)) are plotted. For hyperbolic approximations like [`HyperbolicSerreGreenNaghdiEquations1D`](@ref), this means auxiliary variables are not plotted by default - only the physical variables from the limit system.
50
+
The plotting system supports different variable conversions and visualization options. By default, the physical variables (returned by [`prim2phys`](@ref)) are plotted. For hyperbolic approximations like [`HyperbolicSerreGreenNaghdiEquations1D`](@ref), this means auxiliary variables are not plotted by default – only the physical variables from the limit system.
51
51
52
52
You can plot conservative variables, specific physical quantities, and control what additional information is displayed:
53
53
@@ -59,8 +59,8 @@ using Plots
59
59
60
60
t = 13.37 # plot solution at (roughly) t = 13.37s
61
61
step_idx = argmin(abs.(saveat .- t)) # get the closest point to 13.37
Note that the argument `plot_initial = true` plots the initial condition evaluated at the selected time step, which means that the analytical solution is plotted if the initial condition
79
-
function describes an exact solution that varies with time.
78
+
Note that the argument `plot_analytical = true` plots the initial condition evaluated at the selected time step, which means
79
+
that the analytical solution is plotted if the initial condition function describes an exact solution that varies with time.
80
+
Similarly, `plot_initial = true` always plots the initial condition at time `t = first(tspan)`.
0 commit comments