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
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,11 +72,11 @@ Lastly, we define the physical domain as the interval from -130 to 20 and we cho
72
72
73
73
## Define numerical solver
74
74
75
-
In the next step, we build a [`Semidiscretization`](@ref) that bundles all ingredients for the spatial discretization of the model. Especially, we need to define a [`Solver`](@ref).
75
+
In the next step, we build a [`Semidiscretization`](@ref) that bundles all ingredients for the spatial discretization of the model. Especially, we need to define a [`Solver`](@ref).
76
76
77
77
The simplest way to define a solver when working with [`boundary_condition_periodic`](@ref) is to call the constructor by providing the mesh and a desired order of accuracy.
78
78
79
-
In the following example, we use an accuracy order of 4. The default constructor simply creates periodic first-, second-, and third-derivative central finite difference summation-by-parts (SBP) operators of the provided order of accuracy.
79
+
In the following example, we use an accuracy order of 4. The default constructor simply creates periodic first-, second-, and third-derivative central finite difference summation-by-parts (SBP) operators of the provided order of accuracy.
80
80
81
81
How to use other summation-by-parts operators, is described in the section on [how to customize the solver](@ref customize_solver). Note that for non-periodic boundary conditions, the solver also needs to be created with non-periodic
82
82
operators, see, e.g. [examples/bbm\_bbm\_1d/bbm\_bbm\_1d\_basic\_reflecting.jl](https://github.com/NumericalMathematics/DispersiveShallowWater.jl/blob/main/examples/bbm_bbm_1d/bbm_bbm_1d_basic_reflecting.jl).
@@ -127,11 +127,10 @@ 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 not the initial (analytical) solution.
131
131
132
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.
133
133
134
-
135
134
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 waterheight ``\eta`` and not also the velocity ``v``. More on tutorials for plotting can be found in the chapter [Plotting Simulation Results](@ref plotting).
136
135
137
136
```@example overview
@@ -150,7 +149,6 @@ It is also possible to plot the solution variables at a fixed spatial point over
150
149
151
150
More examples sorted by the simulated equations can be found in the [examples/](https://github.com/NumericalMathematics/DispersiveShallowWater.jl/tree/main/examples) subdirectory.
152
151
153
-
154
152
## [Plain program](@id overview-plain-program)
155
153
156
154
Here follows a version of the program without any comments.
Copy file name to clipboardExpand all lines: docs/src/callbacks.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,15 @@
1
1
# Callbacks
2
2
3
3
Callbacks provide additional functionality during simulations, such as monitoring solution properties, analyzing errors, or ensuring conservation of physical quantities.
4
-
[DispersiveShallowWater.jl](https://github.com/NumericalMathematics/DispersiveShallowWater.jl implements three main callback types that can be used individually or in combination to enhance simulation analysis and performance monitoring.
4
+
[DispersiveShallowWater.jl](https://github.com/NumericalMathematics/DispersiveShallowWater.jl) implements three main callback types that can be used individually or in combination to enhance simulation analysis and performance monitoring.
5
5
6
6
When using multiple callbacks simultaneously, combine them using a `CallbackSet`:
More information on the usage of callbacks within the SciML framework can be found [in the documentation](https://docs.sciml.ai/DiffEqDocs/stable/features/callback_functions/).
The [`AnalysisCallback`](@ref) monitors solution quality and physical properties during the simulation. It computes error norms and tracks conservation of important physical quantities at specified time intervals.
@@ -189,4 +189,4 @@ For additional information on relaxation, how it works, and why and when it is u
Copy file name to clipboardExpand all lines: docs/src/overview.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,12 +22,11 @@ The following table provides an overview of all available equation systems and t
22
22

23
23
24
24
-``\eta``: Total water height
25
-
-``v``: Velocity in horizontal direction
25
+
-``v``: Velocity in horizontal direction
26
26
-``D``: Still-water depth
27
27
-``w``: Auxiliary variable in hyperbolic approximation (``\approx -h v_x``)
28
28
-``H``: Auxiliary variable in hyperbolic approximation (``\approx h``)
29
29
30
-
31
30
## Abstract Shallow Water Equations Interface
32
31
33
32
Several equation systems in [DispersiveShallowWater.jl](https://github.com/NumericalMathematics/DispersiveShallowWater.jl) (`BBMBBMEquations1D`, `SvaerdKalischEquations1D`, `SerreGreenNaghdiEquations1D`, and `HyperbolicSerreGreenNaghdiEquations1D`) are subtypes of [`AbstractShallowWaterEquations`](@ref). This design reflects that these systems all contain the classical shallow water equations as a subsystem, extended with additional dispersive terms.
Copy file name to clipboardExpand all lines: docs/src/plotting.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ nothing # hide
41
41
42
42
# [Plotting Simulation Results](@id plotting)
43
43
44
-
[DispersiveShallowWater.jl](https://github.com/NumericalMathematics/DispersiveShallowWater.jl) provides flexible plotting capabilities through [Plots.jl](https://github.com/JuliaPlots/Plots.jl) recipes. The plotting system supports various conversion functions, visualization options, and analysis tools.
44
+
[DispersiveShallowWater.jl](https://github.com/NumericalMathematics/DispersiveShallowWater.jl) provides flexible plotting capabilities through [Plots.jl](https://github.com/JuliaPlots/Plots.jl) recipes. The plotting system supports various conversion functions, visualization options, and analysis tools.
45
45
46
46
[Makie.jl](https://docs.makie.org/stable/) is not supported yet. [Contributions are welcome](https://github.com/NumericalMathematics/DispersiveShallowWater.jl/issues/220).
47
47
@@ -59,7 +59,7 @@ 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
Copy file name to clipboardExpand all lines: docs/src/solvers.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,8 @@ solver = Solver(D1, D2, D3)
42
42
```
43
43
44
44
where:
45
-
-`D1` is always required and must be an `AbstractDerivativeOperator`
45
+
46
+
-`D1` is always required and must be an `AbstractDerivativeOperator`
46
47
-`D2` and `D3` are optional and can be either `AbstractDerivativeOperator`s, `AbstractMatrix`es, or `nothing`
47
48
48
49
## Reflecting Boundary Conditions
@@ -68,6 +69,7 @@ Other possible choices for sources can be found in the [documentation of Summati
68
69
For equations that benefit from upwind discretizations (such as the Serre-Green-Naghdi equations), you can use [upwind SBP Operators](@ref upwind_sbp):
69
70
70
71
**For periodic boundary conditions:**
72
+
71
73
```julia
72
74
using SummationByPartsOperators: upwind_operators, periodic_derivative_operator
73
75
@@ -81,6 +83,7 @@ solver = Solver(D1)
81
83
```
82
84
83
85
**For reflecting boundary conditions:**
86
+
84
87
```julia
85
88
using SummationByPartsOperators: Mattsson2017, upwind_operators
0 commit comments