Skip to content

Commit

Permalink
Merge branch 'trixi-framework:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ArseniyKholod authored Dec 28, 2023
2 parents d342054 + dc8e927 commit 3d595f2
Show file tree
Hide file tree
Showing 540 changed files with 33,017 additions and 24,603 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", "utils"])'
julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])'
- name: Format check
run: |
julia -e '
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/[email protected].15
uses: crate-ci/[email protected].23
94 changes: 94 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Note: this file is inspired by the downstream testing facilities in the SciML ecosystem
# x-ref: https://github.com/SciML/SciMLBase.jl/blob/ffe68aebedee5915190623cb08160d7ef1fbcce0/.github/workflows/Downstream.yml

name: Downstream
on:
push:
branches:
- main
paths-ignore:
- 'AUTHORS.md'
- 'CITATION.bib'
- 'CONTRIBUTING.md'
- 'LICENSE.md'
- 'NEWS.md'
- 'README.md'
- '.zenodo.json'
- '.github/workflows/benchmark.yml'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/TagBot.yml'
- 'benchmark/**'
# - 'docs/**'
- 'utils/**'
pull_request:
paths-ignore:
- 'AUTHORS.md'
- 'CITATION.bib'
- 'CONTRIBUTING.md'
- 'LICENSE.md'
- 'NEWS.md'
- 'README.md'
- '.zenodo.json'
- '.github/workflows/benchmark.yml'
- '.github/workflows/CompatHelper.yml'
- '.github/workflows/TagBot.yml'
- 'benchmark/**'
# - 'docs/**'
- 'utils/**'
workflow_dispatch:

