Skip to content

Commit

Permalink
Separate code for master thesis from package (#69)
Browse files Browse the repository at this point in the history
* separate code for master thesis from package

* remove visualization folder from format path
  • Loading branch information
JoshuaLampert authored Nov 20, 2023
1 parent 5e1f36e commit aeb4d89
Show file tree
Hide file tree
Showing 14 changed files with 6 additions and 1,178 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install JuliaFormatter and format
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(["src", "test", "examples", "visualization"], verbose = true)'
julia -e 'using JuliaFormatter; format(["src", "test", "examples"], verbose = true)'
- name: Format check
run: |
julia -e '
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ e.g., `include(joinpath(examples_dir(), "svaerd_kalisch_1d", "svaerd_kalisch_1d_

## Authors

The package is developed and maintained by Joshua Lampert and was initiated as part of the master thesis "Structure-Preserving Numerical Methods for Dispersive Shallow Water Models" (2023).
The package is developed and maintained by Joshua Lampert (University of Hamburg).
Some parts of this repository are based on parts of [Dispersive-wave-schemes-notebooks. A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations](https://github.com/ranocha/Dispersive-wave-schemes-notebooks)
by Hendrik Ranocha, Dimitrios Mitsotakis and David Ketcheson. The code structure is inspired by [Trixi.jl](https://github.com/trixi-framework/Trixi.jl/).

Expand Down
1 change: 0 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ makedocs(;
pages = [
"Home" => "index.md",
"Overview" => "overview.md",
"Reproduce figures" => "reproduce.md",
"Reference" => "ref.md",
"License" => "license.md",
])
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ e.g., `include(joinpath(examples_dir(), "svaerd_kalisch_1d", "svaerd_kalisch_1d_

# Authors

The package is developed and maintained by Joshua Lampert and was initiated as part of the master thesis "Structure-Preserving Numerical Methods for Dispersive Shallow Water Models" (2023).
The package is developed and maintained by Joshua Lampert (University of Hamburg).
Some parts of this repository are based on parts of [Dispersive-wave-schemes-notebooks. A Broad Class of Conservative Numerical Methods for Dispersive Wave Equations](https://github.com/ranocha/Dispersive-wave-schemes-notebooks)
by Hendrik Ranocha, Dimitrios Mitsotakis and David Ketcheson. The code structure is inspired by [Trixi.jl](https://github.com/trixi-framework/Trixi.jl/).

Expand Down
5 changes: 3 additions & 2 deletions docs/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ end
gif(anim, "shoaling_solution.gif", fps = 25)
```

It is also possible to plot the solution variables at a fixed spatial point over time by calling `plot(semi => sol, x)` for some `x`-value, see [plot_examples.jl](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/blob/main/visualization/plot_examples.jl) for some examples.
It is also possible to plot the solution variables at a fixed spatial point over time by calling `plot(semi => sol, x)` for some `x`-value, see [plot_examples.jl](https://github.com/JoshuaLampert/2023-master-thesis/blob/main/code/plot_examples.jl) from
the reproducibility repository of the master thesis of Joshua Lampert for some examples.

Often, it is interesting to have a look at how the quantities that are recorded by the `AnalysisCallback` evolve in time. To this end, you can `plot` the `AnalysisCallback` by

Expand Down Expand Up @@ -224,7 +225,7 @@ For more details see also the [documentation of SummationByPartsOperators.jl](ht

Some more examples sorted by the simulated equations can be found in the [examples/](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/tree/main/examples) subdirectory. Especially, in [examples/svaerd\_kalisch\_1d/](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/tree/main/examples/svaerd_kalisch_1d) you can find Julia scripts that solve the [`SvaerdKalischEquations1D`](@ref) that were not covered in this tutorial. The same steps as described above, however, apply in the same way to these equations. Attention must be paid for these equations because they do not conserve the classical total entropy ``\mathcal E``, but a modified entropy ``\hat{\mathcal E}``, available as [`entropy_modified`](@ref).

More examples, especially focussing on plotting, can be found in the scripts [create_figures.jl](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/blob/main/visualization/create_figures.jl) and [plot_examples.jl](https://github.com/JoshuaLampert/DispersiveShallowWater.jl/blob/main/visualization/plot_examples.jl).
More examples, especially focussing on plotting, can be found in the scripts [create_figures.jl](https://github.com/JoshuaLampert/2023-master-thesis/blob/main/code/create_figures.jl) and [plot_examples.jl](https://github.com/JoshuaLampert/2023-master-thesis/blob/main/code/plot_examples.jl) from the reproducibility repository of the master thesis of Joshua Lampert.

## References

Expand Down
19 changes: 0 additions & 19 deletions docs/src/reproduce.md

This file was deleted.

16 changes: 0 additions & 16 deletions src/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,6 @@ function default_example()
"bbm_bbm_variable_bathymetry_1d_basic.jl")
end

"""
path_create_figures()
Return the path to the file that creates all figures used in the master thesis "Structure-preserving
Numerical Methods for Dispersive Shallow Water Model" (2023). Executing this julia script may take a
while.
# Examples
```@example
include(DispersiveShallowWater.path_create_figures())
```
"""
function path_create_figures()
pkgdir(DispersiveShallowWater, "visualization", "create_figures.jl")
end

# Note: We can't call the method below `DispersiveShallowWater.include` since that is created automatically
# inside `module DispersiveShallowWater` to `include` source files and evaluate them within the global scope
# of `DispersiveShallowWater`. However, users will want to evaluate in the global scope of `Main` or something
Expand Down
1 change: 0 additions & 1 deletion test/test_unit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ using SparseArrays: sparse, SparseMatrixCSC

@testset "util" begin
@test_nowarn get_examples()
@test_nowarn DispersiveShallowWater.path_create_figures()
@test_nowarn trixi_include(default_example(), tspan = (0.0, 0.1))

accuracy_orders = [2, 4, 6]
Expand Down
43 changes: 0 additions & 43 deletions visualization/bbm_bbm_1d_widestencil.jl

This file was deleted.

45 changes: 0 additions & 45 deletions visualization/bbm_bbm_variable_bathymetry_1d_upwind.jl

This file was deleted.

43 changes: 0 additions & 43 deletions visualization/bbm_bbm_variable_bathymetry_1d_widestencil.jl

This file was deleted.

Loading

0 comments on commit aeb4d89

Please sign in to comment.