From 76e2d16e66b1d47f24aa0c31619733e9e02d45fc Mon Sep 17 00:00:00 2001
From: Michael Schlottke-Lakemper
Date: Sat, 1 Apr 2023 10:33:47 +0200
Subject: [PATCH 01/54] Describe use of a `run` directory for local Trixi
development (#1379)
* Small syntax improvements
* Add description of using a `run` directory
* Update docs/src/index.md
Co-authored-by: Hendrik Ranocha
* Use single command for installation of additional tools
---------
Co-authored-by: Hendrik Ranocha
---
README.md | 23 +++++++------
docs/src/development.md | 4 +--
docs/src/index.md | 71 +++++++++++++++++------------------------
3 files changed, 45 insertions(+), 53 deletions(-)
diff --git a/README.md b/README.md
index f4bac6cc564..c99901a29c1 100644
--- a/README.md
+++ b/README.md
@@ -74,7 +74,7 @@ can install Trixi, the visualization tool
[Plots.jl](https://github.com/JuliaPlots/Plots.jl)
by executing the following commands in the Julia REPL:
```julia
-julia> import Pkg
+julia> using Pkg
julia> Pkg.add(["Trixi", "Trixi2Vtk", "OrdinaryDiffEq", "Plots"])
```
@@ -89,7 +89,7 @@ visualize Trixi's results from the REPL.
work, verify that you are using a recent Trixi release by comparing the
installed Trixi version from
```julia
-julia> import Pkg; Pkg.update("Trixi"); Pkg.status("Trixi")
+julia> using Pkg; Pkg.update("Trixi"); Pkg.status("Trixi")
```
to the [latest release](https://github.com/trixi-framework/Trixi.jl/releases/latest).
If the installed version does not match the current release, please check the
@@ -99,20 +99,25 @@ The commands above can also be used to update Trixi. A brief list of notable
changes to Trixi is available in [`NEWS.md`](NEWS.md).
### For developers
-If you plan on editing Trixi itself, you can download Trixi locally and run it from
-within the cloned directory:
+If you plan on editing Trixi itself, you can download Trixi locally and use the
+code from the cloned directory:
```bash
git clone git@github.com:trixi-framework/Trixi.jl.git
cd Trixi.jl
-julia --project=@. -e 'import Pkg; Pkg.instantiate()' # Install Trixi's dependencies
-julia -e 'import Pkg; Pkg.add(["Trixi2Vtk", "Plots"])' # Install postprocessing tools
-julia -e 'import Pkg; Pkg.add("OrdinaryDiffEq")' # Install time integration schemes
+mkdir run
+cd run
+julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Install local Trixi clone
+julia -e 'using Pkg; Pkg.add(["OrdinaryDiffEq", "Trixi2Vtk", "Plots"])' # Install additional packages
```
+Note that the postprocessing tools Trixi2Vtk.jl and Plots.jl are optional and
+can be omitted.
+
If you installed Trixi this way, you always have to start Julia with the `--project`
-flag set to your local Trixi clone, e.g.,
+flag set to your `run` directory, e.g.,
```bash
-julia --project=@.
+julia --project=.
```
+if already inside the `run` directory.
Further details can be found in the [documentation](#documentation).
diff --git a/docs/src/development.md b/docs/src/development.md
index 45e7b5bd76a..483ddc785ff 100644
--- a/docs/src/development.md
+++ b/docs/src/development.md
@@ -60,11 +60,11 @@ recompiled and thus execute much faster after the first run.
### Manually starting Trixi in the local environment
If you followed the [installation instructions for developers](@ref for-developers), execute
-Julia with the project directory set to the package directory of the
+Julia with the project directory set to the `run` directory of the
program/tool you want to use.
For example, to run Trixi this way, you need to start the REPL with
```bash
-julia --project=path/to/Trixi.jl/
+julia --project=path/to/Trixi.jl/run
```
and execute
```julia-repl
diff --git a/docs/src/index.md b/docs/src/index.md
index 7d621271c3c..f5b4d40eb71 100644
--- a/docs/src/index.md
+++ b/docs/src/index.md
@@ -68,7 +68,7 @@ can install Trixi, the visualization tool
[Plots.jl](https://github.com/JuliaPlots/Plots.jl)
by executing the following commands in the Julia REPL:
```julia
-julia> import Pkg
+julia> using Pkg
julia> Pkg.add(["Trixi", "Trixi2Vtk", "OrdinaryDiffEq", "Plots"])
```
@@ -83,7 +83,7 @@ visualize Trixi's results from the REPL.
work, verify that you are using a recent Trixi release by comparing the
installed Trixi version from
```julia
-julia> import Pkg; Pkg.update("Trixi"); Pkg.status("Trixi")
+julia> using Pkg; Pkg.update("Trixi"); Pkg.status("Trixi")
```
to the [latest release](https://github.com/trixi-framework/Trixi.jl/releases/latest).
If the installed version does not match the current release, please check the
@@ -93,52 +93,39 @@ The commands above can also be used to update Trixi. A brief list of notable
changes to Trixi is available in [`NEWS.md`](https://github.com/trixi-framework/Trixi.jl/NEWS.md).
### [For developers](@id for-developers)
-If you plan on editing Trixi itself, you have two options: installing it as a
-`dev` package or cloning it to a local folder.
-
-1. **Install Trixi as a `dev` package**: You can install Trixi as a `dev` package by running
- ```julia
- julia> import Pkg
-
- julia> Pkg.develop("Trixi")
- ```
- This will download and install Trixi to a designated package development directory
- (usually `.julia/dev`, but you can determine the path on your system with
- `Pkg.devdir()`). As opposed to using the `Pkg.add` method as described above,
- packages installed via `Pkg.develop` may have their files edited locally.
-
-2. **Install Trixi in a local folder**: Alternatively, you can download Trixi
- locally and use it from within the cloned directory:
- ```bash
- git clone git@github.com:trixi-framework/Trixi.jl.git
- cd Trixi.jl
- julia --project=@. -e 'import Pkg; Pkg.instantiate()' # Install Trixi's dependencies
- ```
- The last line can also be used to *update* the dependencies if they have changed
- since you first installed Trixi.
-
- If you installed Trixi this way, you always have to start Julia with the `--project`
- flag set to your local Trixi clone, e.g.,
- ```bash
- julia --project=@.
- ```
-
-Either way, since the postprocessing tool Trixi2Vtk typically does not need to be modified,
-it is recommended to install it as a normal package by executing
-```julia
-julia> import Pkg
-
-julia> Pkg.add("Trixi2Vtk")
+If you plan on editing Trixi itself, you can download Trixi to a local folder
+and use the code from the cloned directory:
+```bash
+git clone git@github.com:trixi-framework/Trixi.jl.git
+cd Trixi.jl
+mkdir run
+cd run
+julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))'
+```
+If you installed Trixi this way, you always have to start Julia with the `--project`
+flag set to your `run` directory, e.g.,
+```bash
+julia --project=.
```
-in the Julia REPL. Likewise, you can install
+if already inside the `run` directory.
+
+The advantage of using a separate `run` directory is that you can also add other
+related packages (see below, e.g., for time integration or visualization) to the
+project in the `run` folder and always have a reproducible environment at hand
+to share with others.
+
+Since the postprocessing tool Trixi2Vtk.jl typically does not need to be modified,
+it is recommended to install it as a normal package. Likewise, you can install
[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) and
[Plots.jl](https://github.com/JuliaPlots/Plots.jl)
-as ordinary packages with the following REPL commands:
+as ordinary packages. To achieve this, use the following REPL commands:
```julia
-julia> import Pkg
+julia> using Pkg
-julia> Pkg.add("OrdinaryDiffEq"); Pkg.add("Plots")
+julia> Pkg.add(["OrdinaryDiffEq", "Trixi2Vtk", "Plots"])
```
+Note that the postprocessing tools Trixi2Vtk.jl and Plots.jl are optional and
+can be omitted.
From dacf28ac4401eedd240ff102c6d6cb01e89e727f Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Sat, 1 Apr 2023 19:33:27 +0200
Subject: [PATCH 02/54] CompatHelper: bump compat for FillArrays to 1, (keep
existing compat) (#1380)
Co-authored-by: CompatHelper Julia
Co-authored-by: Hendrik Ranocha
---
Project.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Project.toml b/Project.toml
index 7716ead604b..8161fea6119 100644
--- a/Project.toml
+++ b/Project.toml
@@ -43,7 +43,7 @@ TriplotRecipes = "808ab39a-a642-4abf-81ff-4cb34ebbffa3"
CodeTracking = "1.0.5"
ConstructionBase = "1.3"
EllipsisNotation = "1.0"
-FillArrays = "0.13.2"
+FillArrays = "0.13.2, 1"
ForwardDiff = "0.10.18"
HDF5 = "0.14, 0.15, 0.16"
IfElse = "0.1"
From 5d1295c6cfd3a8ca8ae677bd4ba7fceb8d4ea797 Mon Sep 17 00:00:00 2001
From: Hendrik Ranocha
Date: Sun, 2 Apr 2023 12:38:51 +0200
Subject: [PATCH 03/54] set version to v0.5.15
---
Project.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Project.toml b/Project.toml
index 8161fea6119..3ce8634a31a 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper ", "Gregor Gassner ", "Hendrik Ranocha ", "Andrew R. Winters ", "Jesse Chan "]
-version = "0.5.15-pre"
+version = "0.5.15"
[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
From 5b9a431ac9b5955c5334bcd5af11d5ffd19d26e4 Mon Sep 17 00:00:00 2001
From: Hendrik Ranocha
Date: Sun, 2 Apr 2023 12:39:04 +0200
Subject: [PATCH 04/54] set development version to v0.5.16-pre
---
Project.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Project.toml b/Project.toml
index 3ce8634a31a..c42c215f2e6 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper ", "Gregor Gassner ", "Hendrik Ranocha ", "Andrew R. Winters ", "Jesse Chan "]
-version = "0.5.15"
+version = "0.5.16-pre"
[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
From 400b9ea31615bfd196ef83d5634c8ed1bd94d5e4 Mon Sep 17 00:00:00 2001
From: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Date: Wed, 5 Apr 2023 00:11:34 -0500
Subject: [PATCH 05/54] Fix `invert_jacobian!` for `GaussSBP` solver on curved
meshes (#1381)
* Fixing invert_jacobian for GaussSBP methods
* updating tests
* rename `invert_jacobian` and specialize `rhs!` for Gauss
* remove type restriction for Gauss `invert_jacobian_and_interpolate!`
* update 3d test
---
src/solvers/dgmulti/flux_differencing.jl | 1 +
.../dgmulti/flux_differencing_gauss_sbp.jl | 86 ++++++++++++++++---
test/test_dgmulti_2d.jl | 4 +-
test/test_dgmulti_3d.jl | 4 +-
4 files changed, 77 insertions(+), 18 deletions(-)
diff --git a/src/solvers/dgmulti/flux_differencing.jl b/src/solvers/dgmulti/flux_differencing.jl
index 66e088dc188..ccab2abee16 100644
--- a/src/solvers/dgmulti/flux_differencing.jl
+++ b/src/solvers/dgmulti/flux_differencing.jl
@@ -572,6 +572,7 @@ end
# Specializes on Polynomial (e.g., modal) DG methods with a flux differencing volume integral, e.g.,
# an entropy conservative/stable discretization. For modal DG schemes, an extra `entropy_projection!`
# is required (see https://doi.org/10.1016/j.jcp.2018.02.033, Section 4.3).
+# Also called by DGMultiFluxDiff{<:GaussSBP} solvers.
function rhs!(du, u, t, mesh, equations, initial_condition, boundary_conditions::BC,
source_terms::Source, dg::DGMultiFluxDiff, cache) where {Source, BC}
diff --git a/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl b/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl
index a47ebf04563..8efd9c0e5e2 100644
--- a/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl
+++ b/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl
@@ -382,9 +382,15 @@ function create_cache(mesh::DGMultiMesh, equations,
rd = dg.basis
@unpack md = mesh
- cache = invoke(create_cache, Tuple{typeof(mesh), typeof(equations), DGMultiFluxDiff, typeof(RealT), typeof(uEltype)},
+ cache = invoke(create_cache, Tuple{typeof(mesh), typeof(equations),
+ DGMultiFluxDiff, typeof(RealT), typeof(uEltype)},
mesh, equations, dg, RealT, uEltype)
+ # Interpolate the Jacobian to Gauss points. Since we initialize `cache.invJ = inv.(md.J)`
+ # in the `invoke` call to `create_cache`, it should be the right size since the number of
+ # Gauss points is the same as the number of nodal Lobatto points.
+ cache.invJ .= inv.(rd.Vq * md.J)
+
# for change of basis prior to the volume integral and entropy projection
r1D, _ = StartUpDG.gauss_lobatto_quad(0, 0, polydeg(dg))
rq1D, _ = StartUpDG.gauss_quad(0, 0, polydeg(dg))
@@ -456,7 +462,7 @@ end
function calc_surface_integral!(du, u, surface_integral::SurfaceIntegralWeakForm,
mesh::DGMultiMesh, equations,
dg::DGMultiFluxDiff{<:GaussSBP}, cache)
- @unpack gauss_volume_local_threaded, rhs_volume_local_threaded = cache
+ @unpack gauss_volume_local_threaded = cache
@unpack interp_matrix_gauss_to_lobatto, gauss_LIFT = cache
@threaded for e in eachelement(mesh, dg, cache)
@@ -465,13 +471,10 @@ function calc_surface_integral!(du, u, surface_integral::SurfaceIntegralWeakForm
gauss_volume_local = gauss_volume_local_threaded[Threads.threadid()]
apply_to_each_field(mul_by!(gauss_LIFT), gauss_volume_local, view(cache.flux_face_values, :, e))
- # interpolate result back to Lobatto nodes for ease of analysis, visualization
- rhs_volume_local = rhs_volume_local_threaded[Threads.threadid()]
- apply_to_each_field(mul_by!(interp_matrix_gauss_to_lobatto), rhs_volume_local, gauss_volume_local)
-
- for i in eachindex(rhs_volume_local)
- du[i, e] = du[i, e] + rhs_volume_local[i]
+ for i in eachindex(gauss_volume_local)
+ du[i, e] = du[i, e] + gauss_volume_local[i]
end
+
end
end
@@ -483,9 +486,8 @@ function calc_volume_integral!(du, u, mesh::DGMultiMesh,
@unpack entropy_projected_u_values = cache
@unpack fluxdiff_local_threaded, rhs_local_threaded, rhs_volume_local_threaded = cache
- # After computing the volume integral, we transform back to Lobatto nodes.
- # This allows us to reuse the other DGMulti routines as-is.
- @unpack interp_matrix_gauss_to_lobatto = cache
+ # After computing the volume integral, the rhs values are stored at Gauss nodes.
+ # We transform from Gauss nodes back to Lobatto nodes in `invert_jacobian!`.
@unpack projection_matrix_gauss_to_face, inv_gauss_weights = cache
rd = dg.basis
@@ -520,17 +522,73 @@ function calc_volume_integral!(du, u, mesh::DGMultiMesh,
# initialize rhs_volume_local = projection_matrix_gauss_to_face * local_face_flux
apply_to_each_field(mul_by!(projection_matrix_gauss_to_face), rhs_volume_local, local_face_flux)
- # accumulate volume contributions
+ # accumulate volume contributions at Gauss nodes
for i in eachindex(rhs_volume_local)
- rhs_volume_local[i] = rhs_volume_local[i] + local_volume_flux[i] * inv_gauss_weights[i]
+ du[i, e] = rhs_volume_local[i] + local_volume_flux[i] * inv_gauss_weights[i]
end
- # transform rhs back to Lobatto nodes
+ end
+
+end
+
+# interpolate back to Lobatto nodes after applying the inverse Jacobian at Gauss points
+function invert_jacobian_and_interpolate!(du, mesh::DGMultiMesh, equations,
+ dg::DGMultiFluxDiff{<:GaussSBP}, cache; scaling=-1)
+
+ (; interp_matrix_gauss_to_lobatto, rhs_volume_local_threaded, invJ) = cache
+
+ @threaded for e in eachelement(mesh, dg, cache)
+ rhs_volume_local = rhs_volume_local_threaded[Threads.threadid()]
+
+ # At this point, `rhs_volume_local` should still be stored at Gauss points.
+ # We scale it by the inverse Jacobian before transforming back to Lobatto.
+ for i in eachindex(rhs_volume_local)
+ rhs_volume_local[i] = du[i, e] * invJ[i, e] * scaling
+ end
+
+ # Interpolate result back to Lobatto nodes for ease of analysis, visualization
apply_to_each_field(mul_by!(interp_matrix_gauss_to_lobatto),
view(du, :, e), rhs_volume_local)
end
end
+# Specialize RHS so that we can call `invert_jacobian_and_interpolate!` instead of just `invert_jacobian!`,
+# since `invert_jacobian!` is also used in other places (e.g., parabolic terms).
+function rhs!(du, u, t, mesh, equations, initial_condition, boundary_conditions::BC,
+ source_terms::Source, dg::DGMultiFluxDiff{<:GaussSBP}, cache) where {Source, BC}
+
+ @trixi_timeit timer() "reset ∂u/∂t" reset_du!(du, dg, cache)
+
+ # this function evaluates the solution at volume and face quadrature points (which was previously
+ # done in `prolong2interfaces` and `calc_volume_integral`)
+ @trixi_timeit timer() "entropy_projection!" entropy_projection!(cache, u, mesh, equations, dg)
+
+ # `du` is stored at Gauss nodes here
+ @trixi_timeit timer() "volume integral" calc_volume_integral!(
+ du, u, mesh, have_nonconservative_terms(equations), equations,
+ dg.volume_integral, dg, cache)
+
+ # the following functions are the same as in VolumeIntegralWeakForm, and can be reused from dg.jl
+ @trixi_timeit timer() "interface flux" calc_interface_flux!(cache, dg.surface_integral, mesh,
+ have_nonconservative_terms(equations),
+ equations, dg)
+
+ @trixi_timeit timer() "boundary flux" calc_boundary_flux!(cache, t, boundary_conditions,
+ mesh, equations, dg)
+
+ # `du` is stored at Gauss nodes here
+ @trixi_timeit timer() "surface integral" calc_surface_integral!(du, u, dg.surface_integral,
+ mesh, equations, dg, cache)
+
+ # invert Jacobian and map `du` from Gauss to Lobatto nodes
+ @trixi_timeit timer() "Jacobian" invert_jacobian_and_interpolate!(du, mesh, equations, dg, cache)
+
+ @trixi_timeit timer() "source terms" calc_sources!(du, u, t, source_terms,
+ mesh, equations, dg, cache)
+
+ return nothing
+end
+
end # @muladd
diff --git a/test/test_dgmulti_2d.jl b/test/test_dgmulti_2d.jl
index d3aa1ab0f7f..085ecca9ae0 100644
--- a/test/test_dgmulti_2d.jl
+++ b/test/test_dgmulti_2d.jl
@@ -95,8 +95,8 @@ isdir(outdir) && rm(outdir, recursive=true)
@trixi_testset "elixir_euler_curved.jl (Quadrilateral elements, GaussSBP, flux differencing)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_curved.jl"),
approximation_type = GaussSBP(),
- l2 = [3.890039406408632e-6, 3.7759123007255403e-6, 3.775912300349982e-6, 1.176119366880501e-5],
- linf = [1.2963211813321607e-5, 1.2570312152959673e-5, 1.2570312227122571e-5, 3.9389540817946767e-5]
+ l2 = [3.4666312082010235e-6, 3.439277448411873e-6, 3.439277448308561e-6, 1.0965598425655705e-5],
+ linf = [1.1327280369899384e-5, 1.1343911921146699e-5, 1.1343911907157889e-5, 3.6795826181545976e-5]
)
end
diff --git a/test/test_dgmulti_3d.jl b/test/test_dgmulti_3d.jl
index e16fdde82f2..6a520ef11dc 100644
--- a/test/test_dgmulti_3d.jl
+++ b/test/test_dgmulti_3d.jl
@@ -50,8 +50,8 @@ isdir(outdir) && rm(outdir, recursive=true)
@trixi_testset "elixir_euler_curved.jl (Hex elements, GaussSBP, flux differencing)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_curved.jl"),
approximation_type=GaussSBP(),
- l2 = [0.0026494857810114266, 0.002939931029796175, 0.0029403438438330687, 0.002646448702532443, 0.007067017671076421],
- linf = [0.021424273409065275, 0.02133519628006386, 0.021304710093764, 0.02080983064200792, 0.05344736080482182]
+ l2 = [0.002631131519508634, 0.0029144224044954105, 0.002913889110662827, 0.002615140832314194, 0.006881528610614373],
+ linf = [0.020996114874140215, 0.021314522450134543, 0.021288322783006297, 0.020273381695435244, 0.052598740390024545]
)
end
From 4ffe88e275a54082ac1f14b8e9f73f4679a7dfe5 Mon Sep 17 00:00:00 2001
From: Hendrik Ranocha
Date: Wed, 5 Apr 2023 10:23:51 +0200
Subject: [PATCH 06/54] Gitlab -> GitHub nomenclature (#1383)
---
CONTRIBUTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 306ffa4d5cd..5255ba33218 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,7 +2,7 @@
Trixi is an open-source project and we are very happy to accept contributions
from the community. Please feel free to open issues or submit patches (preferably
-as merge requests) any time. For planned larger contributions, it is often
+as pull requests) any time. For planned larger contributions, it is often
beneficial to get in contact with one of the principal developers first (see
[AUTHORS.md](AUTHORS.md)).
From 3a315b194d1bc4122c9fee7678148ad2c99f01dc Mon Sep 17 00:00:00 2001
From: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Date: Thu, 6 Apr 2023 03:15:26 -0500
Subject: [PATCH 07/54] Add HOHQMesh capabilities to `DGMulti` (#1382)
* add convenience constructor for HOHQMesh .mesh files
* add new DGMulti HOHQMesh elixir
* add test for hohqmesh elixir
* Update src/solvers/dgmulti/types.jl
Co-authored-by: Hendrik Ranocha
* add comment on original elixir
* Update src/solvers/dgmulti/types.jl
---------
Co-authored-by: Hendrik Ranocha
---
examples/dgmulti_2d/elixir_euler_hohqmesh.jl | 72 ++++++++++++++++++++
src/solvers/dgmulti/types.jl | 18 +++++
test/test_dgmulti_2d.jl | 7 ++
3 files changed, 97 insertions(+)
create mode 100644 examples/dgmulti_2d/elixir_euler_hohqmesh.jl
diff --git a/examples/dgmulti_2d/elixir_euler_hohqmesh.jl b/examples/dgmulti_2d/elixir_euler_hohqmesh.jl
new file mode 100644
index 00000000000..f74d496afed
--- /dev/null
+++ b/examples/dgmulti_2d/elixir_euler_hohqmesh.jl
@@ -0,0 +1,72 @@
+
+using Downloads: download
+using OrdinaryDiffEq
+using Trixi
+
+# This is a DGMulti version of the UnstructuredMesh2D elixir `elixir_euler_basic.jl`,
+# which can be found at `examples/unstructured_2d_dgsem/elixir_euler_basic.jl`.
+
+###############################################################################
+# semidiscretization of the compressible Euler equations
+
+equations = CompressibleEulerEquations2D(1.4)
+
+initial_condition = initial_condition_convergence_test
+source_terms = source_terms_convergence_test
+
+boundary_condition_convergence_test = BoundaryConditionDirichlet(initial_condition)
+boundary_conditions = (; :Slant => boundary_condition_convergence_test,
+ :Bezier => boundary_condition_convergence_test,
+ :Right => boundary_condition_convergence_test,
+ :Bottom => boundary_condition_convergence_test,
+ :Top => boundary_condition_convergence_test )
+
+###############################################################################
+# Get the DG approximation space
+
+dg = DGMulti(polydeg = 8, element_type = Quad(), approximation_type = SBP(),
+ surface_integral = SurfaceIntegralWeakForm(flux_lax_friedrichs),
+ volume_integral = VolumeIntegralFluxDifferencing(flux_ranocha))
+
+###############################################################################
+# Get the curved quad mesh from a file (downloads the file if not available locally)
+
+default_mesh_file = joinpath(@__DIR__, "mesh_trixi_unstructured_mesh_docs.mesh")
+isfile(default_mesh_file) || download("https://gist.githubusercontent.com/andrewwinters5000/52056f1487853fab63b7f4ed7f171c80/raw/9d573387dfdbb8bce2a55db7246f4207663ac07f/mesh_trixi_unstructured_mesh_docs.mesh",
+ default_mesh_file)
+mesh_file = default_mesh_file
+
+mesh = DGMultiMesh(dg, mesh_file)
+
+###############################################################################
+# create the semi discretization object
+
+semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg,
+ source_terms=source_terms,
+ boundary_conditions=boundary_conditions)
+
+###############################################################################
+# ODE solvers, callbacks etc.
+
+tspan = (0.0, 3.0)
+ode = semidiscretize(semi, tspan)
+
+summary_callback = SummaryCallback()
+
+analysis_interval = 100
+analysis_callback = AnalysisCallback(semi, interval=analysis_interval, uEltype=real(dg))
+
+alive_callback = AliveCallback(analysis_interval=analysis_interval)
+
+callbacks = CallbackSet(summary_callback,
+ analysis_callback,
+ alive_callback)
+
+###############################################################################
+# run the simulation
+
+time_int_tol = 1e-8
+sol = solve(ode, RDPK3SpFSAL49(), abstol=time_int_tol, reltol=time_int_tol,
+ dt = time_int_tol, save_everystep=false, callback=callbacks)
+
+summary_callback() # print the timer summary
diff --git a/src/solvers/dgmulti/types.jl b/src/solvers/dgmulti/types.jl
index 3f8a4e8f0ab..bfb74da45b8 100644
--- a/src/solvers/dgmulti/types.jl
+++ b/src/solvers/dgmulti/types.jl
@@ -225,6 +225,24 @@ function DGMultiMesh(dg::DGMulti{NDIMS}, cells_per_dimension, mapping;
return DGMultiMesh(dg, GeometricTermsType(Curved(), dg), md_curved, boundary_faces)
end
+"""
+ DGMultiMesh(dg::DGMulti, filename::String)
+
+- `dg::DGMulti` contains information associated with the reference element (e.g., quadrature,
+ basis evaluation, differentiation, etc).
+- `filename` is a path specifying a `.mesh` file generated by
+ [HOHQMesh](https://github.com/trixi-framework/HOHQMesh).
+"""
+function DGMultiMesh(dg::DGMulti{NDIMS}, filename;
+ periodicity=ntuple(_ -> false, NDIMS)) where {NDIMS}
+
+ hohqmesh_data = StartUpDG.read_HOHQMesh(filename)
+ md = MeshData(hohqmesh_data, dg.basis)
+ md = StartUpDG.make_periodic(md, periodicity)
+ boundary_faces = Dict(Pair.(keys(md.mesh_type.boundary_faces), values(md.mesh_type.boundary_faces)))
+ return DGMultiMesh(dg, GeometricTermsType(Curved(), dg), md, boundary_faces)
+end
+
# Todo: DGMulti. Add traits for dispatch on affine/curved meshes here.
# Matrix type for lazy construction of physical differentiation matrices
diff --git a/test/test_dgmulti_2d.jl b/test/test_dgmulti_2d.jl
index 085ecca9ae0..6d3f9024f52 100644
--- a/test/test_dgmulti_2d.jl
+++ b/test/test_dgmulti_2d.jl
@@ -100,6 +100,13 @@ isdir(outdir) && rm(outdir, recursive=true)
)
end
+ @trixi_testset "elixir_euler_hohqmesh.jl (Quadrilateral elements, SBP, flux differencing)" begin
+ @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_hohqmesh.jl"),
+ l2 = [0.0008153911341517156, 0.0007768159701964676, 0.00047902606811690694, 0.0015551846076348535],
+ linf = [0.0029301131365355726, 0.0034427051471457304, 0.0028721569841545502, 0.011125365074589944]
+ )
+ end
+
@trixi_testset "elixir_euler_weakform.jl (convergence)" begin
mean_convergence = convergence_test(@__MODULE__, joinpath(EXAMPLES_DIR, "elixir_euler_weakform.jl"), 2)
@test isapprox(mean_convergence[:l2], [4.243843382379403, 4.128314378833922, 4.128314378397532, 4.081366752807379], rtol=0.05)
From 8a182e2ee0aa9139baa18ee01ca56c3a6f82e52f Mon Sep 17 00:00:00 2001
From: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Date: Thu, 6 Apr 2023 08:49:47 -0500
Subject: [PATCH 08/54] support curved meshes for `DGMulti` with
`VolumeIntegralWeakForm` (#1385)
---
src/solvers/dgmulti/dg.jl | 145 ++++++++++++++++++++++++++++++++------
test/test_dgmulti_2d.jl | 8 +++
2 files changed, 132 insertions(+), 21 deletions(-)
diff --git a/src/solvers/dgmulti/dg.jl b/src/solvers/dgmulti/dg.jl
index ab3611105fc..4f34dde9d6b 100644
--- a/src/solvers/dgmulti/dg.jl
+++ b/src/solvers/dgmulti/dg.jl
@@ -6,14 +6,14 @@
# out <- A*x
-mul_by!(A) = @inline (out, x)->matmul!(out, A, x)
-mul_by!(A::T) where {T<:SimpleKronecker} = @inline (out, x)->mul!(out, A, x)
-mul_by!(A::AbstractSparseMatrix) = @inline (out, x)->mul!(out, A, x)
-mul_by!(A::LinearAlgebra.AdjOrTrans{T, S}) where {T, S<:AbstractSparseMatrix} = @inline (out, x)->mul!(out, A, x)
+mul_by!(A) = @inline (out, x) -> matmul!(out, A, x)
+mul_by!(A::T) where {T <: SimpleKronecker} = @inline (out, x) -> mul!(out, A, x)
+mul_by!(A::AbstractSparseMatrix) = @inline (out, x) -> mul!(out, A, x)
+mul_by!(A::LinearAlgebra.AdjOrTrans{T, S}) where {T, S<:AbstractSparseMatrix} = @inline (out, x) -> mul!(out, A, x)
# out <- out + α * A * x
-mul_by_accum!(A, α) = @inline (out, x)->matmul!(out, A, x, α, One())
-mul_by_accum!(A::AbstractSparseMatrix, α) = @inline (out, x)->mul!(out, A, x, α, One())
+mul_by_accum!(A, α) = @inline (out, x) -> matmul!(out, A, x, α, One())
+mul_by_accum!(A::AbstractSparseMatrix, α) = @inline (out, x) -> mul!(out, A, x, α, One())
# out <- out + A * x
mul_by_accum!(A) = mul_by_accum!(A, One())
@@ -51,7 +51,7 @@ In particular, not the dimensions themselves are returned.
eachelement(mesh::DGMultiMesh, dg::DGMulti, other_args...)
Return an iterator over the indices that specify the location in relevant data structures
-for the elements in `mesh`.
+for the elements in `mesh`.
In particular, not the elements themselves are returned.
"""
@inline eachelement(mesh::DGMultiMesh, dg::DGMulti, other_args...) = Base.OneTo(mesh.md.num_elements)
@@ -63,7 +63,7 @@ In particular, not the elements themselves are returned.
each_face_node(mesh::DGMultiMesh, dg::DGMulti, other_args...)
Return an iterator over the indices that specify the location in relevant data structures
-for the face nodes in `dg`.
+for the face nodes in `dg`.
In particular, not the face_nodes themselves are returned.
"""
@inline each_face_node(mesh::DGMultiMesh, dg::DGMulti, other_args...) = Base.OneTo(dg.basis.Nfq)
@@ -72,7 +72,7 @@ In particular, not the face_nodes themselves are returned.
each_quad_node(mesh::DGMultiMesh, dg::DGMulti, other_args...)
Return an iterator over the indices that specify the location in relevant data structures
-for the quadrature nodes in `dg`.
+for the quadrature nodes in `dg`.
In particular, not the quadrature nodes themselves are returned.
"""
@inline each_quad_node(mesh::DGMultiMesh, dg::DGMulti, other_args...) = Base.OneTo(dg.basis.Nq)
@@ -82,7 +82,7 @@ In particular, not the quadrature nodes themselves are returned.
each_dof_global(mesh::DGMultiMesh, dg::DGMulti, other_args...)
Return an iterator over the indices that specify the location in relevant data structures
-for the degrees of freedom (DOF) in `dg`.
+for the degrees of freedom (DOF) in `dg`.
In particular, not the DOFs themselves are returned.
"""
@inline each_dof_global(mesh::DGMultiMesh, dg::DGMulti, other_args...) = Base.OneTo(ndofs(mesh, dg, other_args...))
@@ -92,7 +92,7 @@ In particular, not the DOFs themselves are returned.
each_quad_node_global(mesh::DGMultiMesh, dg::DGMulti, other_args...)
Return an iterator over the indices that specify the location in relevant data structures
-for the global quadrature nodes in `mesh`.
+for the global quadrature nodes in `mesh`.
In particular, not the quadrature nodes themselves are returned.
"""
@inline each_quad_node_global(mesh::DGMultiMesh, dg::DGMulti, other_args...) = Base.OneTo(dg.basis.Nq * mesh.md.num_elements)
@@ -101,7 +101,7 @@ In particular, not the quadrature nodes themselves are returned.
each_face_node_global(mesh::DGMultiMesh, dg::DGMulti, other_args...)
Return an iterator over the indices that specify the location in relevant data structures
-for the face nodes in `mesh`.
+for the face nodes in `mesh`.
In particular, not the face nodes themselves are returned.
"""
@inline each_face_node_global(mesh::DGMultiMesh, dg::DGMulti, other_args...) = Base.OneTo(dg.basis.Nfq * mesh.md.num_elements)
@@ -128,8 +128,8 @@ function reset_du!(du, dg::DGMulti, other_args...)
return du
end
-function create_cache(mesh::DGMultiMesh, equations, dg::DGMultiWeakForm, RealT, uEltype)
-
+# Constructs cache variables that are shared between affine and non-affine (curved) DGMultiMeshes
+function _create_cache(mesh::DGMultiMesh, equations, dg::DGMultiWeakForm, RealT, uEltype)
rd = dg.basis
md = mesh.md
@@ -154,9 +154,39 @@ function create_cache(mesh::DGMultiMesh, equations, dg::DGMultiWeakForm, RealT,
# local storage for volume integral and source computations
local_values_threaded = [allocate_nested_array(uEltype, nvars, (rd.Nq,), dg) for _ in 1:Threads.nthreads()]
- return (; md, weak_differentiation_matrices, invJ = inv.(md.J), lift_scalings,
- u_values, u_face_values, flux_face_values,
- local_values_threaded)
+ return (; md, weak_differentiation_matrices, lift_scalings,
+ u_values, u_face_values, flux_face_values, local_values_threaded)
+end
+
+# cache constructor for a non-curved `DGMultiMesh`
+function create_cache(mesh::DGMultiMesh, equations, dg::DGMultiWeakForm, RealT, uEltype)
+ md = mesh.md
+ return (; _create_cache(mesh, equations, dg, RealT, uEltype)..., invJ = inv.(md.J))
+end
+
+# cache constructor for a curved `DGMultiMesh`
+function create_cache(mesh::DGMultiMesh{NDIMS, <:NonAffine}, equations,
+ dg::DGMultiWeakForm, RealT, uEltype) where {NDIMS}
+ rd = dg.basis
+ md = mesh.md
+
+ # For curved meshes, we interpolate geometric terms from nodal points to quadrature points.
+ # The curved DGMultiMesh constructor interpolates md.rstxyzJ to *both* volume and face points
+ # TODO: fix this by moving interpolation of rstxyzJ to cache.
+ dxidxhatj = map(x -> getindex(x, 1:rd.Nq, :), md.rstxyzJ)
+
+ # interpolate J to quadrature points for weight-adjusted DG (WADG)
+ invJ = inv.(rd.Vq * md.J)
+
+ nvars = nvariables(equations)
+
+ flux_threaded =
+ [[allocate_nested_array(uEltype, nvars, (rd.Nq,), dg) for _ in 1:NDIMS] for _ in 1:Threads.nthreads()]
+ rotated_flux_threaded =
+ [allocate_nested_array(uEltype, nvars, (rd.Nq,), dg) for _ in 1:Threads.nthreads()]
+
+ return (; _create_cache(mesh, equations, dg, RealT, uEltype)...,
+ invJ, dxidxhatj, flux_threaded, rotated_flux_threaded)
end
function allocate_coefficients(mesh::DGMultiMesh, equations, dg::DGMulti, cache)
@@ -243,6 +273,7 @@ function prolong2interfaces!(cache, u, mesh::DGMultiMesh, equations,
apply_to_each_field(mul_by!(rd.Vf), u_face_values, u)
end
+# version for affine meshes
function calc_volume_integral!(du, u, mesh::DGMultiMesh,
have_nonconservative_terms::False, equations,
volume_integral::VolumeIntegralWeakForm, dg::DGMulti,
@@ -256,20 +287,67 @@ function calc_volume_integral!(du, u, mesh::DGMultiMesh,
# interpolate to quadrature points
apply_to_each_field(mul_by!(rd.Vq), u_values, u)
- # Todo: DGMulti. Dispatch on curved/non-curved mesh types, this code only works for affine meshes (accessing rxJ[1,e],...)
@threaded for e in eachelement(mesh, dg, cache)
flux_values = local_values_threaded[Threads.threadid()]
for i in eachdim(mesh)
flux_values .= flux.(view(u_values,:,e), i, equations)
for j in eachdim(mesh)
- apply_to_each_field(mul_by_accum!(weak_differentiation_matrices[j], rstxyzJ[i,j][1,e]),
- view(du,:,e), flux_values)
+ dxidxhatj = mesh.md.rstxyzJ[i, j][1, e]
+ apply_to_each_field(mul_by_accum!(weak_differentiation_matrices[j], dxidxhatj),
+ view(du, :, e), flux_values)
end
end
end
end
+# version for curved meshes
+function calc_volume_integral!(du, u, mesh::DGMultiMesh{NDIMS, <:NonAffine},
+ have_nonconservative_terms::False, equations,
+ volume_integral::VolumeIntegralWeakForm, dg::DGMulti,
+ cache) where {NDIMS}
+
+ rd = dg.basis
+ (; weak_differentiation_matrices, u_values) = cache
+ (; dxidxhatj) = cache
+
+ # interpolate to quadrature points
+ apply_to_each_field(mul_by!(rd.Vq), u_values, u)
+
+ @threaded for e in eachelement(mesh, dg, cache)
+
+ flux_values = cache.flux_threaded[Threads.threadid()]
+ for i in eachdim(mesh)
+ flux_values[i] .= flux.(view(u_values, :, e), i, equations)
+ end
+
+ # rotate flux with df_i/dx_i = sum_j d(x_i)/d(x̂_j) * d(f_i)/d(x̂_j).
+ # Example: df_x/dx + df_y/dy = dr/dx * df_x/dr + ds/dx * df_x/ds
+ # + dr/dy * df_y/dr + ds/dy * df_y/ds
+ # = Dr * (dr/dx * fx + dr/dy * fy) + Ds * (...)
+ # = Dr * (f_r) + Ds * (f_s)
+
+ rotated_flux_values = cache.rotated_flux_threaded[Threads.threadid()]
+ for j in eachdim(mesh)
+
+ fill!(rotated_flux_values, zero(eltype(rotated_flux_values)))
+
+ # compute rotated fluxes
+ for i in eachdim(mesh)
+ for ii in eachindex(rotated_flux_values)
+ flux_i_node = flux_values[i][ii]
+ dxidxhatj_node = dxidxhatj[i, j][ii, e]
+ rotated_flux_values[ii] = rotated_flux_values[ii] + dxidxhatj_node * flux_i_node
+ end
+ end
+
+ # apply weak differentiation matrices to rotated fluxes
+ apply_to_each_field(mul_by_accum!(weak_differentiation_matrices[j]),
+ view(du, :, e), rotated_flux_values)
+ end
+ end
+end
+
function calc_interface_flux!(cache, surface_integral::SurfaceIntegralWeakForm,
mesh::DGMultiMesh,
have_nonconservative_terms::False, equations,
@@ -426,7 +504,6 @@ function calc_single_boundary_flux!(cache, t, boundary_condition, boundary_key,
end
-# Todo: DGMulti. Specialize for modal DG on curved meshes using WADG
# inverts Jacobian and scales by -1.0
function invert_jacobian!(du, mesh::DGMultiMesh, equations, dg::DGMulti, cache; scaling=-1)
@threaded for i in each_dof_global(mesh, dg, cache)
@@ -434,6 +511,32 @@ function invert_jacobian!(du, mesh::DGMultiMesh, equations, dg::DGMulti, cache;
end
end
+# inverts Jacobian using weight-adjusted DG, and scales by -1.0.
+# - Chan, Jesse, Russell J. Hewett, and Timothy Warburton.
+# "Weight-adjusted discontinuous Galerkin methods: curvilinear meshes."
+# https://doi.org/10.1137/16M1089198
+function invert_jacobian!(du, mesh::DGMultiMesh{NDIMS, <:NonAffine}, equations,
+ dg::DGMulti, cache; scaling=-1) where {NDIMS}
+ # Vq = interpolation matrix to quadrature points, Pq = quadrature-based L2 projection matrix
+ (; Pq, Vq) = dg.basis
+ (; local_values_threaded, invJ) = cache
+
+ @threaded for e in eachelement(mesh, dg, cache)
+ du_at_quad_points = local_values_threaded[Threads.threadid()]
+
+ # interpolate solution to quadrature
+ apply_to_each_field(mul_by!(Vq), du_at_quad_points, view(du, :, e))
+
+ # scale by quadrature points
+ for i in eachindex(du_at_quad_points)
+ du_at_quad_points[i] *= scaling * invJ[i, e]
+ end
+
+ # project back to polynomials
+ apply_to_each_field(mul_by!(Pq), view(du, :, e), du_at_quad_points)
+ end
+end
+
# Multiple calc_sources! to resolve method ambiguities
calc_sources!(du, u, t, source_terms::Nothing,
mesh, equations, dg::DGMulti, cache) = nothing
diff --git a/test/test_dgmulti_2d.jl b/test/test_dgmulti_2d.jl
index 6d3f9024f52..adf45249437 100644
--- a/test/test_dgmulti_2d.jl
+++ b/test/test_dgmulti_2d.jl
@@ -100,6 +100,14 @@ isdir(outdir) && rm(outdir, recursive=true)
)
end
+ @trixi_testset "elixir_euler_curved.jl (Triangular elements, Polynomial, weak formulation)" begin
+ @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_curved.jl"),
+ element_type = Tri(), approximation_type = Polynomial(), volume_integral = VolumeIntegralWeakForm(),
+ l2 = [7.905498158659466e-6, 8.731690809663625e-6, 8.731690811576996e-6, 2.9113296018693953e-5],
+ linf = [3.298811230090237e-5, 4.032272476939269e-5, 4.032272526011127e-5, 0.00012013725458537294]
+ )
+ end
+
@trixi_testset "elixir_euler_hohqmesh.jl (Quadrilateral elements, SBP, flux differencing)" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_hohqmesh.jl"),
l2 = [0.0008153911341517156, 0.0007768159701964676, 0.00047902606811690694, 0.0015551846076348535],
From 12fe7fb96924b01e4cc843244eb99dee0ac47e66 Mon Sep 17 00:00:00 2001
From: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Date: Sun, 9 Apr 2023 23:23:33 -0500
Subject: [PATCH 09/54] Unify `DGMultiMesh` constructor signature, update
`overview.md` (#1386)
* update overview doc
* make DGMultiMesh constructors consistent
* making DGMultiMesh constructor args consistent
* fix DGMultiMesh hohqmesh constructor
* use new constructor
* use new mesh constructor in elixirs
* remove project.toml
* fix another elixir
* fixing more elixirs
* fix literate DGMultiMesh constructors
* update NEWS.md
---
NEWS.md | 3 +++
docs/literate/src/files/DGMulti_1.jl | 9 ++++++---
docs/src/overview.md | 2 +-
examples/dgmulti_1d/elixir_advection_gauss_sbp.jl | 7 +++----
examples/dgmulti_1d/elixir_euler_flux_diff.jl | 3 ++-
examples/dgmulti_2d/elixir_advection_diffusion.jl | 4 +++-
.../elixir_advection_diffusion_nonperiodic.jl | 8 ++++++--
.../elixir_advection_diffusion_periodic.jl | 3 ++-
.../dgmulti_2d/elixir_euler_brown_minion_vortex.jl | 3 ++-
.../elixir_euler_kelvin_helmholtz_instability.jl | 4 +++-
.../elixir_euler_rayleigh_taylor_instability.jl | 3 ++-
examples/dgmulti_2d/elixir_euler_weakform.jl | 3 ++-
.../dgmulti_2d/elixir_euler_weakform_periodic.jl | 3 ++-
examples/dgmulti_2d/elixir_mhd_weak_blast_wave.jl | 3 ++-
.../dgmulti_2d/elixir_mhd_weak_blast_wave_SBP.jl | 2 +-
.../dgmulti_2d/elixir_navierstokes_convergence.jl | 4 +++-
.../elixir_navierstokes_lid_driven_cavity.jl | 4 +++-
.../dgmulti_2d/elixir_shallowwater_source_terms.jl | 3 ++-
.../dgmulti_3d/elixir_euler_taylor_green_vortex.jl | 3 ++-
examples/dgmulti_3d/elixir_euler_weakform.jl | 3 ++-
.../dgmulti_3d/elixir_euler_weakform_periodic.jl | 3 ++-
.../dgmulti_3d/elixir_navierstokes_convergence.jl | 4 +++-
.../elixir_navierstokes_taylor_green_vortex.jl | 7 ++++---
src/solvers/dgmulti/types.jl | 13 +++++++------
24 files changed, 68 insertions(+), 36 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index d3f03dab4da..2ae6d46aa03 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -19,6 +19,9 @@ for human readability.
- The macro `@unpack` (re-exported originally from UnPack.jl) is deprecated and
will be removed. Consider using Julia's standard destructuring syntax
`(; a, b) = stuff` instead of `@unpack a, b = stuff`.
+- The constructor `DGMultiMesh(dg; cells_per_dimension, kwargs...)` is deprecated
+ and will be removed. The new constructor `DGMultiMesh(dg, cells_per_dimension; kwargs...)`
+ does not have `cells_per_dimesion` as a keyword argument.
#### Removed
diff --git a/docs/literate/src/files/DGMulti_1.jl b/docs/literate/src/files/DGMulti_1.jl
index bbddd821e44..2deb2abb431 100644
--- a/docs/literate/src/files/DGMulti_1.jl
+++ b/docs/literate/src/files/DGMulti_1.jl
@@ -27,8 +27,9 @@ dg = DGMulti(polydeg = 3,
surface_flux = flux_lax_friedrichs,
volume_integral = VolumeIntegralFluxDifferencing(flux_ranocha))
+cells_per_dimension = (32, 32)
mesh = DGMultiMesh(dg,
- cells_per_dimension=(32, 32), # initial_refinement_level = 5
+ cells_per_dimension, # initial_refinement_level = 5
coordinates_min=(-2.0, -2.0),
coordinates_max=( 2.0, 2.0),
periodicity=true)
@@ -75,8 +76,9 @@ dg = DGMulti(polydeg = 3,
surface_flux = flux_lax_friedrichs,
volume_integral = VolumeIntegralFluxDifferencing(flux_ranocha))
+cells_per_dimension = (32, 32)
mesh = DGMultiMesh(dg,
- cells_per_dimension=(32, 32), # initial_refinement_level = 5
+ cells_per_dimension, # initial_refinement_level = 5
coordinates_min=(-2.0, -2.0),
coordinates_max=( 2.0, 2.0),
periodicity=true)
@@ -114,8 +116,9 @@ dg = DGMulti(polydeg = 3,
surface_flux = flux_lax_friedrichs,
volume_integral = VolumeIntegralFluxDifferencing(flux_ranocha))
+cells_per_dimension = (32, 32)
mesh = DGMultiMesh(dg,
- cells_per_dimension=(32, 32), # initial_refinement_level = 5
+ cells_per_dimension, # initial_refinement_level = 5
coordinates_min=(-2.0, -2.0),
coordinates_max=( 2.0, 2.0),
periodicity=true)
diff --git a/docs/src/overview.md b/docs/src/overview.md
index 11f429d335d..8c678bae729 100644
--- a/docs/src/overview.md
+++ b/docs/src/overview.md
@@ -50,7 +50,7 @@ different features on different mesh types.
| Feature | [`TreeMesh`](@ref) | [`StructuredMesh`](@ref) | [`UnstructuredMesh2D`](@ref) | [`P4estMesh`](@ref) | [`DGMultiMesh`](@ref) | Further reading
|:-------------------------------------------------------------|:------------------:|:------------------------:|:----------------------------:|:-------------------:|:--------------------------:|:-----------------------------------------
| Spatial dimension | 1D, 2D, 3D | 1D, 2D, 3D | 2D | 2D, 3D | 1D, 2D, 3D |
-| Coordinates | Cartesian | curvilinear | curvilinear | curvilinear | affine |
+| Coordinates | Cartesian | curvilinear | curvilinear | curvilinear | curvilinear |
| Connectivity | *h*-nonconforming | conforming | conforming | *h*-nonconforming | conforming |
| Element type | line, square, cube | line, quadᵃ, hexᵃ | quadᵃ | quadᵃ, hexᵃ | simplex, quadᵃ, hexᵃ |
| Adaptive mesh refinement | ✅ | ❌ | ❌ | ✅ | ❌ | [`AMRCallback`](@ref)
diff --git a/examples/dgmulti_1d/elixir_advection_gauss_sbp.jl b/examples/dgmulti_1d/elixir_advection_gauss_sbp.jl
index 73a264544ca..c61e40dabce 100644
--- a/examples/dgmulti_1d/elixir_advection_gauss_sbp.jl
+++ b/examples/dgmulti_1d/elixir_advection_gauss_sbp.jl
@@ -21,10 +21,9 @@ dg = DGMulti(polydeg = 3,
###############################################################################
# setup the 1D mesh
-mesh = DGMultiMesh(dg,
- cells_per_dimension=(8,),
- coordinates_min=(-1.0,),
- coordinates_max=(1.0,),
+cells_per_dimension = (8,)
+mesh = DGMultiMesh(dg, cells_per_dimension,
+ coordinates_min=(-1.0,), coordinates_max=(1.0,),
periodicity=true)
###############################################################################
diff --git a/examples/dgmulti_1d/elixir_euler_flux_diff.jl b/examples/dgmulti_1d/elixir_euler_flux_diff.jl
index c9afde1ea0b..489b23e37b2 100644
--- a/examples/dgmulti_1d/elixir_euler_flux_diff.jl
+++ b/examples/dgmulti_1d/elixir_euler_flux_diff.jl
@@ -11,7 +11,8 @@ equations = CompressibleEulerEquations1D(1.4)
initial_condition = initial_condition_convergence_test
source_terms = source_terms_convergence_test
-mesh = DGMultiMesh(dg, cells_per_dimension=(8,),
+cells_per_dimension = (8,)
+mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(-1.0,), coordinates_max=(1.0,), periodicity=true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg;
source_terms=source_terms)
diff --git a/examples/dgmulti_2d/elixir_advection_diffusion.jl b/examples/dgmulti_2d/elixir_advection_diffusion.jl
index 1273e25859e..4049e99891c 100644
--- a/examples/dgmulti_2d/elixir_advection_diffusion.jl
+++ b/examples/dgmulti_2d/elixir_advection_diffusion.jl
@@ -16,7 +16,9 @@ right(x, tol=50*eps()) = abs(x[1] - 1) < tol
bottom(x, tol=50*eps()) = abs(x[2] + 1) < tol
top(x, tol=50*eps()) = abs(x[2] - 1) < tol
is_on_boundary = Dict(:left => left, :right => right, :top => top, :bottom => bottom)
-mesh = DGMultiMesh(dg, cells_per_dimension=(16, 16); is_on_boundary)
+
+cells_per_dimension = (16, 16)
+mesh = DGMultiMesh(dg, cells_per_dimension; is_on_boundary)
# BC types
boundary_condition_left = BoundaryConditionDirichlet((x, t, equations) -> SVector(1 + 0.1 * x[2]))
diff --git a/examples/dgmulti_2d/elixir_advection_diffusion_nonperiodic.jl b/examples/dgmulti_2d/elixir_advection_diffusion_nonperiodic.jl
index bb22f494374..2106bc53345 100644
--- a/examples/dgmulti_2d/elixir_advection_diffusion_nonperiodic.jl
+++ b/examples/dgmulti_2d/elixir_advection_diffusion_nonperiodic.jl
@@ -36,8 +36,12 @@ top(x, tol=50*eps()) = abs(x[2] - 0.5) < tol
entire_boundary(x, tol=50*eps()) = true
is_on_boundary = Dict(:left => left, :right => right, :top => top, :bottom => bottom,
:entire_boundary => entire_boundary)
-mesh = DGMultiMesh(dg; coordinates_min=(-1.0, -0.5), coordinates_max=(0.0, 0.5),
- cells_per_dimension=(16, 16), is_on_boundary)
+
+cells_per_dimension = (16, 16)
+mesh = DGMultiMesh(dg, cells_per_dimension;
+ coordinates_min=(-1.0, -0.5),
+ coordinates_max=(0.0, 0.5),
+ is_on_boundary)
# BC types
boundary_condition = BoundaryConditionDirichlet(initial_condition)
diff --git a/examples/dgmulti_2d/elixir_advection_diffusion_periodic.jl b/examples/dgmulti_2d/elixir_advection_diffusion_periodic.jl
index 8058e156969..66217ab8df3 100644
--- a/examples/dgmulti_2d/elixir_advection_diffusion_periodic.jl
+++ b/examples/dgmulti_2d/elixir_advection_diffusion_periodic.jl
@@ -12,7 +12,8 @@ function initial_condition_sharp_gaussian(x, t, equations::LinearScalarAdvection
end
initial_condition = initial_condition_sharp_gaussian
-mesh = DGMultiMesh(dg, cells_per_dimension = (16, 16), periodicity=true)
+cells_per_dimension = (16, 16)
+mesh = DGMultiMesh(dg, cells_per_dimension, periodicity=true)
semi = SemidiscretizationHyperbolicParabolic(mesh, (equations, equations_parabolic),
initial_condition, dg)
diff --git a/examples/dgmulti_2d/elixir_euler_brown_minion_vortex.jl b/examples/dgmulti_2d/elixir_euler_brown_minion_vortex.jl
index 7b4029e59e5..7cc8564f46d 100644
--- a/examples/dgmulti_2d/elixir_euler_brown_minion_vortex.jl
+++ b/examples/dgmulti_2d/elixir_euler_brown_minion_vortex.jl
@@ -28,7 +28,8 @@ function initial_condition_BM_vortex(x, t, equations::CompressibleEulerEquations
end
initial_condition = initial_condition_BM_vortex
-mesh = DGMultiMesh(dg, cells_per_dimension=(16, 16),
+cells_per_dimension = (16, 16)
+mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(-0.5, -0.5), coordinates_max=(0.5, 0.5),
periodicity=true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg)
diff --git a/examples/dgmulti_2d/elixir_euler_kelvin_helmholtz_instability.jl b/examples/dgmulti_2d/elixir_euler_kelvin_helmholtz_instability.jl
index d13121e269e..39e98d1a2c5 100644
--- a/examples/dgmulti_2d/elixir_euler_kelvin_helmholtz_instability.jl
+++ b/examples/dgmulti_2d/elixir_euler_kelvin_helmholtz_instability.jl
@@ -30,7 +30,9 @@ function initial_condition_kelvin_helmholtz_instability(x, t, equations::Compres
end
initial_condition = initial_condition_kelvin_helmholtz_instability
-mesh = DGMultiMesh(dg, cells_per_dimension=(32, 32), periodicity=true)
+cells_per_dimension = (32, 32)
+mesh = DGMultiMesh(dg, cells_per_dimension; periodicity=true)
+
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg)
tspan = (0.0, 1.0)
diff --git a/examples/dgmulti_2d/elixir_euler_rayleigh_taylor_instability.jl b/examples/dgmulti_2d/elixir_euler_rayleigh_taylor_instability.jl
index 27485b9418a..507ff3d225a 100644
--- a/examples/dgmulti_2d/elixir_euler_rayleigh_taylor_instability.jl
+++ b/examples/dgmulti_2d/elixir_euler_rayleigh_taylor_instability.jl
@@ -65,7 +65,8 @@ dg = DGMulti(polydeg = 3, element_type = Quad(), approximation_type = Polynomial
volume_integral = VolumeIntegralFluxDifferencing(flux_ranocha))
num_elements = 16
-mesh = DGMultiMesh(dg, cells_per_dimension=(num_elements, 4 * num_elements),
+cells_per_dimension = (num_elements, 4 * num_elements)
+mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(0.0, 0.0), coordinates_max=(0.25, 1.0),
periodicity=(true, false))
diff --git a/examples/dgmulti_2d/elixir_euler_weakform.jl b/examples/dgmulti_2d/elixir_euler_weakform.jl
index d3b532d32cb..1ecc666c8db 100644
--- a/examples/dgmulti_2d/elixir_euler_weakform.jl
+++ b/examples/dgmulti_2d/elixir_euler_weakform.jl
@@ -14,7 +14,8 @@ top_boundary(x, tol=50*eps()) = abs(x[2]-1) top_boundary, :rest => rest_of_boundary)
-mesh = DGMultiMesh(dg, cells_per_dimension=(8, 8), is_on_boundary=is_on_boundary)
+cells_per_dimension = (8, 8)
+mesh = DGMultiMesh(dg, cells_per_dimension, is_on_boundary=is_on_boundary)
boundary_condition_convergence_test = BoundaryConditionDirichlet(initial_condition)
boundary_conditions = (; :top => boundary_condition_convergence_test,
diff --git a/examples/dgmulti_2d/elixir_euler_weakform_periodic.jl b/examples/dgmulti_2d/elixir_euler_weakform_periodic.jl
index a5b540cb3d4..48cc8070857 100644
--- a/examples/dgmulti_2d/elixir_euler_weakform_periodic.jl
+++ b/examples/dgmulti_2d/elixir_euler_weakform_periodic.jl
@@ -9,7 +9,8 @@ equations = CompressibleEulerEquations2D(1.4)
initial_condition = initial_condition_convergence_test
source_terms = source_terms_convergence_test
-mesh = DGMultiMesh(dg, cells_per_dimension = (4, 4), periodicity=true)
+cells_per_dimension = (4, 4)
+mesh = DGMultiMesh(dg, cells_per_dimension, periodicity=true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg,
source_terms = source_terms)
diff --git a/examples/dgmulti_2d/elixir_mhd_weak_blast_wave.jl b/examples/dgmulti_2d/elixir_mhd_weak_blast_wave.jl
index cf8e01d34af..bf5045ce8b0 100644
--- a/examples/dgmulti_2d/elixir_mhd_weak_blast_wave.jl
+++ b/examples/dgmulti_2d/elixir_mhd_weak_blast_wave.jl
@@ -15,7 +15,8 @@ dg = DGMulti(polydeg=3, element_type = Quad(), approximation_type = Polynomial()
surface_integral = SurfaceIntegralWeakForm(surface_flux),
volume_integral = VolumeIntegralFluxDifferencing(volume_flux))
-mesh = DGMultiMesh(dg, cells_per_dimension=(16, 16),
+cells_per_dimension = (16, 16)
+mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(-2.0, -2.0), coordinates_max=(2.0, 2.0),
periodicity=true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg)
diff --git a/examples/dgmulti_2d/elixir_mhd_weak_blast_wave_SBP.jl b/examples/dgmulti_2d/elixir_mhd_weak_blast_wave_SBP.jl
index ed37bba44d2..05ff1134d61 100644
--- a/examples/dgmulti_2d/elixir_mhd_weak_blast_wave_SBP.jl
+++ b/examples/dgmulti_2d/elixir_mhd_weak_blast_wave_SBP.jl
@@ -19,7 +19,7 @@ dg = DGMulti(polydeg=3, element_type = Quad(), approximation_type = SBP(),
surface_integral = SurfaceIntegralWeakForm(surface_flux),
volume_integral = VolumeIntegralFluxDifferencing(volume_flux))
-mesh = DGMultiMesh(dg, cells_per_dimension=cells_per_dimension,
+mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(-2.0, -2.0), coordinates_max=(2.0, 2.0),
periodicity=true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg)
diff --git a/examples/dgmulti_2d/elixir_navierstokes_convergence.jl b/examples/dgmulti_2d/elixir_navierstokes_convergence.jl
index f7039627238..96723dd9227 100644
--- a/examples/dgmulti_2d/elixir_navierstokes_convergence.jl
+++ b/examples/dgmulti_2d/elixir_navierstokes_convergence.jl
@@ -20,7 +20,9 @@ dg = DGMulti(polydeg = 3, element_type = Tri(), approximation_type = Polynomial(
top_bottom(x, tol=50*eps()) = abs(abs(x[2]) - 1) < tol
is_on_boundary = Dict(:top_bottom => top_bottom)
-mesh = DGMultiMesh(dg, cells_per_dimension=(16, 16); periodicity=(true, false), is_on_boundary)
+
+cells_per_dimension = (16, 16)
+mesh = DGMultiMesh(dg, cells_per_dimension; periodicity=(true, false), is_on_boundary)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion2D`)
diff --git a/examples/dgmulti_2d/elixir_navierstokes_lid_driven_cavity.jl b/examples/dgmulti_2d/elixir_navierstokes_lid_driven_cavity.jl
index 0837cc2fd55..9466a28303d 100644
--- a/examples/dgmulti_2d/elixir_navierstokes_lid_driven_cavity.jl
+++ b/examples/dgmulti_2d/elixir_navierstokes_lid_driven_cavity.jl
@@ -21,7 +21,9 @@ dg = DGMulti(polydeg = 3, element_type = Quad(), approximation_type = GaussSBP()
top(x, tol=50*eps()) = abs(x[2] - 1) < tol
rest_of_boundary(x, tol=50*eps()) = !top(x, tol)
is_on_boundary = Dict(:top => top, :rest_of_boundary => rest_of_boundary)
-mesh = DGMultiMesh(dg, cells_per_dimension=(16, 16); is_on_boundary)
+
+cells_per_dimension = (16, 16)
+mesh = DGMultiMesh(dg, cells_per_dimension; is_on_boundary)
function initial_condition_cavity(x, t, equations::CompressibleEulerEquations2D)
Ma = 0.1
diff --git a/examples/dgmulti_2d/elixir_shallowwater_source_terms.jl b/examples/dgmulti_2d/elixir_shallowwater_source_terms.jl
index 00fae6763b0..5196583d27c 100644
--- a/examples/dgmulti_2d/elixir_shallowwater_source_terms.jl
+++ b/examples/dgmulti_2d/elixir_shallowwater_source_terms.jl
@@ -14,7 +14,8 @@ dg = DGMulti(polydeg=3, element_type = Quad(), approximation_type = SBP(),
surface_integral = SurfaceIntegralWeakForm(surface_flux),
volume_integral = VolumeIntegralFluxDifferencing(volume_flux))
-mesh = DGMultiMesh(dg, cells_per_dimension=(8, 8),
+cells_per_dimension = (8, 8)
+mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(0.0, 0.0), coordinates_max=(sqrt(2), sqrt(2)),
periodicity=true)
diff --git a/examples/dgmulti_3d/elixir_euler_taylor_green_vortex.jl b/examples/dgmulti_3d/elixir_euler_taylor_green_vortex.jl
index d0e470e6c0e..ca68bedc212 100644
--- a/examples/dgmulti_3d/elixir_euler_taylor_green_vortex.jl
+++ b/examples/dgmulti_3d/elixir_euler_taylor_green_vortex.jl
@@ -33,7 +33,8 @@ solver = DGMulti(polydeg = 3, element_type = Hex(), approximation_type = Polynom
surface_integral= SurfaceIntegralWeakForm(surface_flux),
volume_integral = VolumeIntegralFluxDifferencing(volume_flux))
-mesh = DGMultiMesh(solver, cells_per_dimension=(8, 8, 8),
+cells_per_dimension = (8, 8, 8)
+mesh = DGMultiMesh(solver, cells_per_dimension,
coordinates_min=(-pi, -pi, -pi), coordinates_max=(pi, pi, pi),
periodicity=true)
diff --git a/examples/dgmulti_3d/elixir_euler_weakform.jl b/examples/dgmulti_3d/elixir_euler_weakform.jl
index 4d4419d743e..4ad9f045eb6 100644
--- a/examples/dgmulti_3d/elixir_euler_weakform.jl
+++ b/examples/dgmulti_3d/elixir_euler_weakform.jl
@@ -14,7 +14,8 @@ top_boundary(x, tol=50*eps()) = abs(x[2] - 1) < tol
rest_of_boundary(x, tol=50*eps()) = !top_boundary(x, tol)
is_on_boundary = Dict(:top => top_boundary, :rest => rest_of_boundary)
-mesh = DGMultiMesh(dg, cells_per_dimension=(4, 4, 4), is_on_boundary=is_on_boundary)
+cells_per_dimension = (4, 4, 4)
+mesh = DGMultiMesh(dg, cells_per_dimension, is_on_boundary=is_on_boundary)
boundary_condition_convergence_test = BoundaryConditionDirichlet(initial_condition)
boundary_conditions = (; :top => boundary_condition_convergence_test,
diff --git a/examples/dgmulti_3d/elixir_euler_weakform_periodic.jl b/examples/dgmulti_3d/elixir_euler_weakform_periodic.jl
index d91c0c6c85c..f554167df90 100644
--- a/examples/dgmulti_3d/elixir_euler_weakform_periodic.jl
+++ b/examples/dgmulti_3d/elixir_euler_weakform_periodic.jl
@@ -9,7 +9,8 @@ equations = CompressibleEulerEquations3D(1.4)
initial_condition = initial_condition_convergence_test
source_terms = source_terms_convergence_test
-mesh = DGMultiMesh(dg, cells_per_dimension=(4, 4, 4), periodicity=true)
+cells_per_dimension = (4, 4, 4)
+mesh = DGMultiMesh(dg, cells_per_dimension, periodicity=true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg,
source_terms = source_terms)
diff --git a/examples/dgmulti_3d/elixir_navierstokes_convergence.jl b/examples/dgmulti_3d/elixir_navierstokes_convergence.jl
index b08eda5cf8c..b13bce0d4f2 100644
--- a/examples/dgmulti_3d/elixir_navierstokes_convergence.jl
+++ b/examples/dgmulti_3d/elixir_navierstokes_convergence.jl
@@ -18,7 +18,9 @@ dg = DGMulti(polydeg = 3, element_type = Hex(), approximation_type = Polynomial(
top_bottom(x, tol=50*eps()) = abs(abs(x[2]) - 1) < tol
is_on_boundary = Dict(:top_bottom => top_bottom)
-mesh = DGMultiMesh(dg, cells_per_dimension=(8, 8, 8); periodicity=(true, false, true), is_on_boundary)
+
+cells_per_dimension = (8, 8, 8)
+mesh = DGMultiMesh(dg, cells_per_dimension; periodicity=(true, false, true), is_on_boundary)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion3D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion3D`)
diff --git a/examples/dgmulti_3d/elixir_navierstokes_taylor_green_vortex.jl b/examples/dgmulti_3d/elixir_navierstokes_taylor_green_vortex.jl
index 9d0d926338a..6d0e7c5bca3 100644
--- a/examples/dgmulti_3d/elixir_navierstokes_taylor_green_vortex.jl
+++ b/examples/dgmulti_3d/elixir_navierstokes_taylor_green_vortex.jl
@@ -40,9 +40,10 @@ dg = DGMulti(polydeg = 3, element_type = Hex(), approximation_type = GaussSBP(),
coordinates_min = (-1.0, -1.0, -1.0) .* pi
coordinates_max = ( 1.0, 1.0, 1.0) .* pi
-mesh = DGMultiMesh(dg; coordinates_min, coordinates_max,
- cells_per_dimension=(8, 8, 8),
- periodicity=(true, true, true))
+cells_per_dimension = (8, 8, 8)
+mesh = DGMultiMesh(dg, cells_per_dimension;
+ coordinates_min, coordinates_max,
+ periodicity=(true, true, true))
semi = SemidiscretizationHyperbolicParabolic(mesh, (equations, equations_parabolic),
initial_condition, dg)
diff --git a/src/solvers/dgmulti/types.jl b/src/solvers/dgmulti/types.jl
index bfb74da45b8..219b312c822 100644
--- a/src/solvers/dgmulti/types.jl
+++ b/src/solvers/dgmulti/types.jl
@@ -154,9 +154,8 @@ function DGMultiMesh(dg::DGMulti{2, Tri}, triangulateIO, boundary_dict::Dict{Sym
return DGMultiMesh(dg, GeometricTermsType(TriangulateIO(), dg), md, boundary_faces)
end
-# TODO: DGMulti. Make `cells_per_dimension` a non-keyword argument for easier dispatch.
"""
- DGMultiMesh(dg::DGMulti; cells_per_dimension,
+ DGMultiMesh(dg::DGMulti, cells_per_dimension;
coordinates_min=(-1.0, -1.0), coordinates_max=(1.0, 1.0),
is_on_boundary=nothing,
periodicity=ntuple(_ -> false, NDIMS))
@@ -166,7 +165,7 @@ the tensor product of the intervals `[coordinates_min[i], coordinates_max[i]]`.
- `is_on_boundary` specifies boundary using a `Dict{Symbol, <:Function}`
- `periodicity` is a tuple of `Bool`s specifying periodicity = `true`/`false` in the (x,y,z) direction.
"""
-function DGMultiMesh(dg::DGMulti{NDIMS}; cells_per_dimension,
+function DGMultiMesh(dg::DGMulti{NDIMS}, cells_per_dimension;
coordinates_min=ntuple(_ -> -one(real(dg)), NDIMS),
coordinates_max=ntuple(_ -> one(real(dg)), NDIMS),
is_on_boundary=nothing,
@@ -233,7 +232,7 @@ end
- `filename` is a path specifying a `.mesh` file generated by
[HOHQMesh](https://github.com/trixi-framework/HOHQMesh).
"""
-function DGMultiMesh(dg::DGMulti{NDIMS}, filename;
+function DGMultiMesh(dg::DGMulti{NDIMS}, filename::String;
periodicity=ntuple(_ -> false, NDIMS)) where {NDIMS}
hohqmesh_data = StartUpDG.read_HOHQMesh(filename)
@@ -243,8 +242,6 @@ function DGMultiMesh(dg::DGMulti{NDIMS}, filename;
return DGMultiMesh(dg, GeometricTermsType(Curved(), dg), md, boundary_faces)
end
-# Todo: DGMulti. Add traits for dispatch on affine/curved meshes here.
-
# Matrix type for lazy construction of physical differentiation matrices
# Constructs a lazy linear combination of B = ∑_i coeffs[i] * A[i]
struct LazyMatrixLinearCombo{Tcoeffs, N, Tv, TA <: AbstractMatrix{Tv}} <: AbstractMatrix{Tv}
@@ -364,6 +361,10 @@ end
end # @muladd
+# TODO: deprecations introduced in Trixi.jl v0.6
+@deprecate DGMultiMesh(dg::DGMulti{NDIMS}; cells_per_dimension, kwargs...) where {NDIMS} DGMultiMesh(dg, cells_per_dimension; kwargs...)
+
# TODO: deprecations introduced in Trixi.jl v0.5
@deprecate DGMultiMesh(vertex_coordinates, EToV, dg::DGMulti{NDIMS}; kwargs...) where {NDIMS} DGMultiMesh(dg, vertex_coordinates, EToV; kwargs...)
@deprecate DGMultiMesh(triangulateIO, dg::DGMulti{2, Tri}, boundary_dict::Dict{Symbol, Int}; kwargs...) DGMultiMesh(dg, triangulateIO, boundary_dict; kwargs...)
+
From bb8ac5c1d040e4dffed20c83125d6c5cd3e9e3f2 Mon Sep 17 00:00:00 2001
From: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Date: Mon, 10 Apr 2023 03:23:26 -0500
Subject: [PATCH 10/54] test Trixi with StartUpDG v0.16 (#1387)
* bump compat for StartUpDG
* fix compat
---
Project.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Project.toml b/Project.toml
index c42c215f2e6..48e519fcbec 100644
--- a/Project.toml
+++ b/Project.toml
@@ -61,7 +61,7 @@ Requires = "1.1"
SciMLBase = "1.90"
Setfield = "0.8, 1"
SimpleUnPack = "1.1"
-StartUpDG = "0.15"
+StartUpDG = "0.15, 0.16"
Static = "0.3, 0.4, 0.5, 0.6, 0.7, 0.8"
StaticArrays = "1"
StrideArrays = "0.1.18"
From d80283723710dbe2805b14ba31bbc943cced4f88 Mon Sep 17 00:00:00 2001
From: Hendrik Ranocha
Date: Tue, 11 Apr 2023 06:40:49 +0200
Subject: [PATCH 11/54] set version to v0.5.16
---
Project.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Project.toml b/Project.toml
index 48e519fcbec..981d4efb4f2 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper ", "Gregor Gassner ", "Hendrik Ranocha ", "Andrew R. Winters ", "Jesse Chan "]
-version = "0.5.16-pre"
+version = "0.5.16"
[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
From 628aee3d0c31598e81ec9afaba9666ab051fad04 Mon Sep 17 00:00:00 2001
From: Hendrik Ranocha
Date: Tue, 11 Apr 2023 06:41:05 +0200
Subject: [PATCH 12/54] set development version to v0.5.17-pre
---
Project.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Project.toml b/Project.toml
index 981d4efb4f2..71c197d7b84 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper ", "Gregor Gassner ", "Hendrik Ranocha ", "Andrew R. Winters ", "Jesse Chan "]
-version = "0.5.16"
+version = "0.5.17-pre"
[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
From 601af820456cb8c96673c5474d20dacbef6ffbe6 Mon Sep 17 00:00:00 2001
From: Michael Schlottke-Lakemper
Date: Thu, 13 Apr 2023 09:05:11 +0200
Subject: [PATCH 13/54] Add funding agency logos and update acknowledgements
(#1391)
* Add funding agency logos and update acknowledgements
* Update BMBF logo
* Center-align logos and put them at the top
* Update README.md
* Update README.md
* Update README.md
* Use jpg NSF logo
* Adjust image heights for visual size similarity
* Increase logo size and redistribute
* Center images; update Documenter
* add more information to VR acknowledgement
---------
Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Co-authored-by: Andrew Winters
---
README.md | 33 ++++++++++++++++++++++++++++++---
docs/src/index.md | 14 ++++++++++++--
2 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index c99901a29c1..3f0a3066c89 100644
--- a/README.md
+++ b/README.md
@@ -104,7 +104,7 @@ code from the cloned directory:
```bash
git clone git@github.com:trixi-framework/Trixi.jl.git
cd Trixi.jl
-mkdir run
+mkdir run
cd run
julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Install local Trixi clone
julia -e 'using Pkg; Pkg.add(["OrdinaryDiffEq", "Trixi2Vtk", "Plots"])' # Install additional packages
@@ -255,17 +255,44 @@ or [create an issue](https://github.com/trixi-framework/Trixi.jl/issues/new).
## Acknowledgments
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This project has benefited from funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
under Germany's Excellence Strategy EXC 2044-390685587, Mathematics Münster:
Dynamics-Geometry-Structure.
+This project has benefited from funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
+through the research unit FOR 5409 "Structure-Preserving Numerical Methods for Bulk- and
+Interface Coupling of Heterogeneous Models (SNuBIC)" (project number 463312734).
+
This project has benefited from funding from the European Research Council through the
ERC Starting Grant "An Exascale aware and Un-crashable Space-Time-Adaptive
Discontinuous Spectral Element Solver for Non-Linear Conservation Laws" (Extreme),
ERC grant agreement no. 714487.
-This project has benefited from funding from Vetenskapsrådet (VR, Swedish Research Council), Sweden grant
-agreement 2020-03642 VR.
+This project has benefited from funding from Vetenskapsrådet (VR, Swedish Research Council), Sweden
+through the VR Starting Grant "Shallow water flows including sediment transport and morphodynamics",
+VR grant agreement 2020-03642 VR.
This project has benefited from funding from the United States National Science Foundation under awards
DMS-1719818 and DMS-1943186.
+
+This project has benefited from funding from the German Federal Ministry of
+Education and Research through the project grant "Adaptive earth system modeling
+with significantly reduced computation time for exascale supercomputers
+(ADAPTEX)" (funding id: 16ME0668K).
diff --git a/docs/src/index.md b/docs/src/index.md
index f5b4d40eb71..f7e5d51d783 100644
--- a/docs/src/index.md
+++ b/docs/src/index.md
@@ -346,13 +346,23 @@ This project has benefited from funding by the Deutsche Forschungsgemeinschaft (
under Germany's Excellence Strategy EXC 2044-390685587, Mathematics Münster:
Dynamics-Geometry-Structure.
+This project has benefited from funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)
+through the research unit FOR 5409 "Structure-Preserving Numerical Methods for Bulk- and
+Interface Coupling of Heterogeneous Models (SNuBIC)" (project number 463312734).
+
This project has benefited from funding from the European Research Council through the
ERC Starting Grant "An Exascale aware and Un-crashable Space-Time-Adaptive
Discontinuous Spectral Element Solver for Non-Linear Conservation Laws" (Extreme),
ERC grant agreement no. 714487.
-This project has benefited from funding from Vetenskapsrådet (VR, Swedish Research Council), Sweden grant
-agreement 2020-03642 VR.
+This project has benefited from funding from Vetenskapsrådet (VR, Swedish Research Council), Sweden
+through the VR Starting Grant "Shallow water flows including sediment transport and morphodynamics",
+VR grant agreement 2020-03642 VR.
This project has benefited from funding from the United States National Science Foundation under awards
DMS-1719818 and DMS-1943186.
+
+This project has benefited from funding from the German Federal Ministry of
+Education and Research through the project grant "Adaptive earth system modeling
+with significantly reduced computation time for exascale supercomputers
+(ADAPTEX)" (funding id: 16ME0668K).
From bae6f34ed730ae65d4b4c17831732bf3d45ab44f Mon Sep 17 00:00:00 2001
From: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Date: Fri, 14 Apr 2023 14:11:19 -0500
Subject: [PATCH 14/54] ignore "run" directory (#1396)
---
.gitignore | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.gitignore b/.gitignore
index 2f294fbc911..a23cdb3f326 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,6 @@ coverage_report/
.vscode/
.DS_Store
+
+run
+run/*
\ No newline at end of file
From db0d9d951c9113c17f8bdf526b418e223042f48e Mon Sep 17 00:00:00 2001
From: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Date: Sun, 16 Apr 2023 09:41:29 -0500
Subject: [PATCH 15/54] Clean up curved `DGMulti` solvers (#1394)
---
Project.toml | 2 +-
src/Trixi.jl | 2 +-
src/solvers/dgmulti/dg.jl | 46 ++++-------
src/solvers/dgmulti/flux_differencing.jl | 33 ++++----
.../dgmulti/flux_differencing_gauss_sbp.jl | 77 ++-----------------
src/solvers/dgmulti/sbp.jl | 4 +-
src/solvers/dgmulti/types.jl | 6 --
7 files changed, 42 insertions(+), 128 deletions(-)
diff --git a/Project.toml b/Project.toml
index 71c197d7b84..d2619872859 100644
--- a/Project.toml
+++ b/Project.toml
@@ -61,7 +61,7 @@ Requires = "1.1"
SciMLBase = "1.90"
Setfield = "0.8, 1"
SimpleUnPack = "1.1"
-StartUpDG = "0.15, 0.16"
+StartUpDG = "0.16"
Static = "0.3, 0.4, 0.5, 0.6, 0.7, 0.8"
StaticArrays = "1"
StrideArrays = "0.1.18"
diff --git a/src/Trixi.jl b/src/Trixi.jl
index 9a1ecea4400..0ac1c76a7dd 100644
--- a/src/Trixi.jl
+++ b/src/Trixi.jl
@@ -76,7 +76,7 @@ import SummationByPartsOperators: integrate, semidiscretize,
upwind_operators
# DGMulti solvers
-@reexport using StartUpDG: StartUpDG, Polynomial, SBP, Line, Tri, Quad, Hex, Tet
+@reexport using StartUpDG: StartUpDG, Polynomial, Gauss, SBP, Line, Tri, Quad, Hex, Tet
using StartUpDG: RefElemData, MeshData, AbstractElemShape
# TODO: include_optimized
diff --git a/src/solvers/dgmulti/dg.jl b/src/solvers/dgmulti/dg.jl
index 4f34dde9d6b..dd6d9f43363 100644
--- a/src/solvers/dgmulti/dg.jl
+++ b/src/solvers/dgmulti/dg.jl
@@ -128,8 +128,8 @@ function reset_du!(du, dg::DGMulti, other_args...)
return du
end
-# Constructs cache variables that are shared between affine and non-affine (curved) DGMultiMeshes
-function _create_cache(mesh::DGMultiMesh, equations, dg::DGMultiWeakForm, RealT, uEltype)
+# Constructs cache variables for both affine and non-affine (curved) DGMultiMeshes
+function create_cache(mesh::DGMultiMesh{NDIMS}, equations, dg::DGMultiWeakForm, RealT, uEltype) where {NDIMS}
rd = dg.basis
md = mesh.md
@@ -154,39 +154,22 @@ function _create_cache(mesh::DGMultiMesh, equations, dg::DGMultiWeakForm, RealT,
# local storage for volume integral and source computations
local_values_threaded = [allocate_nested_array(uEltype, nvars, (rd.Nq,), dg) for _ in 1:Threads.nthreads()]
- return (; md, weak_differentiation_matrices, lift_scalings,
- u_values, u_face_values, flux_face_values, local_values_threaded)
-end
-
-# cache constructor for a non-curved `DGMultiMesh`
-function create_cache(mesh::DGMultiMesh, equations, dg::DGMultiWeakForm, RealT, uEltype)
- md = mesh.md
- return (; _create_cache(mesh, equations, dg, RealT, uEltype)..., invJ = inv.(md.J))
-end
-
-# cache constructor for a curved `DGMultiMesh`
-function create_cache(mesh::DGMultiMesh{NDIMS, <:NonAffine}, equations,
- dg::DGMultiWeakForm, RealT, uEltype) where {NDIMS}
- rd = dg.basis
- md = mesh.md
-
# For curved meshes, we interpolate geometric terms from nodal points to quadrature points.
- # The curved DGMultiMesh constructor interpolates md.rstxyzJ to *both* volume and face points
- # TODO: fix this by moving interpolation of rstxyzJ to cache.
- dxidxhatj = map(x -> getindex(x, 1:rd.Nq, :), md.rstxyzJ)
+ # For affine meshes, we just access one element of this interpolated data.
+ dxidxhatj = map(x -> rd.Vq * x, md.rstxyzJ)
# interpolate J to quadrature points for weight-adjusted DG (WADG)
invJ = inv.(rd.Vq * md.J)
- nvars = nvariables(equations)
-
+ # for scaling by curved geometric terms (not used by affine DGMultiMesh)
flux_threaded =
[[allocate_nested_array(uEltype, nvars, (rd.Nq,), dg) for _ in 1:NDIMS] for _ in 1:Threads.nthreads()]
rotated_flux_threaded =
[allocate_nested_array(uEltype, nvars, (rd.Nq,), dg) for _ in 1:Threads.nthreads()]
- return (; _create_cache(mesh, equations, dg, RealT, uEltype)...,
- invJ, dxidxhatj, flux_threaded, rotated_flux_threaded)
+ return (; md, weak_differentiation_matrices, lift_scalings, invJ, dxidxhatj,
+ u_values, u_face_values, flux_face_values,
+ local_values_threaded, flux_threaded, rotated_flux_threaded)
end
function allocate_coefficients(mesh::DGMultiMesh, equations, dg::DGMulti, cache)
@@ -281,7 +264,7 @@ function calc_volume_integral!(du, u, mesh::DGMultiMesh,
rd = dg.basis
md = mesh.md
- @unpack weak_differentiation_matrices, u_values, local_values_threaded = cache
+ @unpack weak_differentiation_matrices, dxidxhatj, u_values, local_values_threaded = cache
@unpack rstxyzJ = md # geometric terms
# interpolate to quadrature points
@@ -291,10 +274,9 @@ function calc_volume_integral!(du, u, mesh::DGMultiMesh,
flux_values = local_values_threaded[Threads.threadid()]
for i in eachdim(mesh)
- flux_values .= flux.(view(u_values,:,e), i, equations)
+ flux_values .= flux.(view(u_values, :, e), i, equations)
for j in eachdim(mesh)
- dxidxhatj = mesh.md.rstxyzJ[i, j][1, e]
- apply_to_each_field(mul_by_accum!(weak_differentiation_matrices[j], dxidxhatj),
+ apply_to_each_field(mul_by_accum!(weak_differentiation_matrices[j], dxidxhatj[i, j][1, e]),
view(du, :, e), flux_values)
end
end
@@ -506,8 +488,10 @@ end
# inverts Jacobian and scales by -1.0
function invert_jacobian!(du, mesh::DGMultiMesh, equations, dg::DGMulti, cache; scaling=-1)
- @threaded for i in each_dof_global(mesh, dg, cache)
- du[i] *= scaling * cache.invJ[i]
+ @threaded for e in eachelement(mesh, dg, cache)
+ for i in axes(du, 1)
+ du[i, e] *= scaling * cache.invJ[i, e]
+ end
end
end
diff --git a/src/solvers/dgmulti/flux_differencing.jl b/src/solvers/dgmulti/flux_differencing.jl
index ccab2abee16..97905f1d0b4 100644
--- a/src/solvers/dgmulti/flux_differencing.jl
+++ b/src/solvers/dgmulti/flux_differencing.jl
@@ -222,24 +222,23 @@ end
# and jth reference coordinate, respectively. These are geometric terms which
# appear when using the chain rule to compute physical derivatives as a linear
# combination of reference derivatives.
-@inline function get_contravariant_vector(element, orientation, mesh::DGMultiMesh{NDIMS}) where {NDIMS}
+@inline function get_contravariant_vector(element, orientation, mesh::DGMultiMesh{NDIMS}, cache) where {NDIMS}
# note that rstxyzJ = [rxJ, sxJ, txJ; ryJ syJ tyJ; rzJ szJ tzJ], so that this will return
# SVector{2}(rxJ[1, element], ryJ[1, element]) in 2D.
# assumes geometric terms are constant on each element
- @unpack rstxyzJ = mesh.md
- return SVector{NDIMS}(getindex.(rstxyzJ[:, orientation], 1, element))
+ dxidxhatj = mesh.md.rstxyzJ
+ return SVector{NDIMS}(getindex.(dxidxhatj[:, orientation], 1, element))
end
-@inline function get_contravariant_vector(element, orientation, mesh::DGMultiMesh{NDIMS, NonAffine}) where {NDIMS}
+@inline function get_contravariant_vector(element, orientation, mesh::DGMultiMesh{NDIMS, NonAffine}, cache) where {NDIMS}
# note that rstxyzJ = [rxJ, sxJ, txJ; ryJ syJ tyJ; rzJ szJ tzJ]
# assumes geometric terms vary spatially over each element
- @unpack rstxyzJ = mesh.md
- return SVector{NDIMS}(view.(rstxyzJ[:, orientation], :, element))
+ (; dxidxhatj) = cache
+ return SVector{NDIMS}(view.(dxidxhatj[:, orientation], :, element))
end
-
# use hybridized SBP operators for general flux differencing schemes.
function compute_flux_differencing_SBP_matrices(dg::DGMulti)
compute_flux_differencing_SBP_matrices(dg, has_sparse_operators(dg))
@@ -295,7 +294,7 @@ function create_cache(mesh::DGMultiMesh, equations, dg::DGMultiFluxDiffSBP, Real
# Use an array of SVectors (chunks of `nvars` are contiguous in memory) to speed up flux differencing
fluxdiff_local_threaded = [zeros(SVector{nvars, uEltype}, rd.Nq) for _ in 1:Threads.nthreads()]
- return (; md, Qrst_skew,
+ return (; md, Qrst_skew, dxidxhatj = md.rstxyzJ,
invJ = inv.(md.J), lift_scalings, inv_wq = inv.(rd.wq),
u_values, u_face_values, flux_face_values,
local_values_threaded, fluxdiff_local_threaded)
@@ -336,13 +335,19 @@ function create_cache(mesh::DGMultiMesh, equations, dg::DGMultiFluxDiff, RealT,
fluxdiff_local_threaded = [zeros(SVector{nvars, uEltype}, num_quad_points_total) for _ in 1:Threads.nthreads()]
rhs_local_threaded = [allocate_nested_array(uEltype, nvars, (num_quad_points_total,), dg) for _ in 1:Threads.nthreads()]
- return (; md, Qrst_skew,
- VhP, Ph, invJ = inv.(md.J),
+ # interpolate geometric terms to both quadrature and face values for curved meshes
+ (; Vq, Vf) = dg.basis
+ interpolated_geometric_terms = map(x -> [Vq; Vf] * x, mesh.md.rstxyzJ)
+ J = rd.Vq * md.J
+
+ return (; md, Qrst_skew, VhP, Ph,
+ invJ = inv.(J), dxidxhatj = interpolated_geometric_terms,
entropy_var_values, projected_entropy_var_values, entropy_projected_u_values,
- u_values, u_face_values, flux_face_values,
+ u_values, u_face_values, flux_face_values,
local_values_threaded, fluxdiff_local_threaded, rhs_local_threaded)
end
+
# TODO: DGMulti. Address hard-coding of `entropy2cons!` and `cons2entropy!` for this function.
function entropy_projection!(cache, u, mesh::DGMultiMesh, equations, dg::DGMulti)
@@ -405,7 +410,6 @@ end
# FD SBP methods have sparse operators
@inline has_sparse_operators(::Union{Line, Quad, Hex}, approx_type::AbstractDerivativeOperator) = True()
-# Todo: DGMulti. Dispatch on curved/non-curved mesh types, this code only works for affine meshes (accessing rxJ[1,e],...)
# Computes flux differencing contribution from each Cartesian direction over a single element.
# For dense operators, we do not use sum factorization.
@inline function local_flux_differencing!(fluxdiff_local, u_local, element_index,
@@ -443,7 +447,6 @@ end
end
end
-# Todo: DGMulti. Dispatch on curved/non-curved mesh types, this code only works for affine meshes (accessing rxJ[1,e],...)
# When the operators are sparse, we use the sum-factorization approach to
# computing flux differencing.
@inline function local_flux_differencing!(fluxdiff_local, u_local, element_index,
@@ -467,7 +470,7 @@ end
# Thus, we use the second option below (which basically corresponds to the
# well-known sum factorization on tensor product elements).
# Note that there is basically no difference for dense derivative operators.
- normal_direction = get_contravariant_vector(element_index, dim, mesh)
+ normal_direction = get_contravariant_vector(element_index, dim, mesh, cache)
Q_skew = Qrst_skew[dim]
# True() indicates the flux is symmetric
@@ -484,7 +487,7 @@ end
@unpack Qrst_skew = cache
flux_conservative, flux_nonconservative = volume_integral.volume_flux
for dim in eachdim(mesh)
- normal_direction = get_contravariant_vector(element_index, dim, mesh)
+ normal_direction = get_contravariant_vector(element_index, dim, mesh, cache)
Q_skew = Qrst_skew[dim]
# True() indicates the flux is symmetric
diff --git a/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl b/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl
index 8efd9c0e5e2..dfafe4ff98f 100644
--- a/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl
+++ b/src/solvers/dgmulti/flux_differencing_gauss_sbp.jl
@@ -4,8 +4,8 @@
# inside the @muladd block is edited. See https://github.com/trixi-framework/Trixi.jl/issues/801
# for more details.
-# GaussSBP ApproximationType: e.g., Gauss nodes on quads/hexes
-struct GaussSBP end
+# `GaussSBP` is a type alias for a StartUpDG type (e.g., Gauss nodes on quads/hexes)
+const GaussSBP = Polynomial{Gauss}
function tensor_product_quadrature(element_type::Line, r1D, w1D)
return r1D, w1D
@@ -311,85 +311,18 @@ end
end
end
-# Since GaussSBP uses Gauss quadrature which is exact for polynomials of degree N, the
-# inverse trace constants for GaussSBP are identical to polynomial inverse trace constants
-# in StartUpDG.jl, which have explicit formulas. These inverse trace constants are used in
-# CFL-based control of the time-step size.
-import StartUpDG: inverse_trace_constant
-inverse_trace_constant(rd::RefElemData{2, Quad, <:GaussSBP}) = (rd.N + 1) * (rd.N + 2)
-inverse_trace_constant(rd::RefElemData{3, Hex, <:GaussSBP}) = 3 * (rd.N + 1) * (rd.N + 2) / 2
-
-function DGMulti(element_type::Line,
- approximation_type::GaussSBP,
- volume_integral, surface_integral;
- polydeg::Integer,
- surface_flux=flux_central,
- kwargs...)
-
- # explicitly specify Gauss quadrature rule with polydeg+1 points
- rd = RefElemData(element_type, Polynomial(), polydeg,
- quad_rule_vol=StartUpDG.gauss_quad(0, 0, polydeg),
- kwargs...)
-
- # Since there is no dedicated GaussSBP approximation type implemented in StartUpDG, we simply
- # initialize `rd = RefElemData(...)` with the appropriate quadrature rules and modify the
- # rd.approximation_type manually so we can dispatch on the `GaussSBP` type.
- # This uses the Setfield @set macro, which behaves similarly to `Trixi.remake`.
- rd_gauss = @set rd.approximation_type = GaussSBP()
-
- # We will modify the face interpolation operator of rd_gauss later, but want to do so only after
- # the mesh is initialized, since the face interpolation operator is used for that.
- return DG(rd_gauss, nothing #= mortar =#, surface_integral, volume_integral)
-end
-
-# Specialized constructor for GaussSBP approximation type on quad elements.
-# TODO: I believe this is restricted to `VolumeIntegralFluxDifferencing` for now
-# since there isn't a way to exploit this structure for VolumeIntegralWeakForm yet.
-
-function DGMulti(element_type::Union{Quad, Hex},
- approximation_type::GaussSBP,
- volume_integral, surface_integral;
- polydeg::Integer,
- surface_flux=flux_central,
- kwargs...)
-
- # explicitly create tensor product Gauss quadrature rule with polydeg+1 points
- r1D, w1D = StartUpDG.gauss_quad(0, 0, polydeg)
- gauss_rule_vol = tensor_product_quadrature(element_type, r1D, w1D)
- gauss_rule_face = tensor_product_quadrature(StartUpDG.face_type(element_type), r1D, w1D)
-
- rd = RefElemData(element_type, Polynomial(), polydeg,
- quad_rule_vol=gauss_rule_vol,
- quad_rule_face=gauss_rule_face,
- kwargs...)
-
- # Since there is no dedicated GaussSBP approximation type implemented in StartUpDG, we simply
- # initialize `rd = RefElemData(...)` with the appropriate quadrature rules and modify the
- # rd.approximation_type manually so we can dispatch on the `GaussSBP` type.
- # This uses the Setfield @set macro, which behaves similarly to `Trixi.remake`.
- rd_gauss = @set rd.approximation_type = GaussSBP()
-
- # We will modify the face interpolation operator of rd_gauss later, but want to do so only after
- # the mesh is initialized, since the face interpolation operator is used for that.
- return DG(rd_gauss, nothing #= mortar =#, surface_integral, volume_integral)
-end
-
# For now, this is mostly the same as `create_cache` for DGMultiFluxDiff{<:Polynomial}.
# In the future, we may modify it so that we can specialize additional parts of GaussSBP() solvers.
function create_cache(mesh::DGMultiMesh, equations,
dg::DGMultiFluxDiff{<:GaussSBP, <:Union{Quad, Hex}}, RealT, uEltype)
- rd = dg.basis
- @unpack md = mesh
-
+ # call general Polynomial flux differencing constructor
cache = invoke(create_cache, Tuple{typeof(mesh), typeof(equations),
DGMultiFluxDiff, typeof(RealT), typeof(uEltype)},
mesh, equations, dg, RealT, uEltype)
- # Interpolate the Jacobian to Gauss points. Since we initialize `cache.invJ = inv.(md.J)`
- # in the `invoke` call to `create_cache`, it should be the right size since the number of
- # Gauss points is the same as the number of nodal Lobatto points.
- cache.invJ .= inv.(rd.Vq * md.J)
+ rd = dg.basis
+ @unpack md = mesh
# for change of basis prior to the volume integral and entropy projection
r1D, _ = StartUpDG.gauss_lobatto_quad(0, 0, polydeg(dg))
diff --git a/src/solvers/dgmulti/sbp.jl b/src/solvers/dgmulti/sbp.jl
index 797c941b0a4..f0070bc8a84 100644
--- a/src/solvers/dgmulti/sbp.jl
+++ b/src/solvers/dgmulti/sbp.jl
@@ -488,7 +488,7 @@ function calc_volume_integral!(du, u, mesh::DGMultiMesh,
if Threads.nthreads() > 1
for dim in eachdim(mesh)
- normal_direction = get_contravariant_vector(1, dim, mesh)
+ normal_direction = get_contravariant_vector(1, dim, mesh, cache)
# These are strong-form operators of the form `D = M \ Q` where `M` is diagonal
# and `Q` is skew-symmetric. Since `M` is diagonal, `inv(M)` scales the rows of `Q`.
@@ -525,7 +525,7 @@ function calc_volume_integral!(du, u, mesh::DGMultiMesh,
# is expected to yield about a 2x speedup, so we default to the symmetry-exploiting
# volume integral unless we have >2 threads (which should yield >2 speedup).
for dim in eachdim(mesh)
- normal_direction = get_contravariant_vector(1, dim, mesh)
+ normal_direction = get_contravariant_vector(1, dim, mesh, cache)
A = dg.basis.Drst[dim]
diff --git a/src/solvers/dgmulti/types.jl b/src/solvers/dgmulti/types.jl
index 219b312c822..9d1c378cd79 100644
--- a/src/solvers/dgmulti/types.jl
+++ b/src/solvers/dgmulti/types.jl
@@ -214,12 +214,6 @@ function DGMultiMesh(dg::DGMulti{NDIMS}, cells_per_dimension, mapping;
end
md_curved = MeshData(dg.basis, md, xyz...)
- # interpolate geometric terms to both volume and face cubature points
- @unpack rstxyzJ = md_curved
- @unpack Vq, Vf = dg.basis
- rstxyzJ_interpolated = map(x -> [Vq; Vf] * x, rstxyzJ)
- md_curved = @set md_curved.rstxyzJ = rstxyzJ_interpolated
-
boundary_faces = StartUpDG.tag_boundary_faces(md_curved, is_on_boundary)
return DGMultiMesh(dg, GeometricTermsType(Curved(), dg), md_curved, boundary_faces)
end
From 37b43ba29023ca33655e0523d961a4076a337d89 Mon Sep 17 00:00:00 2001
From: Michael Schlottke-Lakemper
Date: Mon, 17 Apr 2023 14:17:44 +0200
Subject: [PATCH 16/54] Change "Trixi" to "Trixi.jl" in all textual contexts
(#1395)
Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com>
Co-authored-by: Hendrik Ranocha
---
AUTHORS.md | 8 +--
CONTRIBUTING.md | 4 +-
LICENSE.md | 2 +-
NEWS.md | 2 +-
README.md | 52 +++++++++---------
benchmark/README.md | 4 +-
docs/literate/make.jl | 2 +-
docs/literate/src/files/DGMulti_1.jl | 4 +-
docs/literate/src/files/DGSEM_FluxDiff.jl | 10 ++--
.../src/files/adaptive_mesh_refinement.jl | 20 +++----
.../src/files/adding_new_scalar_equations.jl | 6 +--
.../files/adding_nonconservative_equation.jl | 2 +-
.../src/files/differentiable_programming.jl | 16 +++---
docs/literate/src/files/hohqmesh_tutorial.jl | 10 ++--
docs/literate/src/files/index.jl | 16 +++---
.../src/files/non_periodic_boundaries.jl | 8 +--
.../src/files/scalar_linear_advection_1d.jl | 4 +-
docs/literate/src/files/shock_capturing.jl | 10 ++--
.../src/files/structured_mesh_mapping.jl | 6 +--
docs/literate/src/files/time_stepping.jl | 4 +-
docs/make.jl | 4 +-
docs/src/callbacks.md | 14 ++---
docs/src/contributing.md | 4 +-
docs/src/conventions.md | 6 +--
docs/src/development.md | 54 +++++++++----------
docs/src/github-git.md | 10 ++--
docs/src/index.md | 52 +++++++++---------
docs/src/license.md | 2 +-
docs/src/meshes/dgmulti_mesh.md | 10 ++--
docs/src/meshes/tree_mesh.md | 4 +-
docs/src/meshes/unstructured_quad_mesh.md | 2 +-
docs/src/overview.md | 26 ++++-----
docs/src/parallelization.md | 18 +++----
docs/src/performance.md | 14 ++---
docs/src/styleguide.md | 2 +-
docs/src/testing.md | 10 ++--
docs/src/time_integration.md | 8 +--
docs/src/troubleshooting.md | 38 ++++++-------
docs/src/visualization.md | 28 +++++-----
examples/README.md | 8 +--
.../elixir_advection_extended.jl | 2 +-
.../p4est_3d_dgsem/elixir_advection_basic.jl | 2 +-
.../elixir_advection_unstructured_curved.jl | 2 +-
.../README.md | 10 ++--
examples/special_elixirs/elixir_euler_ad.jl | 2 +-
.../elixir_advection_extended.jl | 2 +-
.../elixir_advection_free_stream.jl | 2 +-
.../elixir_advection_waving_flag.jl | 2 +-
.../elixir_advection_basic.jl | 2 +-
.../elixir_advection_extended.jl | 2 +-
.../elixir_advection_callbacks.jl | 4 +-
.../elixir_advection_extended.jl | 2 +-
src/Trixi.jl | 8 +--
src/auxiliary/auxiliary.jl | 12 ++---
src/auxiliary/mpi.jl | 2 +-
src/auxiliary/p4est.jl | 8 +--
src/auxiliary/precompile.jl | 4 +-
src/auxiliary/special_elixirs.jl | 4 +-
src/callbacks_step/alive.jl | 2 +-
src/callbacks_step/time_series.jl | 2 +-
src/equations/acoustic_perturbation_2d.jl | 4 +-
src/equations/shallow_water_1d.jl | 4 +-
src/equations/shallow_water_2d.jl | 4 +-
src/meshes/p4est_mesh.jl | 6 +--
src/solvers/dg.jl | 6 +--
src/time_integration/methods_2N.jl | 6 +--
src/time_integration/methods_3Sstar.jl | 4 +-
src/time_integration/time_integration.jl | 2 +-
src/visualization/types.jl | 8 +--
src/visualization/utilities.jl | 18 +++----
test/test_dgmulti_1d.jl | 4 +-
test/test_dgmulti_2d.jl | 4 +-
test/test_dgmulti_3d.jl | 4 +-
test/test_mpi.jl | 4 +-
test/test_mpi_p4est_2d.jl | 2 +-
test/test_mpi_p4est_3d.jl | 2 +-
test/test_mpi_tree.jl | 2 +-
test/test_p4est_2d.jl | 4 +-
test/test_p4est_3d.jl | 4 +-
...est_paper_self_gravitating_gas_dynamics.jl | 6 +--
test/test_parabolic_2d.jl | 4 +-
test/test_parabolic_3d.jl | 4 +-
test/test_performance_specializations.jl | 4 +-
test/test_special_elixirs.jl | 6 +--
test/test_structured_1d.jl | 6 +--
test/test_structured_2d.jl | 6 +--
test/test_structured_3d.jl | 6 +--
test/test_threaded.jl | 4 +-
test/test_tree_1d.jl | 6 +--
test/test_tree_1d_advection.jl | 2 +-
test/test_tree_1d_burgers.jl | 2 +-
test/test_tree_1d_euler.jl | 2 +-
test/test_tree_1d_eulergravity.jl | 2 +-
test/test_tree_1d_eulermulti.jl | 2 +-
test/test_tree_1d_fdsbp.jl | 2 +-
test/test_tree_1d_hypdiff.jl | 2 +-
test/test_tree_1d_mhd.jl | 2 +-
test/test_tree_1d_mhdmulti.jl | 2 +-
test/test_tree_2d_acoustics.jl | 2 +-
test/test_tree_2d_advection.jl | 2 +-
test/test_tree_2d_euler.jl | 2 +-
test/test_tree_2d_eulermulti.jl | 2 +-
test/test_tree_2d_fdsbp.jl | 2 +-
test/test_tree_2d_hypdiff.jl | 2 +-
test/test_tree_2d_lbm.jl | 2 +-
test/test_tree_2d_linearizedeuler.jl | 2 +-
test/test_tree_2d_mhd.jl | 2 +-
test/test_tree_2d_mhdmulti.jl | 2 +-
test/test_tree_2d_part1.jl | 6 +--
test/test_tree_2d_part2.jl | 4 +-
test/test_tree_2d_part3.jl | 4 +-
test/test_tree_3d_advection.jl | 2 +-
test/test_tree_3d_euler.jl | 2 +-
test/test_tree_3d_eulergravity.jl | 2 +-
test/test_tree_3d_fdsbp.jl | 2 +-
test/test_tree_3d_hypdiff.jl | 2 +-
test/test_tree_3d_lbm.jl | 2 +-
test/test_tree_3d_mhd.jl | 2 +-
test/test_tree_3d_part1.jl | 4 +-
test/test_tree_3d_part2.jl | 4 +-
test/test_tree_3d_part3.jl | 4 +-
test/test_unit.jl | 2 +-
test/test_unstructured_2d.jl | 6 +--
test/test_visualization.jl | 8 +--
utils/build_sysimage.jl | 20 +++----
utils/trixi2tec.jl | 2 +-
utils/trixi2txt.jl | 2 +-
127 files changed, 421 insertions(+), 421 deletions(-)
diff --git a/AUTHORS.md b/AUTHORS.md
index 97f625b3ceb..941f294af86 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -1,10 +1,10 @@
# Authors
-Trixi's development is coordinated by a group of *principal developers*,
+Trixi.jl's development is coordinated by a group of *principal developers*,
who are also its main contributors and who can be contacted in case of
-questions about Trixi. In addition, there are *contributors* who have
+questions about Trixi.jl. In addition, there are *contributors* who have
provided substantial additions or modifications. Together, these two groups form
-"The Trixi Authors" as mentioned in the [LICENSE.md](LICENSE.md) file.
+"The Trixi.jl Authors" as mentioned in the [LICENSE.md](LICENSE.md) file.
## Principal Developers
* [Michael Schlottke-Lakemper](https://lakemper.eu),
@@ -19,7 +19,7 @@ provided substantial additions or modifications. Together, these two groups form
Rice University, US
## Contributors
-The following people contributed major additions or modifications to Trixi and
+The following people contributed major additions or modifications to Trixi.jl and
are listed in alphabetical order:
* Maximilian D. Bertrand
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5255ba33218..c3ad581062e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,12 +1,12 @@
# Contributing
-Trixi is an open-source project and we are very happy to accept contributions
+Trixi.jl is an open-source project and we are very happy to accept contributions
from the community. Please feel free to open issues or submit patches (preferably
as pull requests) any time. For planned larger contributions, it is often
beneficial to get in contact with one of the principal developers first (see
[AUTHORS.md](AUTHORS.md)).
-Trixi and its contributions are licensed under the MIT license (see
+Trixi.jl and its contributions are licensed under the MIT license (see
[LICENSE.md](LICENSE.md)). As a contributor, you certify that all your
contributions are in conformance with the *Developer Certificate of Origin
(Version 1.1)*, which is reproduced below.
diff --git a/LICENSE.md b/LICENSE.md
index 72700cbe42f..83ebae5239a 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2020-present The Trixi Authors (see [AUTHORS.md](AUTHORS.md))
+Copyright (c) 2020-present The Trixi.jl Authors (see [AUTHORS.md](AUTHORS.md))
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/NEWS.md b/NEWS.md
index 2ae6d46aa03..9b46ba565fe 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -167,7 +167,7 @@ for human readability.
`flux_lax_friedrichs(u_ll, u_rr, orientation, equations::LatticeBoltzmannEquations3D)`
were actually using the logic of `flux_godunov`. Thus, they were renamed accordingly
in [#493](https://github.com/trixi-framework/Trixi.jl/pull/493). This is considered a bugfix
- (released in Trixi v0.3.22).
+ (released in Trixi.jl v0.3.22).
- The required Julia version is updated to v1.6.
#### Deprecated
diff --git a/README.md b/README.md
index 3f0a3066c89..e368d8ce0d9 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@
**Trixi.jl** is a numerical simulation framework for hyperbolic conservation
laws written in [Julia](https://julialang.org). A key objective for the
framework is to be useful to both scientists and students. Therefore, next to
-having an extensible design with a fast implementation, Trixi is
+having an extensible design with a fast implementation, Trixi.jl is
focused on being easy to use for new or inexperienced users, including the
installation and postprocessing procedures. Its features include:
@@ -63,12 +63,12 @@ installation and postprocessing procedures. Its features include:
## Installation
If you have not yet installed Julia, please [follow the instructions for your
-operating system](https://julialang.org/downloads/platform/). Trixi works
+operating system](https://julialang.org/downloads/platform/). Trixi.jl works
with Julia v1.8.
### For users
-Trixi and its related tools are registered Julia packages. Hence, you
-can install Trixi, the visualization tool
+Trixi.jl and its related tools are registered Julia packages. Hence, you
+can install Trixi.jl, the visualization tool
[Trixi2Vtk](https://github.com/trixi-framework/Trixi2Vtk.jl),
[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl), and
[Plots.jl](https://github.com/JuliaPlots/Plots.jl)
@@ -81,13 +81,13 @@ julia> Pkg.add(["Trixi", "Trixi2Vtk", "OrdinaryDiffEq", "Plots"])
You can copy and paste all commands to the REPL *including* the leading
`julia>` prompts - they will automatically be stripped away by Julia.
The package [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl)
-provides time integration schemes used by Trixi, while
+provides time integration schemes used by Trixi.jl, while
[Plots.jl](https://github.com/JuliaPlots/Plots.jl) can be used to directly
-visualize Trixi's results from the REPL.
+visualize Trixi.jl's results from the REPL.
-*Note on package versions:* If some of the examples for how to use Trixi do not
-work, verify that you are using a recent Trixi release by comparing the
-installed Trixi version from
+*Note on package versions:* If some of the examples for how to use Trixi.jl do not
+work, verify that you are using a recent Trixi.jl release by comparing the
+installed Trixi.jl version from
```julia
julia> using Pkg; Pkg.update("Trixi"); Pkg.status("Trixi")
```
@@ -95,24 +95,24 @@ to the [latest release](https://github.com/trixi-framework/Trixi.jl/releases/lat
If the installed version does not match the current release, please check the
*Troubleshooting* section in the [documentation](#documentation).
-The commands above can also be used to update Trixi. A brief list of notable
-changes to Trixi is available in [`NEWS.md`](NEWS.md).
+The commands above can also be used to update Trixi.jl. A brief list of notable
+changes to Trixi.jl is available in [`NEWS.md`](NEWS.md).
### For developers
-If you plan on editing Trixi itself, you can download Trixi locally and use the
+If you plan on editing Trixi.jl itself, you can download Trixi.jl locally and use the
code from the cloned directory:
```bash
git clone git@github.com:trixi-framework/Trixi.jl.git
cd Trixi.jl
mkdir run
cd run
-julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Install local Trixi clone
+julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Install local Trixi.jl clone
julia -e 'using Pkg; Pkg.add(["OrdinaryDiffEq", "Trixi2Vtk", "Plots"])' # Install additional packages
```
Note that the postprocessing tools Trixi2Vtk.jl and Plots.jl are optional and
can be omitted.
-If you installed Trixi this way, you always have to start Julia with the `--project`
+If you installed Trixi.jl this way, you always have to start Julia with the `--project`
flag set to your `run` directory, e.g.,
```bash
julia --project=.
@@ -122,7 +122,7 @@ Further details can be found in the [documentation](#documentation).
## Usage
-In the Julia REPL, first load the package Trixi
+In the Julia REPL, first load the package Trixi.jl
```julia
julia> using Trixi
```
@@ -145,10 +145,10 @@ This will open a new window with a 2D visualization of the final solution:
The method `trixi_include(...)` expects a single string argument with the path to a
-Trixi elixir, i.e., a text file containing Julia code necessary to set up and run a
-simulation. To quickly see Trixi in action, `default_example()`
+Trixi.jl elixir, i.e., a text file containing Julia code necessary to set up and run a
+simulation. To quickly see Trixi.jl in action, `default_example()`
returns the path to an example elixir with a short, two-dimensional
-problem setup. A list of all example elixirs packaged with Trixi can be
+problem setup. A list of all example elixirs packaged with Trixi.jl can be
obtained by running `get_examples()`. Alternatively, you can also browse the
[`examples/`](examples/) subdirectory.
If you want to modify one of the elixirs to set up your own simulation,
@@ -164,7 +164,7 @@ instance, in the example above the first execution of `trixi_include` takes abou
### Showcase of advanced features
The presentation [From Mesh Generation to Adaptive Simulation: A Journey in Julia](https://youtu.be/_N4ozHr-t9E),
-originally given as part of JuliaCon 2022, outlines how to use Trixi for an adaptive simulation
+originally given as part of JuliaCon 2022, outlines how to use Trixi.jl for an adaptive simulation
of the compressible Euler equations in two spatial dimensions on a complex domain. More details
as well as code to run the simulation presented can be found at the
[reproducibility repository](https://github.com/trixi-framework/talk-2022-juliacon_toolchain)
@@ -172,15 +172,15 @@ for the presentation.
## Documentation
Additional documentation is available that contains more information on how to
-modify/extend Trixi's implementation, how to visualize output files etc. It
+modify/extend Trixi.jl's implementation, how to visualize output files etc. It
also includes a section on our preferred development workflow and some tips for
using Git. The latest documentation can be accessed either
[online](https://trixi-framework.github.io/Trixi.jl/stable) or under [`docs/src`](docs/src).
## Referencing
-If you use Trixi in your own research or write a paper using results obtained
-with the help of Trixi, please cite the following articles:
+If you use Trixi.jl in your own research or write a paper using results obtained
+with the help of Trixi.jl, please cite the following articles:
```bibtex
@article{ranocha2022adaptive,
title={Adaptive numerical simulations with {T}rixi.jl:
@@ -216,7 +216,7 @@ with the help of Trixi, please cite the following articles:
}
```
-In addition, you can also refer to Trixi directly as
+In addition, you can also refer to Trixi.jl directly as
```bibtex
@misc{schlottkelakemper2020trixi,
title={{T}rixi.jl: {A}daptive high-order numerical simulations
@@ -232,19 +232,19 @@ In addition, you can also refer to Trixi directly as
## Authors
-Trixi was initiated by [Michael
+Trixi.jl was initiated by [Michael
Schlottke-Lakemper](https://lakemper.eu)
(RWTH Aachen University, Germany) and
[Gregor Gassner](https://www.mi.uni-koeln.de/NumSim/gregor-gassner)
(University of Cologne, Germany). Together with [Hendrik Ranocha](https://ranocha.de)
(University of Hamburg, Germany), [Andrew Winters](https://liu.se/en/employee/andwi94)
(Linköping University, Sweden), and [Jesse Chan](https://jlchan.github.io) (Rice University, US),
-they are the principal developers of Trixi.
+they are the principal developers of Trixi.jl.
The full list of contributors can be found in [AUTHORS.md](AUTHORS.md).
## License and contributing
-Trixi is licensed under the MIT license (see [LICENSE.md](LICENSE.md)). Since Trixi is
+Trixi.jl is licensed under the MIT license (see [LICENSE.md](LICENSE.md)). Since Trixi.jl is
an open-source project, we are very happy to accept contributions from the
community. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
Note that we strive to be a friendly, inclusive open-source community and ask all members
diff --git a/benchmark/README.md b/benchmark/README.md
index 2bb0310938b..e299ab4c950 100644
--- a/benchmark/README.md
+++ b/benchmark/README.md
@@ -2,7 +2,7 @@
This folder contains some benchmark setups based on
[PkgBenchmark.jl](https://github.com/JuliaCI/PkgBenchmark.jl)
-as described in the [documentation of Trixi](https://trixi-framework.github.io/Trixi.jl/stable)
+as described in the [documentation of Trixi.jl](https://trixi-framework.github.io/Trixi.jl/stable)
in the "Performance" section.
Additionally, it contains subdirectories dedicated to specific micro benchmarks
-used when developing Trixi, e.g. `multiply_dimensionwise`.
+used when developing Trixi.jl, e.g. `multiply_dimensionwise`.
diff --git a/docs/literate/make.jl b/docs/literate/make.jl
index 68763164eb6..5b09cdea73b 100644
--- a/docs/literate/make.jl
+++ b/docs/literate/make.jl
@@ -25,7 +25,7 @@ function create_files(title, file, repo_src, pages_dir, notebooks_dir; folder=""
# Generate notebook file
function preprocess_notebook(content)
warning = "# **Note:** To improve responsiveness via caching, the notebooks are updated only once a week. They are only
- # available for the latest stable release of Trixi at the time of caching.\n\n"
+ # available for the latest stable release of Trixi.jl at the time of caching.\n\n"
return string("# # $title\n\n", warning, content)
end
Literate.notebook(joinpath(repo_src, folder, file), joinpath(notebooks_dir, folder); execute=false, preprocess=preprocess_notebook, credit=false)
diff --git a/docs/literate/src/files/DGMulti_1.jl b/docs/literate/src/files/DGMulti_1.jl
index 2deb2abb431..f50901d434c 100644
--- a/docs/literate/src/files/DGMulti_1.jl
+++ b/docs/literate/src/files/DGMulti_1.jl
@@ -144,7 +144,7 @@ plot!(getmesh(pd))
# ## Triangular meshes on non-Cartesian domains
-# To use triangular meshes on a non-Cartesian domain, Trixi uses the package [StartUpDG.jl](https://github.com/jlchan/StartUpDG.jl).
+# To use triangular meshes on a non-Cartesian domain, Trixi.jl uses the package [StartUpDG.jl](https://github.com/jlchan/StartUpDG.jl).
# The following example is based on [`elixir_euler_triangulate_pkg_mesh.jl`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/dgmulti_2d/elixir_euler_triangulate_pkg_mesh.jl)
# and uses a pre-defined mesh from StartUpDG.jl.
using Trixi, OrdinaryDiffEq
@@ -167,7 +167,7 @@ dg = DGMulti(polydeg = 3, element_type = Tri(),
meshIO = StartUpDG.triangulate_domain(StartUpDG.RectangularDomainWithHole());
# The pre-defined Triangulate geometry in StartUpDG has integer boundary tags. With [`DGMultiMesh`](@ref)
-# we assign boundary faces based on these integer boundary tags and create a mesh compatible with Trixi.
+# we assign boundary faces based on these integer boundary tags and create a mesh compatible with Trixi.jl.
mesh = DGMultiMesh(meshIO, dg, Dict(:outer_boundary=>1, :inner_boundary=>2))
#-
boundary_condition_convergence_test = BoundaryConditionDirichlet(initial_condition)
diff --git a/docs/literate/src/files/DGSEM_FluxDiff.jl b/docs/literate/src/files/DGSEM_FluxDiff.jl
index 3bd4995fd49..0ae78ec6234 100644
--- a/docs/literate/src/files/DGSEM_FluxDiff.jl
+++ b/docs/literate/src/files/DGSEM_FluxDiff.jl
@@ -115,7 +115,7 @@
-# ## [Implementation in Trixi](@id fluxDiffExample)
+# ## [Implementation in Trixi.jl](@id fluxDiffExample)
# Now, we have a look at the implementation of DGSEM with flux differencing with [Trixi.jl](https://github.com/trixi-framework/Trixi.jl).
using OrdinaryDiffEq, Trixi
@@ -146,10 +146,10 @@ equations = CompressibleEulerEquations2D(gamma)
# ```
# with $\phi = \tan^{-1}(\frac{x_2}{x_1})$.
-# This initial condition is implemented in Trixi under the name [`initial_condition_weak_blast_wave`](@ref).
+# This initial condition is implemented in Trixi.jl under the name [`initial_condition_weak_blast_wave`](@ref).
initial_condition = initial_condition_weak_blast_wave
-# In Trixi, flux differencing for the volume integral can be implemented with
+# In Trixi.jl, flux differencing for the volume integral can be implemented with
# [`VolumeIntegralFluxDifferencing`](@ref) using symmetric two-point volume fluxes.
# First, we set up a simulation with the entropy conserving and kinetic energy preserving
# flux [`flux_ranocha`](@ref) by [Hendrik Ranocha (2018)](https://cuvillier.de/en/shop/publications/7743)
@@ -161,7 +161,7 @@ volume_flux = flux_ranocha # = f_vol
solver = DGSEM(polydeg=3, surface_flux=volume_flux,
volume_integral=VolumeIntegralFluxDifferencing(volume_flux))
-# Now, we implement Trixi's `mesh`, `semi` and `ode` in a simple framework. For more information please
+# Now, we implement Trixi.jl's `mesh`, `semi` and `ode` in a simple framework. For more information please
# have a look at the documentation, the basic tutorial [introduction to DG methods](@ref scalar_linear_advection_1d)
# or some basic elixirs.
coordinates_min = (-2.0, -2.0)
@@ -232,7 +232,7 @@ plot(sol)
# Of course, you can use more than these two fluxes in Trixi. Here, we will give a short list
# of possible fluxes for the compressible Euler equations.
-# For the volume flux Trixi provides for example [`flux_ranocha`](@ref), [`flux_shima_etal`](@ref),
+# For the volume flux Trixi.jl provides for example [`flux_ranocha`](@ref), [`flux_shima_etal`](@ref),
# [`flux_chandrashekar`](@ref), [`flux_kennedy_gruber`](@ref).
# As surface flux you can use all volume fluxes and additionally for instance [`flux_lax_friedrichs`](@ref),
# [`flux_hll`](@ref), [`flux_hllc`](@ref).
diff --git a/docs/literate/src/files/adaptive_mesh_refinement.jl b/docs/literate/src/files/adaptive_mesh_refinement.jl
index f4611e4a891..d6150e887a8 100644
--- a/docs/literate/src/files/adaptive_mesh_refinement.jl
+++ b/docs/literate/src/files/adaptive_mesh_refinement.jl
@@ -5,10 +5,10 @@
# of the domain, we want the simulation to use elements with smaller mesh sizes compared to other
# regions. This should be automatically and dynamically adapted during the run of the simulation.
-# # Implementation in Trixi
+# # Implementation in Trixi.jl
# In [Trixi.jl](https://github.com/trixi-framework/Trixi.jl), AMR is possible for the mesh types
# [`TreeMesh`](@ref) and [`P4estMesh`](@ref). Both meshes are organized in a tree structure
-# and therefore, each element can be refined independently. In Trixi, AMR is restricted
+# and therefore, each element can be refined independently. In Trixi.jl, AMR is restricted
# to a 2:1 refinement ratio between neighbor elements. This means that the maximum resolution
# difference of neighboring elements is a factor of two.
@@ -17,7 +17,7 @@
# ### Indicators
# An indicator estimates the current accuracy of the numerical approximation. It indicates which regions
-# of the domain need finer or coarser resolutions. In Trixi, you can use for instance
+# of the domain need finer or coarser resolutions. In Trixi.jl, you can use for instance
# [`IndicatorLöhner`](@ref) and [`IndicatorHennemannGassner`](@ref).
# `IndicatorLöhner` (also callable with `IndicatorLoehner`) is an interpretation and adaptation of
@@ -45,7 +45,7 @@
# Another indicator is the very basic `IndicatorMax`. It indicates the maximal value of a variable
# and is therefore mostly used for verification and testing. But it might be useful for the basic
-# understanding of the implementation of indicators and AMR in Trixi.
+# understanding of the implementation of indicators and AMR in Trixi.jl.
# ````julia
# amr_indicator = IndicatorMax(semi, variable=variable)
# ````
@@ -57,12 +57,12 @@
# For instance, a mesh element of level `3` has double resolution in each direction compared to
# another element with level `2`.
-# To map specific indicator values to a desired level of refinement, Trixi uses controllers.
+# To map specific indicator values to a desired level of refinement, Trixi.jl uses controllers.
# They are build in three levels: There is a base level of refinement `base_level`, which is the
# minimum allowed refinement level. Then, there is a medium level `med_level`, which corresponds
# to the initial level of refinement, for indicator values above the threshold `med_threshold`
# and equally, a maximal level `max_level` for values above `max_threshold`.
-# This variant of controller is called [`ControllerThreeLevel`](@ref) in Trixi.
+# This variant of controller is called [`ControllerThreeLevel`](@ref) in Trixi.jl.
# ````julia
# amr_controller = ControllerThreeLevel(semi, amr_indicator;
# base_level=4,
@@ -164,13 +164,13 @@ plot!(getmesh(pd))
# # More examples
-# Trixi provides many elixirs using AMR. We want to give some examples for different mesh types:
+# Trixi.jl provides many elixirs using AMR. We want to give some examples for different mesh types:
# - `elixir_euler_blast_wave_amr.jl` for [`TreeMesh`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_euler_blast_wave_amr.jl)
# and [`P4estMesh`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/p4est_2d_dgsem/elixir_euler_blast_wave_amr.jl)
# - [`elixir_euler_kelvin_helmholtz_instability_amr.jl`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_amr.jl) for `TreeMesh`
# - [`elixir_euler_double_mach_amr.jl`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/p4est_2d_dgsem/elixir_euler_double_mach_amr.jl) for `P4estMesh`
-# Animations of more interesting and complicated AMR simulations can be found below and on Trixi's youtube channel
+# Animations of more interesting and complicated AMR simulations can be found below and on Trixi.jl's youtube channel
# ["Trixi Framework"](https://www.youtube.com/channel/UCpd92vU2HjjTPup-AIN0pkg).
# First, we give a [purely hyperbolic simulation of a Sedov blast wave with self-gravity](https://www.youtube.com/watch?v=dxgzgteJdOA).
@@ -186,7 +186,7 @@ plot!(getmesh(pd))
# -->
#
# ```
-# Source: Trixi's YouTube channel [`Trixi Framework`](https://www.youtube.com/channel/UCpd92vU2HjjTPup-AIN0pkg)
+# Source: Trixi.jl's YouTube channel [`Trixi Framework`](https://www.youtube.com/channel/UCpd92vU2HjjTPup-AIN0pkg)
# The next example is a numerical simulation of an [ideal MHD rotor on an unstructured AMR mesh](https://www.youtube.com/watch?v=Iei7e9oQ0hs).
# The used mesh type is a `P4estMesh`.
@@ -199,6 +199,6 @@ plot!(getmesh(pd))
# -->
#
# ```
-# Source: Trixi's YouTube channel [`Trixi Framework`](https://www.youtube.com/channel/UCpd92vU2HjjTPup-AIN0pkg)
+# Source: Trixi.jl's YouTube channel [`Trixi Framework`](https://www.youtube.com/channel/UCpd92vU2HjjTPup-AIN0pkg)
# For more information, please have a look at the respective links.
diff --git a/docs/literate/src/files/adding_new_scalar_equations.jl b/docs/literate/src/files/adding_new_scalar_equations.jl
index f5c2eae3693..a6eaa228aad 100644
--- a/docs/literate/src/files/adding_new_scalar_equations.jl
+++ b/docs/literate/src/files/adding_new_scalar_equations.jl
@@ -1,6 +1,6 @@
#src # Adding a new equation: scalar conservation laws
-# If you want to use Trixi for your own research, you might be interested in
+# If you want to use Trixi.jl for your own research, you might be interested in
# a new physics model that's not already included in Trixi.jl. In this tutorial,
# we will implement the cubic conservation law
# ```math
@@ -69,7 +69,7 @@ callbacks = CallbackSet(summary_callback)
sol = solve(ode, SSPRK43(),
save_everystep=false, callback=callbacks);
-# That's it, you ran your first simulation using your new equation with Trixi! Now, we can plot
+# That's it, you ran your first simulation using your new equation with Trixi.jl! Now, we can plot
# the solution at the final time using Plots.jl.
using Plots
plot(sol)
@@ -132,7 +132,7 @@ plot(sol)
# - to experiment with shock-capturing volume integrals [`VolumeIntegralShockCapturingHG`](@ref)
# and adaptive mesh refinement [`AMRCallback`](@ref)
-# For further reading, Trixi provides another example on adding a scalar equation. In the
+# For further reading, Trixi.jl provides another example on adding a scalar equation. In the
# [elixir about the KPP problem](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_kpp.jl),
# the 2D scalar "KPP equation" from [Kurganov, Petrova, Popov (2007)](https://doi.org/10.1137/040614189) is
# implemented.
diff --git a/docs/literate/src/files/adding_nonconservative_equation.jl b/docs/literate/src/files/adding_nonconservative_equation.jl
index d75c5bca1b9..08dd631058e 100644
--- a/docs/literate/src/files/adding_nonconservative_equation.jl
+++ b/docs/literate/src/files/adding_nonconservative_equation.jl
@@ -1,7 +1,7 @@
#src # Adding a new equation: nonconservative linear advection
using Test: @test #src
-# If you want to use Trixi for your own research, you might be interested in
+# If you want to use Trixi.jl for your own research, you might be interested in
# a new physics model that is not present in Trixi.jl. In this tutorial,
# we will implement the nonconservative linear advection equation in a periodic domain
# ```math
diff --git a/docs/literate/src/files/differentiable_programming.jl b/docs/literate/src/files/differentiable_programming.jl
index d7b5db8715b..ecc09d05dcf 100644
--- a/docs/literate/src/files/differentiable_programming.jl
+++ b/docs/literate/src/files/differentiable_programming.jl
@@ -13,7 +13,7 @@ using Test: @test #src
# ## Forward mode automatic differentiation
-# Trixi integrates well with [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl)
+# Trixi.jl integrates well with [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl)
# for forward mode AD.
@@ -124,7 +124,7 @@ condition_number = cond(V)
# ### Computing other derivatives
-# It is also possible to compute derivatives of other dependencies using AD in Trixi. For example,
+# It is also possible to compute derivatives of other dependencies using AD in Trixi.jl. For example,
# you can compute the gradient of an entropy-dissipative semidiscretization with respect to the
# ideal gas constant of the compressible Euler equations as described in the following. This example
# is also available as the elixir
@@ -208,7 +208,7 @@ round.(extrema(J), sigdigits=2)
norm(J[1:4:end])
@test norm(J[1:4:end]) == 0.0 #src
-# Here, we used some knowledge about the internal memory layout of Trixi, an array of structs
+# Here, we used some knowledge about the internal memory layout of Trixi.jl, an array of structs
# with the conserved variables as fastest-varying index in memory.
@@ -322,12 +322,12 @@ end;
# The semidiscretization `semi` uses some internal caches to avoid repeated allocations
# and speed up the computations, e.g. for numerical fluxes at interfaces. Thus, we
-# need to tell Trixi to allow `ForwardDiff.Dual` numbers in these caches. That's what
+# need to tell Trixi.jl to allow `ForwardDiff.Dual` numbers in these caches. That's what
# the keyword argument `uEltype=typeof(k)` in
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
uEltype=typeof(k));
-# does. This is basically the only part where you need to modify your standard Trixi
+# does. This is basically the only part where you need to modify your standard Trixi.jl
# code to enable automatic differentiation. From there on, the remaining steps
ode = semidiscretize(semi, (0.0, 1.0))
sol = solve(ode, BS3(), save_everystep=false)
@@ -343,7 +343,7 @@ round(Trixi.integrate(energy_total, sol.u[end], semi), sigdigits=5)
# [![Error bars by Randall Munroe](https://imgs.xkcd.com/comics/error_bars.png)](https://xkcd.com/2110/)
# "Error bars" by Randall Munroe, linked from https://xkcd.com/2110
-# Similar to AD, Trixi also allows propagating uncertainties using linear error propagation
+# Similar to AD, Trixi.jl also allows propagating uncertainties using linear error propagation
# theory via [Measurements.jl](https://github.com/JuliaPhysics/Measurements.jl).
# As an example, let's create a system representing the linear advection equation
# in 1D with an uncertain velocity. Then, we create a semidiscretization using a
@@ -381,7 +381,7 @@ plot(sol)
# ## Finite difference approximations
-# Trixi provides the convenience function [`jacobian_fd`](@ref) to approximate the Jacobian
+# Trixi.jl provides the convenience function [`jacobian_fd`](@ref) to approximate the Jacobian
# via central finite differences.
using Trixi, LinearAlgebra
@@ -413,7 +413,7 @@ relative_difference = norm(J_fd - J_ad) / size(J_fd, 1)
# \partial_t u(t) = A u(t) + b,
# ```
-# where `A` is a linear operator ("matrix") and `b` is a vector. Trixi allows you
+# where `A` is a linear operator ("matrix") and `b` is a vector. Trixi.jl allows you
# to obtain this linear structure in a matrix-free way by using [`linear_structure`](@ref).
# The resulting operator `A` can be used in multiplication, e.g. `mul!` from
# LinearAlgebra, converted to a sparse matrix using `sparse` from SparseArrays,
diff --git a/docs/literate/src/files/hohqmesh_tutorial.jl b/docs/literate/src/files/hohqmesh_tutorial.jl
index 2e54ecb3981..b53fca49ea6 100644
--- a/docs/literate/src/files/hohqmesh_tutorial.jl
+++ b/docs/literate/src/files/hohqmesh_tutorial.jl
@@ -41,7 +41,7 @@ end #hide #md
# This will compute a smooth, manufactured solution test case for the 2D compressible Euler equations
# on the curved quadrilateral mesh described in the
-# [Trixi documentation](https://trixi-framework.github.io/Trixi.jl/stable/meshes/unstructured_quad_mesh/).
+# [Trixi.jl documentation](https://trixi-framework.github.io/Trixi.jl/stable/meshes/unstructured_quad_mesh/).
# Apart from the usual error and timing output provided by the Trixi.jl run, it is useful to visualize and inspect
# the solution. One option available in the Trixi.jl framework to visualize the solution on
@@ -49,7 +49,7 @@ end #hide #md
# Trixi.jl output file(s) with the [`Trixi2Vtk`](https://github.com/trixi-framework/Trixi2Vtk.jl) tool
# and plotting them with [ParaView](https://www.paraview.org/download/).
-# To convert the HDF5-formatted `.h5` output file(s) from Trixi into VTK format execute the following
+# To convert the HDF5-formatted `.h5` output file(s) from Trixi.jl into VTK format execute the following
using Trixi2Vtk
redirect_stdio(stdout=devnull, stderr=devnull) do # code that prints annoying stuff we don't want to see here #hide #md
@@ -173,7 +173,7 @@ end
# available if you wish to also save a collection of mesh statistics. For this example it is deactivated.
# These file names given within `RUN_PARAMETERS` **should match** that of the control file, and although this is not required by
# HOHQMesh, it is a useful style convention.
-# The mesh file format `ISM-v2` in the format currently required by Trixi. The `polynomial order` prescribes the order
+# The mesh file format `ISM-v2` in the format currently required by Trixi.jl. The `polynomial order` prescribes the order
# of an interpolant constructed on the Chebyshev-Gauss-Lobatto nodes that is used to represent any curved boundaries on a particular element.
# The plot file format of `skeleton` means that visualizing the plot file will only draw the element boundaries (and no internal nodes).
# Alternatively, the format can be set to `sem` to visualize the interior nodes of the approximation as well.
@@ -535,7 +535,7 @@ mesh = UnstructuredMesh2D(mesh_file);
# Now, you can create a `P4estMesh` from your mesh file. It is described in detail in the
# [P4est-based mesh](https://trixi-framework.github.io/Trixi.jl/stable/meshes/p4est_mesh/#P4est-based-mesh)
-# part of the Trixi docs.
+# part of the Trixi.jl docs.
# ```julia
# using Trixi
# mesh_file = joinpath("out", "ice_cream_straight_sides.inp")
@@ -543,7 +543,7 @@ mesh = UnstructuredMesh2D(mesh_file);
# ```
# Since `P4estMesh` supports AMR, we just have to extend the setup from the first example by the
-# standard AMR procedure. For more information about AMR in Trixi, see the [matching tutorial](@ref adaptive_mesh_refinement).
+# standard AMR procedure. For more information about AMR in Trixi.jl, see the [matching tutorial](@ref adaptive_mesh_refinement).
# ```julia
# amr_indicator = IndicatorLöhner(semi, variable=density)
diff --git a/docs/literate/src/files/index.jl b/docs/literate/src/files/index.jl
index 899c18ff8d7..54e974595f7 100644
--- a/docs/literate/src/files/index.jl
+++ b/docs/literate/src/files/index.jl
@@ -10,7 +10,7 @@
# You can download the raw notebooks from GitHub via ![](https://camo.githubusercontent.com/aea75103f6d9f690a19cb0e17c06f984ab0f472d9e6fe4eadaa0cc438ba88ada/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f776e6c6f61642d6e6f7465626f6f6b2d627269676874677265656e).
# **Note:** To improve responsiveness via caching, the notebooks are updated only once a week. They are only
-# available for the latest stable release of Trixi at the time of caching.
+# available for the latest stable release of Trixi.jl at the time of caching.
# There are tutorials for the following topics:
@@ -25,19 +25,19 @@
#-
# To improve stability often the flux differencing formulation of the DGSEM (split form) is used.
# We want to present the idea and formulation on a basic 1D level. Then, we show how this formulation
-# can be implemented in Trixi and analyse entropy conservation for two different flux combinations.
+# can be implemented in Trixi.jl and analyse entropy conservation for two different flux combinations.
# ### [3 Shock capturing with flux differencing and stage limiter](@ref shock_capturing)
#-
# Using the flux differencing formulation, a simple procedure to capture shocks is a hybrid blending
# of a high-order DG method and a low-order subcell finite volume (FV) method. We present the idea on a
-# very basic level and show the implementation in Trixi. Then, a positivity preserving limiter is
+# very basic level and show the implementation in Trixi.jl. Then, a positivity preserving limiter is
# explained and added to an exemplary simulation of the Sedov blast wave with the 2D compressible Euler
# equations.
# ### [4 Non-periodic boundary conditions](@ref non_periodic_boundaries)
#-
-# Thus far, all examples used periodic boundaries. In Trixi, you can also set up a simulation with
+# Thus far, all examples used periodic boundaries. In Trixi.jl, you can also set up a simulation with
# non-periodic boundaries. This tutorial presents the implementation of the classical Dirichlet
# boundary condition with a following example. Then, other non-periodic boundaries are mentioned.
@@ -80,12 +80,12 @@
#-
# Adaptive mesh refinement (AMR) helps to increase the accuracy in sensitive or turbolent regions while
# not wasting ressources for less interesting parts of the domain. This leads to much more efficient
-# simulations. This tutorial presents the implementation strategy of AMR in Trixi, including the use of
+# simulations. This tutorial presents the implementation strategy of AMR in Trixi.jl, including the use of
# different indicators and controllers.
# ### [11 Structured mesh with curvilinear mapping](@ref structured_mesh_mapping)
#-
-# In this tutorial, the use of Trixi's structured curved mesh type [`StructuredMesh`](@ref) is explained.
+# In this tutorial, the use of Trixi.jl's structured curved mesh type [`StructuredMesh`](@ref) is explained.
# We present the two basic option to initialize such a mesh. First, the curved domain boundaries
# of a circular cylinder are set by explicit boundary functions. Then, a fully curved mesh is
# defined by passing the transformation mapping.
@@ -114,8 +114,8 @@
-# ## Examples in Trixi
-# Trixi already contains several more coding examples, the so-called `elixirs`. You can find them
+# ## Examples in Trixi.jl
+# Trixi.jl already contains several more coding examples, the so-called `elixirs`. You can find them
# in the folder [`examples`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/).
# They are structured by the underlying mesh type and the respective number of spatial dimensions.
# The name of an elixir is composed of the underlying system of conservation equations (for instance
diff --git a/docs/literate/src/files/non_periodic_boundaries.jl b/docs/literate/src/files/non_periodic_boundaries.jl
index 9517fbfcfae..54da88a64aa 100644
--- a/docs/literate/src/files/non_periodic_boundaries.jl
+++ b/docs/literate/src/files/non_periodic_boundaries.jl
@@ -104,7 +104,7 @@ end
# # Other available example elixirs with non-trivial BC
-# Moreover, there are other boundary conditions in Trixi. For instance, you can use the slip wall
+# Moreover, there are other boundary conditions in Trixi.jl. For instance, you can use the slip wall
# boundary condition [`boundary_condition_slip_wall`](@ref).
# Trixi.jl provides some interesting examples with different combinations of boundary conditions, e.g.
@@ -123,7 +123,7 @@ end
# -->
#
# ```
-# Source: [`Video`](https://www.youtube.com/watch?v=glAug1aIxio) on Trixi's YouTube channel [`Trixi Framework`](https://www.youtube.com/watch?v=WElqqdMhY4A)
+# Source: [`Video`](https://www.youtube.com/watch?v=glAug1aIxio) on Trixi.jl's YouTube channel [`Trixi Framework`](https://www.youtube.com/watch?v=WElqqdMhY4A)
# A double Mach reflection problem for the 2D compressible Euler equations
# [`elixir_euler_double_mach_amr.jl`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/p4est_2d_dgsem/elixir_euler_double_mach_amr.jl)
@@ -138,7 +138,7 @@ end
# -->
#
# ```
-# Source: [`Video`](https://www.youtube.com/watch?v=WElqqdMhY4A) on Trixi's YouTube channel [`Trixi Framework`](https://www.youtube.com/watch?v=WElqqdMhY4A)
+# Source: [`Video`](https://www.youtube.com/watch?v=WElqqdMhY4A) on Trixi.jl's YouTube channel [`Trixi Framework`](https://www.youtube.com/watch?v=WElqqdMhY4A)
# A channel flow around a cylinder at Mach 3
# [`elixir_euler_supersonic_cylinder.jl`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder.jl)
@@ -154,4 +154,4 @@ end
# -->
#
# ```
-# Source: [`Video`](https://www.youtube.com/watch?v=w0A9X38cSe4) on Trixi's YouTube channel [`Trixi Framework`](https://www.youtube.com/watch?v=WElqqdMhY4A)
+# Source: [`Video`](https://www.youtube.com/watch?v=w0A9X38cSe4) on Trixi.jl's YouTube channel [`Trixi Framework`](https://www.youtube.com/watch?v=WElqqdMhY4A)
diff --git a/docs/literate/src/files/scalar_linear_advection_1d.jl b/docs/literate/src/files/scalar_linear_advection_1d.jl
index 59b4e814993..d3a21dd7141 100644
--- a/docs/literate/src/files/scalar_linear_advection_1d.jl
+++ b/docs/literate/src/files/scalar_linear_advection_1d.jl
@@ -298,7 +298,7 @@ function rhs!(du, u, x, t)
## Calculate interface and boundary fluxes, $u^* = (u^*|_{-1}, 0, ..., 0, u^*|^1)^T$
## Since we use the flux Lax-Friedrichs from Trixi.jl, we have to pass some extra arguments.
- ## Trixi needs the equation we are dealing with and an additional `1`, that indicates the
+ ## Trixi.jl needs the equation we are dealing with and an additional `1`, that indicates the
## first coordinate direction.
equations = LinearScalarAdvectionEquation1D(1.0)
for element in 2:n_elements-1
@@ -374,7 +374,7 @@ mesh = TreeMesh(coordinates_min, coordinates_max,
n_cells_max=30_000) # set maximum capacity of tree data structure (only needed for AMR)
# A semidiscretization collects data structures and functions for the spatial discretization.
-# In Trixi, an initial condition has the following parameter structure and is of the type `SVector`.
+# In Trixi.jl, an initial condition has the following parameter structure and is of the type `SVector`.
initial_condition_sine_wave(x, t, equations) = SVector(1.0 + 0.5 * sin(pi * sum(x - equations.advection_velocity * t)))
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_sine_wave, solver)
diff --git a/docs/literate/src/files/shock_capturing.jl b/docs/literate/src/files/shock_capturing.jl
index 7ee1146117e..b165f7ec8bd 100644
--- a/docs/literate/src/files/shock_capturing.jl
+++ b/docs/literate/src/files/shock_capturing.jl
@@ -22,7 +22,7 @@
# Since the surface integral is equal for both the DG and the subcell FV method, only the volume integral divides
# between the two methods.
-# This strategy for the volume integral is implemented in Trixi under the name of
+# This strategy for the volume integral is implemented in Trixi.jl under the name of
# [`VolumeIntegralShockCapturingHG`](@ref) with the three parameters of the indicator and the volume fluxes for
# the DG and the subcell FV method.
@@ -74,7 +74,7 @@
# `density`, `pressure` or both with `density_pressure` for the compressible Euler equations.
# For every equation there is also the option to use the first conservation variable with `first`.
-# This indicator is implemented in Trixi and called [`IndicatorHennemannGassner`](@ref) with the parameters
+# This indicator is implemented in Trixi.jl and called [`IndicatorHennemannGassner`](@ref) with the parameters
# `equations`, `basis`, `alpha_max`, `alpha_min`, `alpha_smooth` and `variable`.
# ````julia
# indicator_sc = IndicatorHennemannGassner(equations, basis,
@@ -92,7 +92,7 @@
# or density for the compressible Euler equations. This often results in crashed simulations since
# the calculation of numerical fluxes or stable time steps uses mathematical operations like roots or
# logarithms. One option to avoid these cases are a-posteriori positivity preserving limiters.
-# Trixi provides the fully-discrete positivity-preserving limiter of
+# Trixi.jl provides the fully-discrete positivity-preserving limiter of
# [Zhang, Shu (2011)](https://doi.org/10.1098/rspa.2011.0153).
# It works the following way. For every passed (scalar) variable and for every DG element we calculate
@@ -117,7 +117,7 @@
# compressible Euler equations `density`, `pressure` or the combined variable `density_pressure`
# are a reasonable choice.
-# You can implement the limiter in Trixi using [`PositivityPreservingLimiterZhangShu`](@ref) with parameters
+# You can implement the limiter in Trixi.jl using [`PositivityPreservingLimiterZhangShu`](@ref) with parameters
# `threshold` and `variables`.
# ````julia
# stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds=thresholds,
@@ -191,7 +191,7 @@ volume_integral = VolumeIntegralShockCapturingHG(indicator_sc;
volume_flux_dg=volume_flux,
volume_flux_fv=surface_flux)
-# We finalize the discretization by implementing Trixi's `solver`, `mesh`, `semi` and `ode`,
+# We finalize the discretization by implementing Trixi.jl's `solver`, `mesh`, `semi` and `ode`,
# while `solver` now has the extra parameter `volume_integral`.
solver = DGSEM(basis, surface_flux, volume_integral)
diff --git a/docs/literate/src/files/structured_mesh_mapping.jl b/docs/literate/src/files/structured_mesh_mapping.jl
index a7ed8eb4304..98d20fabe4c 100644
--- a/docs/literate/src/files/structured_mesh_mapping.jl
+++ b/docs/literate/src/files/structured_mesh_mapping.jl
@@ -1,11 +1,11 @@
#src # Structured mesh with curvilinear mapping
-# Here, we want to introduce another mesh type of [Trixi](https://github.com/trixi-framework/Trixi.jl).
+# Here, we want to introduce another mesh type of [Trixi.jl](https://github.com/trixi-framework/Trixi.jl).
# More precisely, this tutorial is about the curved mesh type [`StructuredMesh`](@ref) supporting
# curved meshes.
# # Creating a curved mesh
-# There are two basic options to define a curved [`StructuredMesh`](@ref) in Trixi. You can
+# There are two basic options to define a curved [`StructuredMesh`](@ref) in Trixi.jl. You can
# implement curves for the domain boundaries, or alternatively, set up directly the complete
# transformation mapping. We now present one short example each.
@@ -197,7 +197,7 @@ plot!(getmesh(pd))
# For more curved mesh mappings, please have a look at some
# [elixirs for `StructuredMesh`](https://github.com/trixi-framework/Trixi.jl/tree/main/examples).
-# For another curved mesh type, there is a [tutorial](@ref hohqmesh_tutorial) about Trixi's
+# For another curved mesh type, there is a [tutorial](@ref hohqmesh_tutorial) about Trixi.jl's
# unstructured mesh type [`UnstructuredMesh2D`] and its use of the
# [High-Order Hex-Quad Mesh (HOHQMesh) generator](https://github.com/trixi-framework/HOHQMesh),
# created and developed by David Kopriva.
diff --git a/docs/literate/src/files/time_stepping.jl b/docs/literate/src/files/time_stepping.jl
index 3a09fec452b..c19a21c5a65 100644
--- a/docs/literate/src/files/time_stepping.jl
+++ b/docs/literate/src/files/time_stepping.jl
@@ -7,7 +7,7 @@
# ````julia
# solve(ode, alg; kwargs...)
# ````
-# In Trixi, the ODE problem is created by `semidiscretize(semi, tspan)` for a semidiscretization
+# In Trixi.jl, the ODE problem is created by `semidiscretize(semi, tspan)` for a semidiscretization
# `semi` and the time span `tspan`. In particular, [`semidiscretize`](@ref) returns an `ODEProblem`
# used by OrdinaryDiffEq.jl.
@@ -49,7 +49,7 @@
# We compute $\Delta x_i$ by scaling the element size by a factor of $1/(N+1)$, cf.
# [Gassner and Kopriva (2011)](https://doi.org/10.1137/100807211), Section 5.
-# Trixi provides such a CFL-based step size control. It is implemented as the callback
+# Trixi.jl provides such a CFL-based step size control. It is implemented as the callback
# [`StepsizeCallback`](@ref).
# ````julia
# stepsize_callback = StepsizeCallback(; cfl=1.0)
diff --git a/docs/make.jl b/docs/make.jl
index 0e76ea79b86..5069e4dc49a 100644
--- a/docs/make.jl
+++ b/docs/make.jl
@@ -9,7 +9,7 @@ end
using Trixi
using Trixi2Vtk
-# Get Trixi root directory
+# Get Trixi.jl root directory
trixi_root_dir = dirname(@__DIR__)
include(joinpath(trixi_root_dir, "docs", "literate", "make.jl"))
@@ -75,7 +75,7 @@ tutorials = create_tutorials(files)
makedocs(
# Specify modules for which docstrings should be shown
modules = [Trixi, Trixi2Vtk],
- # Set sitename to Trixi
+ # Set sitename to Trixi.jl
sitename="Trixi.jl",
# Provide additional formatting options
format = Documenter.HTML(
diff --git a/docs/src/callbacks.md b/docs/src/callbacks.md
index 14682d56721..dab3e2b934a 100644
--- a/docs/src/callbacks.md
+++ b/docs/src/callbacks.md
@@ -1,14 +1,14 @@
# [Callbacks](@id callbacks-id)
-Many of the advanced features of Trixi, such as adaptive mesh refinement, are implemented as
+Many of the advanced features of Trixi.jl, such as adaptive mesh refinement, are implemented as
callbacks. A callback is an algorithmic entity that gets passed to the ODE solver and
-is called at specific points during execution to perform certain tasks. Callbacks in Trixi are
+is called at specific points during execution to perform certain tasks. Callbacks in Trixi.jl are
either called after each time step (*step callbacks*) or after each stage of the ODE
solver (*stage callbacks*).
![callbacks_illustration](https://user-images.githubusercontent.com/65298011/108088616-f690c000-7078-11eb-9dd1-b673eac6cecf.png)
-The advantage of callbacks over hard-coding all features is that it allows to extend Trixi without
-modifying the internal source code. Trixi provides callbacks for time step
+The advantage of callbacks over hard-coding all features is that it allows to extend Trixi.jl without
+modifying the internal source code. Trixi.jl provides callbacks for time step
control, adaptive mesh refinement, I/O, and more.
## Step callbacks
@@ -18,7 +18,7 @@ Time step control can be performed with a [`StepsizeCallback`](@ref). An example
of this can be found at [examples/tree_2d_dgsem/elixir\_advection\_basic.jl](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_advection_basic.jl)
### Adaptive mesh refinement
-Trixi uses a hierarchical Cartesian mesh which can be locally refined in a solution-adaptive way.
+Trixi.jl uses a hierarchical Cartesian mesh which can be locally refined in a solution-adaptive way.
This can be used to speed up simulations with minimal loss in overall accuracy. Adaptive mesh refinement (AMR) can be used by
passing an [`AMRCallback`](@ref) to the ODE solver. The `AMRCallback` requires a controller such as
[`ControllerThreeLevel`](@ref) or [`ControllerThreeLevelCombined`](@ref) to tell the AMR
@@ -110,7 +110,7 @@ will yield the following plot:
via [`trixi_include`](@ref).
### Equation-specific callbacks
-Some callbacks provided by Trixi implement specific features for certain equations:
+Some callbacks provided by Trixi.jl implement specific features for certain equations:
* The [`LBMCollisionCallback`](@ref) implements the Lattice-Boltzmann method (LBM) collision
operator and should only be used when solving the Lattice-Boltzmann equations. See e.g.
[examples/tree_2d_dgsem/elixir\_lbm\_constant.jl](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_lbm_constant.jl)
@@ -155,7 +155,7 @@ physical constraints. An example elixir using this feature can be found at
[examples/tree_2d_dgsem/elixir\_euler\_positivity.jl](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_euler_positivity.jl).
## Implementing new callbacks
-Since Trixi is compatible with [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl),
+Since Trixi.jl is compatible with [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl),
both packages share the same callback interface. A detailed description of it can be found in the
OrdinaryDiffEq.jl [documentation](https://diffeq.sciml.ai/latest/).
Step callbacks are just called [callbacks](https://diffeq.sciml.ai/latest/features/callback_functions/).
diff --git a/docs/src/contributing.md b/docs/src/contributing.md
index cf120354937..5f996477215 100644
--- a/docs/src/contributing.md
+++ b/docs/src/contributing.md
@@ -1,12 +1,12 @@
# Contributing
-Trixi is an open-source project and we are very happy to accept contributions
+Trixi.jl is an open-source project and we are very happy to accept contributions
from the community. Please feel free to open issues or submit patches (preferably
as merge requests) any time. For planned larger contributions, it is often
beneficial to get in contact with one of the principal developers first (see
[Authors](@ref)).
-Trixi and its contributions are licensed under the MIT license (see
+Trixi.jl and its contributions are licensed under the MIT license (see
[License](@ref)). As a contributor, you certify that all your
contributions are in conformance with the *Developer Certificate of Origin
(Version 1.1)*, which is reproduced below.
diff --git a/docs/src/conventions.md b/docs/src/conventions.md
index 2884451363e..dab1b8533a5 100644
--- a/docs/src/conventions.md
+++ b/docs/src/conventions.md
@@ -78,14 +78,14 @@ set via the keywords
To allow adaptive mesh refinement efficiently when using time integrators from
[OrdinaryDiffEq](https://github.com/SciML/OrdinaryDiffEq.jl),
-Trixi allows to represent numerical solutions in two different ways. Some discussion
+Trixi.jl allows to represent numerical solutions in two different ways. Some discussion
can be found [online](https://github.com/SciML/OrdinaryDiffEq.jl/pull/1275) and
in form of comments describing `Trixi.wrap_array` and `Trixi.wrap_array_native`
-in the source code of Trixi.
+in the source code of Trixi.jl.
The flexibility introduced by this possible wrapping enables additional
[performance optimizations](https://github.com/trixi-framework/Trixi.jl/pull/509).
However, it comes at the cost of some additional abstractions (and needs to be
-used with caution, as described in the source code of Trixi). Thus, we use the
+used with caution, as described in the source code of Trixi.jl). Thus, we use the
following conventions to distinguish between arrays visible to the time integrator
and wrapped arrays mainly used internally.
diff --git a/docs/src/development.md b/docs/src/development.md
index 483ddc785ff..f7c41a398b8 100644
--- a/docs/src/development.md
+++ b/docs/src/development.md
@@ -7,11 +7,11 @@ incurs an overhead each time a program is run. For proper packages and commands
executed in the REPL (= "return-eval-print loop", which is what the Julia
community calls the interactive command-line prompt that opens when executing
`julia` without any files as arguments), however, the previously compiled functions are
-cached. Therefore, Trixi should generally always be used interactively from the
+cached. Therefore, Trixi.jl should generally always be used interactively from the
REPL without closing Julia during development, as it allows much faster turnaround times.
-If you naively run Trixi from the REPL, you will not be able to change your
-Trixi source files and then run the changed code without restarting the REPL,
+If you naively run Trixi.jl from the REPL, you will not be able to change your
+Trixi.jl source files and then run the changed code without restarting the REPL,
which destroys any potential benefits from caching. However, restarting
Julia can be avoided by using the [Revise.jl](https://github.com/timholy/Revise.jl)
package, which tracks changed files and re-loads them automatically. Therefore,
@@ -20,7 +20,7 @@ To enter the package REPL mode, press `]` in the standard Julia REPL mode. Then,
```julia-repl
(@v1.8) pkg> add Revise
```
-Now you are able to run Trixi from the REPL, change Trixi code between runs,
+Now you are able to run Trixi.jl from the REPL, change Trixi.jl code between runs,
**and** enjoy the advantages of the compilation cache! Before you start using
Revise regularly, please be aware of some of the [Pitfalls when using Revise](@ref).
@@ -35,8 +35,8 @@ improvements for using Julia interactively. To automatically use OhMyREPL when
starting the REPL, follow the instructions given in the official
[documentation](https://kristofferc.github.io/OhMyREPL.jl/latest/).
-### Running Trixi interactively in the global environment
-If you've installed Trixi and Revise in your default environment,
+### Running Trixi.jl interactively in the global environment
+If you've installed Trixi.jl and Revise in your default environment,
begin by executing:
```bash
julia
@@ -54,15 +54,15 @@ modern workstation. Most of the time is spent on compilation of Julia code etc.
If you execute the last command again in the same REPL, it will finish within a
few milliseconds (maybe ~45 on a modern workstation). This demonstrates the
second reason for using the REPL: the compilation cache. That is, those parts
-of the code that do not change between two Trixi runs do not need to be
+of the code that do not change between two Trixi.jl runs do not need to be
recompiled and thus execute much faster after the first run.
-### Manually starting Trixi in the local environment
+### Manually starting Trixi.jl in the local environment
If you followed the [installation instructions for developers](@ref for-developers), execute
Julia with the project directory set to the `run` directory of the
program/tool you want to use.
-For example, to run Trixi this way, you need to start the REPL with
+For example, to run Trixi.jl this way, you need to start the REPL with
```bash
julia --project=path/to/Trixi.jl/run
```
@@ -70,10 +70,10 @@ and execute
```julia-repl
julia> using Revise; using Trixi
```
-to load Revise and Trixi. You can then proceed with the usual commands and run Trixi as in
+to load Revise and Trixi.jl. You can then proceed with the usual commands and run Trixi.jl as in
the example [above](#Running-Trixi-interactively-in-the-global-environment-1).
-The `--project` flag is required such that Julia can properly load Trixi and all dependencies
-if Trixi is not installed in the global environment. The same procedure also
+The `--project` flag is required such that Julia can properly load Trixi.jl and all dependencies
+if Trixi.jl is not installed in the global environment. The same procedure also
applies should you opt to install the postprocessing tool
[Trixi2Vtk](https://github.com/trixi-framework/Trixi2Vtk.jl)
manually such that you can modify their implementations.
@@ -82,7 +82,7 @@ manually such that you can modify their implementations.
### Pitfalls when using Revise
While Revise is a great help for developing Julia code, there are a few
situations to watch out for when using Revise. The following list of potential
-issues is based on personal experiences of the Trixi developers and probably
+issues is based on personal experiences of the Trixi.jl developers and probably
incomplete. Further information on limitations and possible issues with Revise
can be found in the official [documentation](https://timholy.github.io/Revise.jl/stable/).
@@ -98,7 +98,7 @@ Revise does not stop on syntax errors, e.g., when you accidentally write
to use the old version of your files**! This is especially dangerous for syntax
errors, as they are detected while Revise reloads changed code, which happens in
the beginning of a new execution. Thus, the syntax error message quickly
-disappears from the terminal once Trixi starts writing output to the screen and
+disappears from the terminal once Trixi.jl starts writing output to the screen and
you might not even have noticed that an error occurred at all.
Therefore, when you are deep in a coding/debugging session and wonder why your
@@ -107,7 +107,7 @@ check if you missed earlier syntax errors, or - if in doubt - restart your REPL.
#### Files are not tracked after changing branches
Sometimes, Revise stops tracking files when changing the Git branch. That is,
-modifications to Trixi's source files will not be reloaded by Revise and thus
+modifications to Trixi.jl's source files will not be reloaded by Revise and thus
have no effect of a currently running REPL session. This issue is
particularly annoying for a developer, since it **does not come with any
warning**! Therefore, it is good practice to always restart the REPL after
@@ -138,7 +138,7 @@ than can increase your productivity in the Julia REPL.
include the file elixir and evaluate its content in the global scope of module mod. You can override specific
assignments in elixir by supplying keyword arguments. It's basic purpose is to make it easier to modify some
- parameters while running Trixi from the REPL. Additionally, this is used in tests to reduce the computational
+ parameters while running Trixi.jl from the REPL. Additionally, this is used in tests to reduce the computational
burden for CI while still providing examples with sensible default values for users.
Examples
@@ -233,7 +233,7 @@ Julia offers several options for debugging. A classical debugger is available wi
[Debugger.jl](https://github.com/JuliaDebug/Debugger.jl) package or in the
[Julia extension for VS Code](https://www.julia-vscode.org/docs/stable/userguide/debugging/).
However, it can be quite slow and, at the time of writing (January 2023), currently does not work
-properly with Trixi. The [Infiltrator.jl](https://github.com/JuliaDebug/Infiltrator.jl) package on
+properly with Trixi.jl. The [Infiltrator.jl](https://github.com/JuliaDebug/Infiltrator.jl) package on
the other hand does not offer all features of a full debugger, but is a fast and simple tool that
allows users to set breakpoints to open a local REPL session and access the call stack and variables.
@@ -266,7 +266,7 @@ in your package without having to restart Julia.
Main.Infiltrator.infiltrate(@__MODULE__, Base.@locals, @__FILE__, @__LINE__)
end
```
- can be used to set breakpoints when working with Trixi or other packages.
+ can be used to set breakpoints when working with Trixi.jl or other packages.
Triggering the breakpoint starts a REPL session where it is possible to interact with the current
local scope. Possible commands are:
@@ -285,7 +285,7 @@ Limitations of using Infiltrator.jl are that local variables cannot be changed,
possible to step into further calls or access other function scopes.
-## Releasing a new version of Trixi, Trixi2Vtk
+## Releasing a new version of Trixi.jl, Trixi2Vtk
- Check whether everything is okay, tests pass etc.
- Set the new version number in `Project.toml` according to the Julian version of semver.
@@ -295,15 +295,15 @@ possible to step into further calls or access other function scopes.
Wait for it to be merged.
- Increment the version number in `Project.toml` again with suffix `-pre`. For example,
if you have released version `v0.2.0`, use `v0.2.1-pre` as new version number.
-- When a new version of Trixi was released, check whether the `[compat]` entries
+- When a new version of Trixi.jl was released, check whether the `[compat]` entries
in `test/Project.toml` in Trixi2Vtk should be updated.
When a new version of Trixi2Vtk was released, check whether the `[compat]`
- entries in `docs/Project.toml` in Trixi should be updated.
+ entries in `docs/Project.toml` in Trixi.jl should be updated.
These entries will also be checked regularly by CompatHelper (once a day). Hence,
if everything was released correctly, you should only need to do these checks manually
if new minor versions with changes in the docs of Trixi2Vtk were released
- but no new version of Trixi was released afterwards.
+ but no new version of Trixi.jl was released afterwards.
@@ -320,17 +320,17 @@ For PRs triggered from branches inside the Trixi.jl main repository previews of
the new documentation are generated at `https://trixi-framework.github.io/Trixi.jl/previews/PRXXX`,
where `XXX` is the number of the PR.
This does not work for PRs from forks for security reasons (since anyone could otherwise push
-arbitrary stuff to the Trixi website, including malicious code).
+arbitrary stuff to the Trixi.jl website, including malicious code).
## [Developing Trixi2Vtk](@id trixi2vtk-dev)
-Trixi2Vtk has Trixi as dependency and uses Trixi's implementation to, e.g., load mesh files.
-When developing Trixi2Vtk, one may want to change functions in Trixi to allow them to be reused
+Trixi2Vtk has Trixi.jl as dependency and uses Trixi.jl's implementation to, e.g., load mesh files.
+When developing Trixi2Vtk, one may want to change functions in Trixi.jl to allow them to be reused
in Trixi2Vtk.
-To use a locally modified Trixi clone instead of a Trixi release, one can tell Pkg
-to use the local source code of Trixi instead of a registered version by running
+To use a locally modified Trixi.jl clone instead of a Trixi.jl release, one can tell Pkg
+to use the local source code of Trixi.jl instead of a registered version by running
```julia-repl
(@v1.8) pkg> develop path/to/Trixi.jl
```
diff --git a/docs/src/github-git.md b/docs/src/github-git.md
index 79e5db793b3..ad5991d87af 100644
--- a/docs/src/github-git.md
+++ b/docs/src/github-git.md
@@ -1,10 +1,10 @@
# GitHub & Git
-This page contains information on how to use GitHub and Git when developing Trixi.
+This page contains information on how to use GitHub and Git when developing Trixi.jl.
## Development workflow
-For adding modifications to Trixi, we generally follow these steps:
+For adding modifications to Trixi.jl, we generally follow these steps:
### Create an issue (optional)
In many cases it makes sense to start by creating an issue on GitHub. For
@@ -53,7 +53,7 @@ changes or dive in and change something themselves.
!!! warning "Avoid committing unwanted files"
When you use `git add .` or similar catch-all versions, make sure you do not
- accidentally commit unwanted files (e.g., Trixi output files, images or
+ accidentally commit unwanted files (e.g., Trixi.jl output files, images or
videos etc.). If it happens anyways, you can undo the last commit (also
multiple times) by running `git reset HEAD~` (see also [Undo last
commit](@ref)). However, this strategy only works if you have **not yet
@@ -114,7 +114,7 @@ person developing changes: We try to review all code before it gets added to
`main`, even from the most experienced developers. This is good practice and
helps to keep the error rate low while ensuring the the code is developed in a
consistent fashion. Furthermore, do not take criticism of your code personally -
-we just try to keep Trixi as accessible and easy to use for everyone.
+we just try to keep Trixi.jl as accessible and easy to use for everyone.
### Merge branch
Once your branch is reviewed and declared ready for merging by the reviewer,
@@ -165,7 +165,7 @@ let us know as fast as possible, since the effort to fix the repository grows
considerably over time.
#### Remove large file from repository
-If a large file was accidentally committed **and pushed** to the Trixi
+If a large file was accidentally committed **and pushed** to the Trixi.jl
repository, please talk to one of the core developers as soon as possible so that they can fix it.
!!! danger "Large files"
diff --git a/docs/src/index.md b/docs/src/index.md
index f7e5d51d783..3d1767fd51e 100644
--- a/docs/src/index.md
+++ b/docs/src/index.md
@@ -14,7 +14,7 @@
is a numerical simulation framework for hyperbolic conservation
laws written in [Julia](https://julialang.org). A key objective for the
framework is to be useful to both scientists and students. Therefore, next to
-having an extensible design with a fast implementation, Trixi is
+having an extensible design with a fast implementation, Trixi.jl is
focused on being easy to use for new or inexperienced users, including the
installation and postprocessing procedures. Its features include:
@@ -57,12 +57,12 @@ installation and postprocessing procedures. Its features include:
## Installation
If you have not yet installed Julia, please [follow the instructions for your
-operating system](https://julialang.org/downloads/platform/). Trixi works
+operating system](https://julialang.org/downloads/platform/). Trixi.jl works
with Julia v1.8.
### For users
-Trixi and its related tools are registered Julia packages. Hence, you
-can install Trixi, the visualization tool
+Trixi.jl and its related tools are registered Julia packages. Hence, you
+can install Trixi.jl, the visualization tool
[Trixi2Vtk](https://github.com/trixi-framework/Trixi2Vtk.jl),
[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl), and
[Plots.jl](https://github.com/JuliaPlots/Plots.jl)
@@ -75,13 +75,13 @@ julia> Pkg.add(["Trixi", "Trixi2Vtk", "OrdinaryDiffEq", "Plots"])
You can copy and paste all commands to the REPL *including* the leading
`julia>` prompts - they will automatically be stripped away by Julia.
The package [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl)
-provides time integration schemes used by Trixi, while
+provides time integration schemes used by Trixi.jl, while
[Plots.jl](https://github.com/JuliaPlots/Plots.jl) can be used to directly
-visualize Trixi's results from the REPL.
+visualize Trixi.jl's results from the REPL.
-*Note on package versions:* If some of the examples for how to use Trixi do not
-work, verify that you are using a recent Trixi release by comparing the
-installed Trixi version from
+*Note on package versions:* If some of the examples for how to use Trixi.jl do not
+work, verify that you are using a recent Trixi.jl release by comparing the
+installed Trixi.jl version from
```julia
julia> using Pkg; Pkg.update("Trixi"); Pkg.status("Trixi")
```
@@ -89,11 +89,11 @@ to the [latest release](https://github.com/trixi-framework/Trixi.jl/releases/lat
If the installed version does not match the current release, please check the
[Troubleshooting](@ref old-release) section.
-The commands above can also be used to update Trixi. A brief list of notable
-changes to Trixi is available in [`NEWS.md`](https://github.com/trixi-framework/Trixi.jl/NEWS.md).
+The commands above can also be used to update Trixi.jl. A brief list of notable
+changes to Trixi.jl is available in [`NEWS.md`](https://github.com/trixi-framework/Trixi.jl/NEWS.md).
### [For developers](@id for-developers)
-If you plan on editing Trixi itself, you can download Trixi to a local folder
+If you plan on editing Trixi.jl itself, you can download Trixi.jl to a local folder
and use the code from the cloned directory:
```bash
git clone git@github.com:trixi-framework/Trixi.jl.git
@@ -102,7 +102,7 @@ mkdir run
cd run
julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))'
```
-If you installed Trixi this way, you always have to start Julia with the `--project`
+If you installed Trixi.jl this way, you always have to start Julia with the `--project`
flag set to your `run` directory, e.g.,
```bash
julia --project=.
@@ -129,7 +129,7 @@ can be omitted.
-### Example: Installing Trixi as a package
+### Example: Installing Trixi.jl as a package
```@raw html