Skip to content

Commit

Permalink
Revise bounds check for MCL (#118)
Browse files Browse the repository at this point in the history
* Revise bounds check for MCL

* Rename `idp_bounds_delta` for MCL to `mcl_bounds_delta`

* Remove comment

* Fix allocs (trixi-framework#1695)

* Fix allocs

* remove unnecessary code

* rerun fmt

* format

* Allocation tests dgmulti 2d (trixi-framework#1698)

* HLLE CEE 2D3D NonCartesian Meshes (trixi-framework#1692)

* HLLE CEE 2D3D NonCartesian Meshes

* format

* hlle via hll

* format test

* format test

* format

* do not export hlle

* Correct test vals

* test values CI

* Update src/equations/compressible_euler_2d.jl

Co-authored-by: Hendrik Ranocha <[email protected]>

* Update src/equations/compressible_euler_1d.jl

Co-authored-by: Hendrik Ranocha <[email protected]>

* Update src/equations/compressible_euler_2d.jl

Co-authored-by: Hendrik Ranocha <[email protected]>

* Update src/equations/compressible_euler_3d.jl

Co-authored-by: Hendrik Ranocha <[email protected]>

* Update src/equations/compressible_euler_3d.jl

Co-authored-by: Hendrik Ranocha <[email protected]>

* apply suggestions

* additional sentence

* Fix typo

* typos

* correct test vals

---------

Co-authored-by: Hendrik Ranocha <[email protected]>

* Bump crate-ci/typos from 1.16.15 to 1.16.21 (trixi-framework#1700)

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.15 to 1.16.21.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](crate-ci/typos@v1.16.15...v1.16.21)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add NumFOCUS + ACTRIX to acknowledgments (trixi-framework#1697)

* Add NumFOCUS + ACTRIX to acknowledgments

* Try to avoid spaces

* Another try to avoid gaps between images

* Hopefully fix image alignment in docs

* Try new logo formats

* Use smaller DUBS logo and add DUBS funding statement

* Add markdown-based table for logos in docs

* Try another table approach

* Hopefully get a layout that finally *works*...

* Arrrrrrgggggghhhhh

* format examples (trixi-framework#1531)

* format examples

* check formatting of examples in CI

* update style guide

* fix weird formatting

* fix formatting of binary operators

* format again

* Update differentiable_programming.jl (trixi-framework#1704)

* Format subcell elixirs

* Add warning for missing bounds check for entropy limiter (MCL)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Daniel Doehring <[email protected]>
Co-authored-by: Hendrik Ranocha <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Schlottke-Lakemper <[email protected]>
Co-authored-by: ArseniyKholod <[email protected]>
  • Loading branch information
6 people authored Nov 6, 2023
1 parent 1c845f6 commit cb899fe
Show file tree
Hide file tree
Showing 381 changed files with 13,696 additions and 13,627 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# format(".")
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(["benchmark", "ext", "src", "test", "utils"])'
julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])'
- name: Format check
run: |
julia -e '
Expand Down
45 changes: 31 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,31 +256,48 @@ or [create an issue](https://github.com/trixi-framework/Trixi.jl/issues/new).


## Acknowledgments
<p align="center">
<img align="middle" src="https://user-images.githubusercontent.com/3637659/233821022-84910be7-8649-4999-a0ff-22d5e20f0b90.jpg" width=auto/>
<p align="center" style="font-size:0;"><!--
BMBF --><img align="middle" src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/f59af636-3098-4be6-bf80-c6be3f17cbc6" height="120"><!--
DFG --><img align="middle" src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/e67b9ed3-7699-466a-bdaf-2ba070a29a8e" height="120"><!--
SRC --><img align="middle" src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/48f9da06-6f7a-4586-b23e-739bee3901c0" height="120"><!--
ERC --><img align="middle" src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/9371e7e4-3491-4433-ac5f-b3bfb215f5ca" height="120"><!--
NSF --><img align="middle" src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/5325103c-ae81-4747-b87c-c6e4a1b1d7a8" height="120"><!--
DUBS --><img align="middle" src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/bb021e6e-42e6-4fe1-a414-c847402e1937" height="120"><!--
NumFOCUS --><img align="middle" src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/8496ac9e-b586-475f-adb7-69bcfc415185" height="120"><!--
-->
</p>

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 by the [Deutsche
Forschungsgemeinschaft](https://www.dfg.de/) (DFG, German Research Foundation)
through the following grants:
* Excellence Strategy EXC 2044-390685587, Mathematics Münster: Dynamics-Geometry-Structure.
* Research unit FOR 5409 "Structure-Preserving Numerical Methods for Bulk- and
Interface Coupling of Heterogeneous Models (SNuBIC)" (project number 463312734).
* Individual grant no. 528753982.

This project has benefited from funding from the European Research Council through the
This project has benefited from funding from the [European Research Council](https://erc.europa.eu)
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
This project has benefited from funding from [Vetenskapsrådet](https://www.vr.se)
(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
This project has benefited from funding from the United States
[National Science Foundation](https://www.nsf.gov/) (NSF) 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
This project has benefited from funding from the German
[Federal Ministry of Education and Research](https://www.bmbf.de) (BMBF)
through the project grant "Adaptive earth system modeling
with significantly reduced computation time for exascale supercomputers
(ADAPTEX)" (funding id: 16ME0668K).

This project has benefited from funding by the
[Daimler und Benz Stiftung](https://www.daimler-benz-stiftung.de) (Daimler and Benz Foundation)
through grant no. 32-10/22.

Trixi.jl is supported by [NumFOCUS](https://numfocus.org/) as an Affiliated Project.
4 changes: 2 additions & 2 deletions docs/literate/src/files/differentiable_programming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ scatter(real.(λ), imag.(λ), label="central flux")
# As you can see here, the maximal real part is close to zero.

relative_maximum = maximum(real, λ) / maximum(abs, λ)
@test 3.0e-10 < relative_maximum < 8.0e-10 #src
@test 3.0e-10 < relative_maximum < 9.0e-10 #src

# Interestingly, if we add dissipation by switching to the `flux_lax_friedrichs`
# at the interfaces, the maximal real part of the eigenvalues increases.
Expand Down Expand Up @@ -87,7 +87,7 @@ scatter(real.(λ), imag.(λ), label="central flux")
# Here, the maximal real part is basically zero to machine accuracy.

relative_maximum = maximum(real, λ) / maximum(abs, λ)
@test 1.0e-17 < relative_maximum < 1.0e-15 #src
@test 1.0e-17 < relative_maximum < 2.0e-15 #src

# Moreover, the eigenvectors are not as ill-conditioned as in 2D.

Expand Down
55 changes: 42 additions & 13 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,29 +344,58 @@ or [create an issue](https://github.com/trixi-framework/Trixi.jl/issues/new).

## Acknowledgments

![funding-logo](https://user-images.githubusercontent.com/3637659/233821022-84910be7-8649-4999-a0ff-22d5e20f0b90.jpg)

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.
```@raw html
<div style="width: 100%; text-align: center; font-size: 0;">
<div><!--
BMBF --><img src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/f59af636-3098-4be6-bf80-c6be3f17cbc6" style="height: 120px; width: auto"><!--
DFG --><img src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/e67b9ed3-7699-466a-bdaf-2ba070a29a8e" style="height: 120px; width: auto"><!--
SRC --><img src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/48f9da06-6f7a-4586-b23e-739bee3901c0" style="height: 120px; width: auto"><!--
-->
</div>
<div><!--
ERC --><img src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/9371e7e4-3491-4433-ac5f-b3bfb215f5ca" style="height: 120px; width: auto"><!--
NSF --><img src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/5325103c-ae81-4747-b87c-c6e4a1b1d7a8" style="height: 120px; width: auto"><!--
DUBS --><img src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/bb021e6e-42e6-4fe1-a414-c847402e1937" style="height: 120px; width: auto"><!--
-->
</div>
<div><!--
NumFOCUS --><img src="https://github.com/trixi-framework/Trixi.jl/assets/3637659/8496ac9e-b586-475f-adb7-69bcfc415185" style="height: 120px; width: auto"><!--
-->
</div>
</div>
```

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 by the [Deutsche
Forschungsgemeinschaft](https://www.dfg.de/) (DFG, German Research Foundation)
through the following grants:
* Excellence Strategy EXC 2044-390685587, Mathematics Münster: Dynamics-Geometry-Structure.
* Research unit FOR 5409 "Structure-Preserving Numerical Methods for Bulk- and
Interface Coupling of Heterogeneous Models (SNuBIC)" (project number 463312734).
* Individual grant no. 528753982.

This project has benefited from funding from the European Research Council through the
This project has benefited from funding from the [European Research Council](https://erc.europa.eu)
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
This project has benefited from funding from [Vetenskapsrådet](https://www.vr.se)
(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
This project has benefited from funding from the United States
[National Science Foundation](https://www.nsf.gov/) (NSF) 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
This project has benefited from funding from the German
[Federal Ministry of Education and Research](https://www.bmbf.de) (BMBF)
through the project grant "Adaptive earth system modeling
with significantly reduced computation time for exascale supercomputers
(ADAPTEX)" (funding id: 16ME0668K).

This project has benefited from funding by the
[Daimler und Benz Stiftung](https://www.daimler-benz-stiftung.de) (Daimler and Benz Foundation)
through grant no. 32-10/22.

Trixi.jl is supported by [NumFOCUS](https://numfocus.org/) as an Affiliated Project.
18 changes: 9 additions & 9 deletions docs/src/styleguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ conventions, we apply and enforce automated source code formatting
* Maximum line length (strictly): **92**.
* Functions that mutate their *input* are named with a trailing `!`.
* Functions order their parameters [similar to Julia Base](https://docs.julialang.org/en/v1/manual/style-guide/#Write-functions-with-argument-ordering-similar-to-Julia-Base-1).
* The main modified argument comes first. For example, if the right-hand side `du` is modified,
it should come first. If only the `cache` is modified, e.g., in `prolong2interfaces!`
* The main modified argument comes first. For example, if the right-hand side `du` is modified,
it should come first. If only the `cache` is modified, e.g., in `prolong2interfaces!`
and its siblings, put the `cache` first.
* Otherwise, use the order `mesh, equations, solver, cache`.
* If something needs to be specified in more detail for dispatch, put the additional argument before the general one
* If something needs to be specified in more detail for dispatch, put the additional argument before the general one
that is specified in more detail. For example, we use `have_nonconservative_terms(equations), equations`
and `dg.mortar, dg`.
* Prefer `for i in ...` to `for i = ...` for better semantic clarity and greater flexibility.
Expand Down Expand Up @@ -55,7 +55,7 @@ julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
```
You can then recursively format the core Julia files in the Trixi.jl repo by executing
```shell
julia -e 'using JuliaFormatter; format(["benchmark", "ext", "src", "utils"])'
julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])'
```
from inside the Trixi.jl repository. For convenience, there is also a script you can
directly run from your terminal shell, which will automatically install JuliaFormatter in a
Expand All @@ -67,12 +67,12 @@ You can get more information about using the convenience script by running it wi
`--help`/`-h` flag.

### Checking formatting before committing
It can be convenient to check the formatting of source code automatically before each commit.
It can be convenient to check the formatting of source code automatically before each commit.
We use git-hooks for it and provide a `pre-commit` script in the `utils` folder. The script uses
[JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl) just like formatting script that
runs over the whole Trixi.jl directory.
You can copy the `pre-commit`-script into `.git/hooks/pre-commit` and it will check your formatting
[JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl) just like formatting script that
runs over the whole Trixi.jl directory.
You can copy the `pre-commit`-script into `.git/hooks/pre-commit` and it will check your formatting
before each commit. If errors are found the commit is aborted and you can add the corrections via
```shell
```shell
git add -p
```
13 changes: 6 additions & 7 deletions examples/dgmulti_1d/elixir_advection_gauss_sbp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dg = DGMulti(polydeg = 3,

cells_per_dimension = (8,)
mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(-1.0,), coordinates_max=(1.0,),
periodicity=true)
coordinates_min = (-1.0,), coordinates_max = (1.0,),
periodicity = true)

###############################################################################
# setup the test problem (no source term needed for linear advection)
Expand All @@ -49,20 +49,19 @@ ode = semidiscretize(semi, tspan)
summary_callback = SummaryCallback()

# analyse the solution in regular intervals and prints the results
analysis_callback = AnalysisCallback(semi, interval=100, uEltype=real(dg))
analysis_callback = AnalysisCallback(semi, interval = 100, uEltype = real(dg))

# handles the re-calculation of the maximum Δt after each time step
stepsize_callback = StepsizeCallback(cfl=0.75)
stepsize_callback = StepsizeCallback(cfl = 0.75)

# collect all callbacks such that they can be passed to the ODE solver
callbacks = CallbackSet(summary_callback, analysis_callback, stepsize_callback)

###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
dt=1.0, save_everystep=false, callback=callbacks);
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false),
dt = 1.0, save_everystep = false, callback = callbacks);

# Print the timer summary
summary_callback()

23 changes: 13 additions & 10 deletions examples/dgmulti_1d/elixir_euler_fdsbp_periodic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
using Trixi, OrdinaryDiffEq

dg = DGMulti(element_type = Line(),
approximation_type = periodic_derivative_operator(
derivative_order=1, accuracy_order=4, xmin=0.0, xmax=1.0, N=50),
approximation_type = periodic_derivative_operator(derivative_order = 1,
accuracy_order = 4,
xmin = 0.0, xmax = 1.0,
N = 50),
surface_flux = flux_hll,
volume_integral = VolumeIntegralWeakForm())

equations = CompressibleEulerEquations1D(1.4)
initial_condition = initial_condition_convergence_test
source_terms = source_terms_convergence_test

mesh = DGMultiMesh(dg, coordinates_min=(-1.0,),
coordinates_max=( 1.0,))
mesh = DGMultiMesh(dg, coordinates_min = (-1.0,),
coordinates_max = (1.0,))

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg,
source_terms = source_terms)
Expand All @@ -21,15 +23,16 @@ tspan = (0.0, 0.4)
ode = semidiscretize(semi, tspan)

summary_callback = SummaryCallback()
alive_callback = AliveCallback(alive_interval=10)
alive_callback = AliveCallback(alive_interval = 10)
analysis_interval = 100
analysis_callback = AnalysisCallback(semi, interval=analysis_interval, uEltype=real(dg))
stepsize_callback = StepsizeCallback(cfl=1.0)
callbacks = CallbackSet(summary_callback, alive_callback, stepsize_callback, analysis_callback)
analysis_callback = AnalysisCallback(semi, interval = analysis_interval, uEltype = real(dg))
stepsize_callback = StepsizeCallback(cfl = 1.0)
callbacks = CallbackSet(summary_callback, alive_callback, stepsize_callback,
analysis_callback)

###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
dt = 0.5 * estimate_dt(mesh, dg), save_everystep=false, callback=callbacks);
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false),
dt = 0.5 * estimate_dt(mesh, dg), save_everystep = false, callback = callbacks);
summary_callback() # print the timer summary
12 changes: 6 additions & 6 deletions examples/dgmulti_1d/elixir_euler_flux_diff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ source_terms = source_terms_convergence_test

cells_per_dimension = (8,)
mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min=(-1.0,), coordinates_max=(1.0,), periodicity=true)
coordinates_min = (-1.0,), coordinates_max = (1.0,), periodicity = true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg;
source_terms=source_terms)
source_terms = source_terms)

tspan = (0.0, 1.1)
ode = semidiscretize(semi, tspan)

summary_callback = SummaryCallback()
alive_callback = AliveCallback(alive_interval=10)
alive_callback = AliveCallback(alive_interval = 10)
analysis_interval = 100
analysis_callback = AnalysisCallback(semi, interval=analysis_interval, uEltype=real(dg))
analysis_callback = AnalysisCallback(semi, interval = analysis_interval, uEltype = real(dg))
callbacks = CallbackSet(summary_callback,
analysis_callback,
alive_callback)

###############################################################################
# run the simulation

sol = solve(ode, CarpenterKennedy2N54(williamson_condition=false),
dt = 0.5 * estimate_dt(mesh, dg), save_everystep=false, callback=callbacks);
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false),
dt = 0.5 * estimate_dt(mesh, dg), save_everystep = false, callback = callbacks);

summary_callback() # print the timer summary
Loading

0 comments on commit cb899fe

Please sign in to comment.