# Cancel redundant CI tests automatically
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
# We could also include the Julia version as in
# name: ${{ matrix.trixi_test }} - ${{ matrix.os }} - Julia ${{ matrix.version }} - ${{ matrix.arch }} - ${{ github.event_name }}
# to be more specific. However, that requires us updating the required CI tests whenever we update Julia.
name: ${{ matrix.package }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.9'
os:
- ubuntu-latest
arch:
- x64
package:
- Trixi2Vtk.jl
- TrixiShallowWater.jl
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- name: Retrieve downstream package
# Note: we retrieve the current `main` branch of the downstream package to ensure
# that compatibility errors we make in Trixi.jl are detected already here
# See also https://github.com/trixi-framework/Trixi.jl/pull/1707#discussion_r1382938895
uses: actions/checkout@v4
with:
repository: trixi-framework/${{ matrix.package }}
path: downstream
- name: Load upstream package into downstream environment
shell: julia --color=yes --project=downstream {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path="."))
Pkg.update()
- name: Run downstream tests (without coverage)
shell: julia --color=yes --project=downstream {0}
run: |
using Pkg
Pkg.test(coverage=false)
env:
TRIXI_TEST: upstream
38 changes: 37 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@ Trixi.jl follows the interpretation of [semantic versioning (semver)](https://ju
used in the Julia ecosystem. Notable changes will be documented in this file
for human readability.

## Changes in the v0.6 lifecycle

#### Added
- AMR for hyperbolic-parabolic equations on 3D `P4estMesh`

## Changes when updating to v0.6 from v0.5.x

#### Added
- AMR for hyperbolic-parabolic equations on 2D `P4estMesh`

#### Changed

- The wave speed estimates for `flux_hll`, `FluxHLL()` are now consistent across equations.
In particular, the functions `min_max_speed_naive`, `min_max_speed_einfeldt` are now
conceptually identical across equations.
Users, who have been using `flux_hll` for MHD have now to use `flux_hlle` in order to use the
Einfeldt wave speed estimate.
- Parabolic diffusion terms are now officially supported and not marked as experimental
anymore.

#### Deprecated

#### Removed

- The neural network-based shock indicators have been migrated to a new repository
[TrixiSmartShockFinder.jl](https://github.com/trixi-framework/TrixiSmartShockFinder.jl).
To continue using the indicators, you will need to use both Trixi.jl and
TrixiSmartShockFinder.jl, as explained in the latter packages' `README.md`.


## Changes in the v0.5 lifecycle

#### Added
Expand All @@ -13,8 +43,11 @@ for human readability.
- Capability to set truly discontinuous initial conditions in 1D.
- Wetting and drying feature and examples for 1D and 2D shallow water equations
- Implementation of the polytropic Euler equations in 2D
- Subcell positivity limiting support for conservative variables in 2D for `TreeMesh`
- Implementation of the quasi-1D shallow water and compressible Euler equations
- Subcell (positivity and local min/max) limiting support for conservative variables
in 2D for `TreeMesh`
- AMR for hyperbolic-parabolic equations on 2D/3D `TreeMesh`
- Added `GradientVariables` type parameter to `AbstractEquationsParabolic`

#### Changed

Expand All @@ -31,6 +64,9 @@ for human readability.

#### Removed

- Migrate neural network-based shock indicators to a new repository
[TrixiSmartShockFinder.jl](https://github.com/trixi-framework/TrixiSmartShockFinder.jl).


## Changes when updating to v0.5 from v0.4.x

Expand Down
15 changes: 11 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper <[email protected]>", "Gregor Gassner <[email protected]>", "Hendrik Ranocha <[email protected]>", "Andrew R. Winters <[email protected]>", "Jesse Chan <[email protected]>"]
version = "0.5.48-pre"
version = "0.6.6-pre"

[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def"
EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand Down Expand Up @@ -52,37 +54,42 @@ TrixiMakieExt = "Makie"
[compat]
CodeTracking = "1.0.5"
ConstructionBase = "1.3"
DataStructures = "0.18.15"
DiffEqBase = "6 - 6.143"
DiffEqCallbacks = "2.25"
EllipsisNotation = "1.0"
FillArrays = "0.13.2, 1"
ForwardDiff = "0.10.18"
HDF5 = "0.14, 0.15, 0.16, 0.17"
IfElse = "0.1"
LinearAlgebra = "1"
LinearMaps = "2.7, 3.0"
LoopVectorization = "0.12.118"
MPI = "0.20"
Makie = "0.19"
MuladdMacro = "0.2.2"
Octavian = "0.3.5"
OffsetArrays = "1.3"
P4est = "0.4"
P4est = "0.4.9"
Polyester = "0.7.5"
PrecompileTools = "1.1"
Printf = "1"
RecipesBase = "1.1"
Reexport = "1.0"
Requires = "1.1"
SciMLBase = "1.90, 2"
Setfield = "0.8, 1"
SimpleUnPack = "1.1"
SparseArrays = "1"
StartUpDG = "0.17"
Static = "0.3, 0.4, 0.5, 0.6, 0.7, 0.8"
StaticArrayInterface = "1.4"
StaticArrays = "1"
StrideArrays = "0.1.18"
StructArrays = "0.6"
SummationByPartsOperators = "0.5.41"
T8code = "0.4.1"
TimerOutputs = "0.5"
T8code = "0.4.3, 0.5"
TimerOutputs = "0.5.7"
Triangulate = "2.0"
TriplotBase = "0.1"
TriplotRecipes = "0.1"
Expand Down
49 changes: 34 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<img width="300px" src="https://trixi-framework.github.io/assets/logo.png">
</p>

**Trixi.jl** is a numerical simulation framework for hyperbolic conservation
**Trixi.jl** is a numerical simulation framework for 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.jl is
Expand Down Expand Up @@ -46,6 +46,7 @@ installation and postprocessing procedures. Its features include:
* Periodic and weakly-enforced boundary conditions
* Multiple governing equations:
* Compressible Euler equations
* Compressible Navier-Stokes equations
* Magnetohydrodynamics (MHD) equations
* Multi-component compressible Euler and MHD equations
* Linearized Euler and acoustic perturbation equations
Expand All @@ -56,6 +57,7 @@ installation and postprocessing procedures. Its features include:
* Multi-physics simulations
* [Self-gravitating gas dynamics](https://github.com/trixi-framework/paper-self-gravitating-gas-dynamics)
* Shared-memory parallelization via multithreading
* Multi-node parallelization via MPI
* Visualization and postprocessing of the results
* In-situ and a posteriori visualization with [Plots.jl](https://github.com/JuliaPlots/Plots.jl)
* Interactive visualization with [Makie.jl](https://makie.juliaplots.org/)
Expand Down Expand Up @@ -256,31 +258,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.
2 changes: 1 addition & 1 deletion benchmark/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
BenchmarkTools = "0.5, 0.7, 1.0"
OrdinaryDiffEq = "5.65, 6"
PkgBenchmark = "0.2.10"
Trixi = "0.4, 0.5"
Trixi = "0.4, 0.5, 0.6"
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ Literate = "2.9"
Measurements = "2.5"
OrdinaryDiffEq = "6.49.1"
Plots = "1.9"
Test = "1"
Trixi2Vtk = "0.3"
2 changes: 1 addition & 1 deletion docs/literate/src/files/DGMulti_1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ 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.jl.
mesh = DGMultiMesh(meshIO, dg, Dict(:outer_boundary=>1, :inner_boundary=>2))
mesh = DGMultiMesh(dg, meshIO, Dict(:outer_boundary=>1, :inner_boundary=>2))
#-
boundary_condition_convergence_test = BoundaryConditionDirichlet(initial_condition)
boundary_conditions = (; :outer_boundary => boundary_condition_convergence_test,
Expand Down
11 changes: 9 additions & 2 deletions docs/literate/src/files/adding_new_parabolic_terms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ equations_hyperbolic = LinearScalarAdvectionEquation2D(advection_velocity);
# `ConstantAnisotropicDiffusion2D` has a field for `equations_hyperbolic`. It is useful to have
# information about the hyperbolic system available to the parabolic part so that we can reuse
# functions defined for hyperbolic equations (such as `varnames`).

struct ConstantAnisotropicDiffusion2D{E, T} <: Trixi.AbstractEquationsParabolic{2, 1}
#
# The abstract type `Trixi.AbstractEquationsParabolic` has three parameters: `NDIMS` (the spatial dimension,
# e.g., 1D, 2D, or 3D), `NVARS` (the number of variables), and `GradientVariable`, which we set as
# `GradientVariablesConservative`. This indicates that the gradient should be taken with respect to the
# conservative variables (e.g., the same variables used in `equations_hyperbolic`). Users can also take
# the gradient with respect to a different set of variables; see, for example, the implementation of
# [`CompressibleNavierStokesDiffusion2D`](@ref), which can utilize either "primitive" or "entropy" variables.

struct ConstantAnisotropicDiffusion2D{E, T} <: Trixi.AbstractEquationsParabolic{2, 1, GradientVariablesConservative}
diffusivity::T
equations_hyperbolic::E
end
Expand Down
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
Loading

0 comments on commit 3d595f2

Please sign in to comment.