Skip to content

Commit

Permalink
Merge branch 'main' into sc/mhd-treemesh-3d
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCan authored Oct 2, 2023
2 parents 41749dd + 9e41775 commit ec0390b
Show file tree
Hide file tree
Showing 22 changed files with 86 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CacheNotebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout caching branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: tutorial_notebooks

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/DocPreviewCleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: gh-pages

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
version: ${{ matrix.julia-version }}

- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install JuliaFormatter and format
# This will use the latest version by default but you can set the version like so:
#
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Invalidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ReviewChecklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Add review checklist
uses: trixi-framework/add-pr-review-checklist@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/[email protected].9
uses: crate-ci/[email protected].15
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
arch: x64
trixi_test: threaded
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
# Instead, we use the more tedious approach described above.
# At first, we check out the repository and download all artifacts
# (and list files for debugging).
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- run: ls -R
# Next, we merge the individual coverage files and upload
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
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.44-pre"
version = "0.5.45-pre"

[deps]
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"
Expand Down Expand Up @@ -71,7 +71,7 @@ PrecompileTools = "1.1"
RecipesBase = "1.1"
Reexport = "1.0"
Requires = "1.1"
SciMLBase = "1.90"
SciMLBase = "1.90, 2"
Setfield = "0.8, 1"
SimpleUnPack = "1.1"
StartUpDG = "0.17"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Build Status](https://github.com/trixi-framework/Trixi.jl/workflows/CI/badge.svg)](https://github.com/trixi-framework/Trixi.jl/actions?query=workflow%3ACI)
[![Codecov](https://codecov.io/gh/trixi-framework/Trixi.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/trixi-framework/Trixi.jl)
[![Coveralls](https://coveralls.io/repos/github/trixi-framework/Trixi.jl/badge.svg?branch=main)](https://coveralls.io/github/trixi-framework/Trixi.jl?branch=main)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3996439.svg)](https://doi.org/10.5281/zenodo.3996439)
[![Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/Trixi)](https://pkgs.genieframework.com?packages=Trixi)
Expand Down
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Build Status](https://github.com/trixi-framework/Trixi.jl/workflows/CI/badge.svg)](https://github.com/trixi-framework/Trixi.jl/actions?query=workflow%3ACI)
[![Codecov](https://codecov.io/gh/trixi-framework/Trixi.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/trixi-framework/Trixi.jl)
[![Coveralls](https://coveralls.io/repos/github/trixi-framework/Trixi.jl/badge.svg?branch=main)](https://coveralls.io/github/trixi-framework/Trixi.jl?branch=main)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3996439.svg)](https://doi.org/10.5281/zenodo.3996439)

Expand Down
5 changes: 3 additions & 2 deletions docs/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ different features on different mesh types.
| Element type | line, square, cube | line, quadᵃ, hexᵃ | quadᵃ | quadᵃ, hexᵃ | simplex, quadᵃ, hexᵃ |
| Adaptive mesh refinement | ✅ | ❌ | ❌ | ✅ | ❌ | [`AMRCallback`](@ref)
| Solver type | [`DGSEM`](@ref) | [`DGSEM`](@ref) | [`DGSEM`](@ref) | [`DGSEM`](@ref) | [`DGMulti`](@ref) |
| Domain | hypercube | mapped hypercube | arbitrary | arbitrary | arbitraryᵇ |
| Domain | hypercube | mapped hypercube | arbitrary | arbitrary | arbitrary |
| Weak form | ✅ | ✅ | ✅ | ✅ | ✅ | [`VolumeIntegralWeakForm`](@ref)
| Flux differencing | ✅ | ✅ | ✅ | ✅ | ✅ | [`VolumeIntegralFluxDifferencing`](@ref)
| Shock capturing | ✅ | ✅ | ✅ | ✅ | ❌ | [`VolumeIntegralShockCapturingHG`](@ref)
| Nonconservative equations | ✅ | ✅ | ✅ | ✅ | ✅ | e.g., GLM MHD or shallow water equations
| Parabolic termsᵇ | ✅ | ✅ | ❌ | ✅ | ✅ | e.g., [`CompressibleNavierStokesDiffusion2D`](@ref)

ᵃ: quad = quadrilateral, hex = hexahedron
ᵇ: curved meshes supported for `SBP` and `GaussSBP` approximation types for `VolumeIntegralFluxDifferencing` solvers on quadrilateral and hexahedral `DGMultiMesh`es (non-conservative terms not yet supported)
ᵇ: Parabolic terms do not currently support adaptivity.

## Time integration methods

Expand Down
38 changes: 28 additions & 10 deletions src/equations/compressible_navier_stokes_1d.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# By default, Julia/LLVM does not use fused multiply-add operations (FMAs).
# Since these FMAs can increase the performance of many numerical algorithms,
# we need to opt-in explicitly.
# See https://ranocha.de/blog/Optimizing_EC_Trixi for further details.
@muladd begin
#! format: noindent

@doc raw"""
CompressibleNavierStokesDiffusion1D(equations; mu, Pr,
gradient_variables=GradientVariablesPrimitive())
Expand Down Expand Up @@ -77,7 +84,8 @@ w_2 = \frac{\rho v1}{p},\, w_3 = -\frac{\rho}{p}
This code is experimental and may be changed or removed in any future release.
"""
struct CompressibleNavierStokesDiffusion1D{GradientVariables, RealT <: Real,
E <: AbstractCompressibleEulerEquations{1}} <:
E <: AbstractCompressibleEulerEquations{1}
} <:
AbstractCompressibleNavierStokesDiffusion{1, 3}
# TODO: parabolic
# 1) For now save gamma and inv(gamma-1) again, but could potentially reuse them from the Euler equations
Expand Down Expand Up @@ -109,7 +117,8 @@ function CompressibleNavierStokesDiffusion1D(equations::CompressibleEulerEquatio
CompressibleNavierStokesDiffusion1D{typeof(gradient_variables), typeof(gamma),
typeof(equations)}(gamma, inv_gamma_minus_one,
μ, Pr, kappa,
equations, gradient_variables)
equations,
gradient_variables)
end

# TODO: parabolic
Expand Down Expand Up @@ -263,7 +272,8 @@ end
u_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Gradient,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesPrimitive
Expand All @@ -278,7 +288,8 @@ end
u_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Divergence,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesPrimitive
Expand All @@ -299,7 +310,8 @@ end
u_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Gradient,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesPrimitive
Expand All @@ -316,7 +328,8 @@ end
u_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Divergence,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesPrimitive
Expand All @@ -337,7 +350,8 @@ end
w_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Gradient,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesEntropy
Expand All @@ -354,7 +368,8 @@ end
w_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Divergence,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesEntropy
Expand All @@ -374,7 +389,8 @@ end
w_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Gradient,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesEntropy
Expand All @@ -394,10 +410,12 @@ end
w_inner,
orientation::Integer,
direction,
x, t,
x,
t,
operator_type::Divergence,
equations::CompressibleNavierStokesDiffusion1D{
GradientVariablesEntropy
})
return SVector(flux_inner[1], flux_inner[2], flux_inner[3])
end
end # @muladd
1 change: 1 addition & 0 deletions src/meshes/tree_mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ function Base.show(io::IO, ::MIME"text/plain",
"length" => mesh.tree.length_level_0,
"periodicity" => mesh.tree.periodicity,
"current #cells" => mesh.tree.length,
"#leaf-cells" => count_leaf_cells(mesh.tree),
"maximum #cells" => mesh.tree.capacity,
]
summary_box(io, "TreeMesh{" * string(NDIMS) * ", " * string(TreeType) * "}",
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/dgsem_unstructured/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ function calc_boundary_flux_by_type!(cache, t, BCs::Tuple{}, BC_indices::Tuple{}
nothing
end

function calc_boundary_flux!(cache, t, boundary_condition, boundary_indexing,
function calc_boundary_flux!(cache, t, boundary_condition::BC, boundary_indexing,
mesh::UnstructuredMesh2D, equations,
surface_integral, dg::DG)
surface_integral, dg::DG) where {BC}
@unpack surface_flux_values = cache.elements
@unpack element_id, element_side_id = cache.boundaries

Expand Down
21 changes: 11 additions & 10 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
[compat]
BSON = "0.3.3"
CairoMakie = "0.6, 0.7, 0.8, 0.9, 0.10"
Flux = "0.13 - 0.13.12" # TODO: Return to "0.13" once https://github.com/FluxML/Flux.jl/issues/2204 is resolved
ForwardDiff = "0.10"
MPI = "0.20"
OrdinaryDiffEq = "6.49.1"
Plots = "1.16"
StableRNGs = "1.0.0"

[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Expand All @@ -23,6 +14,16 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.7"
BSON = "0.3.3"
CairoMakie = "0.6, 0.7, 0.8, 0.9, 0.10"
Flux = "0.13.15, 0.14"
ForwardDiff = "0.10"
MPI = "0.20"
OrdinaryDiffEq = "6.49.1"
Plots = "1.16"

[preferences.OrdinaryDiffEq]
PrecompileAutoSpecialize = false
PrecompileAutoSwitch = false
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const TRIXI_NTHREADS = clamp(Sys.CPU_THREADS, 2, 3)

@time if TRIXI_TEST == "all" || TRIXI_TEST == "misc_part2"
include("test_special_elixirs.jl")
include("test_aqua.jl")
end

@time if TRIXI_TEST == "all" || TRIXI_TEST == "performance_specializations_part1"
Expand Down
Loading

0 comments on commit ec0390b

Please sign in to comment.