From 2e5c3c580641745404cf87b6edeb339b537a943b Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 10 Jun 2022 12:45:25 +0200 Subject: [PATCH 01/24] restrict ArrayInterface to working version (#1170) --- Project.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Project.toml b/Project.toml index 664b59d4b7c..d69f30f9fe6 100644 --- a/Project.toml +++ b/Project.toml @@ -4,6 +4,7 @@ authors = ["Michael Schlottke-Lakemper ", "Gregor version = "0.4.39-pre" [deps] +ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" # see https://github.com/JuliaArrays/ArrayInterface.jl/issues/304 CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949" @@ -41,6 +42,7 @@ TriplotRecipes = "808ab39a-a642-4abf-81ff-4cb34ebbffa3" UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" [compat] +ArrayInterface = "6.0.0 - 6.0.11" # see https://github.com/JuliaArrays/ArrayInterface.jl/issues/304 CodeTracking = "1.0.5" ConstructionBase = "1.3" EllipsisNotation = "1.0" From fd00d42da52ae798c469550c208a04a317a26b62 Mon Sep 17 00:00:00 2001 From: gregorgassner Date: Fri, 10 Jun 2022 16:00:48 +0200 Subject: [PATCH 02/24] WIP: add KHI setup from eth zurich (#1168) * WIP: add KHI setup from eth zurich * add package StableRNGs to test environment * Update Project.toml Co-authored-by: Hendrik Ranocha * Update examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_ethz.jl Co-authored-by: Hendrik Ranocha * Update examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_ethz.jl Co-authored-by: Hendrik Ranocha * Update examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_ethz.jl Co-authored-by: Hendrik Ranocha * add StableRNGs to [compat] * fixed messed up version number * change name of elixir to _fjordholm_etal instead of _ethz * get rid of StableRNGs dependency, by hardcoding the coefficients * Apply suggestions from code review Co-authored-by: Hendrik Ranocha --- ...in_helmholtz_instability_fjordholm_etal.jl | 125 ++++++++++++++++++ test/test_tree_2d_euler.jl | 7 + 2 files changed, 132 insertions(+) create mode 100644 examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_fjordholm_etal.jl diff --git a/examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_fjordholm_etal.jl b/examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_fjordholm_etal.jl new file mode 100644 index 00000000000..6f3e94ef2b5 --- /dev/null +++ b/examples/tree_2d_dgsem/elixir_euler_kelvin_helmholtz_instability_fjordholm_etal.jl @@ -0,0 +1,125 @@ +using OrdinaryDiffEq +using Trixi + + +############################################################################### +# semidiscretization of the compressible Euler equations +gamma = 1.4 +equations = CompressibleEulerEquations2D(gamma) + +""" + initial_condition_kelvin_helmholtz_instability_fjordholm_etal(x, t, equations::CompressibleEulerEquations2D) + +A version of the classical Kelvin-Helmholtz instability based on +- Ulrik S. Fjordholm, Roger Käppeli, Siddhartha Mishra, Eitan Tadmor (2014) + Construction of approximate entropy measure valued + solutions for hyperbolic systems of conservation laws + [arXiv: 1402.0909](https://arxiv.org/abs/1402.0909) +""" +function initial_condition_kelvin_helmholtz_instability_fjordholm_etal(x, t, equations::CompressibleEulerEquations2D) + # typical resolution 128^2, 256^2 + # domain size is [0,+1]^2 + # interface is sharp, but randomly perturbed + # The random numbers used in the initial conditions have been generated as follows: + # + # using StableRNGs + # + # rng = StableRNG(100) + # + # a1 = rand(rng, m) + # a2 = rand(rng, m) + # a1 .= a1 / sum(a1) + # a2 .= a2 / sum(a2) + # b1 = (rand(rng, m) .- 0.5) .* pi + # b2 = (rand(rng, m) .- 0.5) .* pi + + m = 10 + a1 = [0.04457096674422902, 0.03891512410182607, 0.0030191053979293433, 0.0993913172320319, + 0.1622302137588842, 0.1831383653456182, 0.11758003014101702, 0.07964318348142958, + 0.0863245324711805, 0.18518716132585408] + a2 = [0.061688440856337096, 0.23000237877135882, 0.04453793881833177, 0.19251530387370916, + 0.11107917357941084, 0.05898041974649702, 0.09949312336096268, 0.07022276346006465, + 0.10670366489014596, 0.02477679264318211] + b1 = [0.06582340543754152, 0.9857886297001535, 0.8450452205037154, -1.279648120993805, + 0.45454198915209526, -0.13359370986823993, 0.07062615913363897, -1.0097986278512623, + 1.0810669017430343, -0.14207309803877177] + b2 = [-1.1376882185131414, -1.4798197129947765, 0.6139290513283818, -0.3319087388365522, + 0.14633328999192285, -0.06373231463100072, -0.6270101051216724, 0.13941252226261905, + -1.0337526453303645, 1.0441408867083155] + Y1 = 0.0 + Y2 = 0.0 + for n = 1:m + Y1 += a1[n] * cos(b1[n] + 2 * n * pi * x[1]) + Y2 += a2[n] * cos(b2[n] + 2 * n * pi * x[1]) + end + + J1 = 0.25 + J2 = 0.75 + epsilon = 0.01 + I1 = J1 + epsilon * Y1 + I2 = J2 + epsilon * Y2 + + if (x[2] > I1) && (x[2] < I2) + rho = 2 + v1 = -0.5 + else + rho = 1 + v1 = 0.5 + end + v2 = 0 + p = 2.5 + + return prim2cons(SVector(rho, v1, v2, p), equations) +end +initial_condition = initial_condition_kelvin_helmholtz_instability_fjordholm_etal + +surface_flux = flux_hllc +volume_flux = flux_ranocha +polydeg = 3 +basis = LobattoLegendreBasis(polydeg) +indicator_sc = IndicatorHennemannGassner(equations, basis, + alpha_max=0.001, + alpha_min=0.0001, + alpha_smooth=true, + variable=density_pressure) +volume_integral = VolumeIntegralShockCapturingHG(indicator_sc; + volume_flux_dg=volume_flux, + volume_flux_fv=surface_flux) + +solver = DGSEM(basis, surface_flux, volume_integral) + +coordinates_min = (0.0, 0.0) +coordinates_max = (1.0, 1.0) +mesh = TreeMesh(coordinates_min, coordinates_max, + initial_refinement_level=6, + n_cells_max=100_000) + +semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver) + +############################################################################### +# ODE solvers, callbacks etc. + +tspan = (0.0, 2.0) +ode = semidiscretize(semi, tspan) + +summary_callback = SummaryCallback() + +analysis_interval = 400 +analysis_callback = AnalysisCallback(semi, interval=analysis_interval) + +alive_callback = AliveCallback(analysis_interval=analysis_interval) + +save_solution = SaveSolutionCallback(interval=400, + save_initial_solution=true, + save_final_solution=true, + solution_variables=cons2prim) + +callbacks = CallbackSet(summary_callback, + analysis_callback, alive_callback, + save_solution) + +############################################################################### +# run the simulation +sol = solve(ode, SSPRK43(), + save_everystep=false, callback=callbacks); +summary_callback() # print the timer summary diff --git a/test/test_tree_2d_euler.jl b/test/test_tree_2d_euler.jl index d82322a5230..668f041fdd7 100644 --- a/test/test_tree_2d_euler.jl +++ b/test/test_tree_2d_euler.jl @@ -164,6 +164,13 @@ EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2 coverage_override = (maxiters=10^5,)) end + @trixi_testset "elixir_euler_kelvin_helmholtz_instability_fjordholm_etal.jl" begin + @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_kelvin_helmholtz_instability_fjordholm_etal.jl"), + l2 = [0.1057230211245312, 0.10621112311257341, 0.07260957505339989, 0.11178239111065721], + linf = [2.998719417992662, 2.1400285015556166, 1.1569648700415078, 1.8922492268110913], + tspan = (0.0, 0.1)) + end + @trixi_testset "elixir_euler_kelvin_helmholtz_instability.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_euler_kelvin_helmholtz_instability.jl"), l2 = [0.055691508271624536, 0.032986009333751655, 0.05224390923711999, 0.08009536362771563], From 04f5f7828768ed712e1b75760f4d3cce54bf6f52 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 10 Jun 2022 21:16:41 +0200 Subject: [PATCH 03/24] Revert "restrict ArrayInterface to working version (#1170)" (#1171) This reverts commit 2e5c3c580641745404cf87b6edeb339b537a943b. --- Project.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Project.toml b/Project.toml index d69f30f9fe6..664b59d4b7c 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,6 @@ authors = ["Michael Schlottke-Lakemper ", "Gregor version = "0.4.39-pre" [deps] -ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" # see https://github.com/JuliaArrays/ArrayInterface.jl/issues/304 CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949" @@ -42,7 +41,6 @@ TriplotRecipes = "808ab39a-a642-4abf-81ff-4cb34ebbffa3" UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" [compat] -ArrayInterface = "6.0.0 - 6.0.11" # see https://github.com/JuliaArrays/ArrayInterface.jl/issues/304 CodeTracking = "1.0.5" ConstructionBase = "1.3" EllipsisNotation = "1.0" From 2de47c0cca1417be9ed08853fa49f8cabed73b03 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 14 Jun 2022 14:32:22 +0200 Subject: [PATCH 04/24] test CI (#1169) --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 664b59d4b7c..9137170bbdd 100644 --- a/Project.toml +++ b/Project.toml @@ -50,7 +50,7 @@ GeometryBasics = "0.3, 0.4" HDF5 = "0.14, 0.15, 0.16" IfElse = "0.1" LinearMaps = "2.7, 3.0" -LoopVectorization = "0.12.117" +LoopVectorization = "0.12.118" MPI = "0.19" MuladdMacro = "0.2.2" Octavian = "0.3.5" From 310e7d92b285045015d9de2c400a6c5541190527 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 15 Jun 2022 09:16:26 +0200 Subject: [PATCH 05/24] set version to 0.4.39 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9137170bbdd..e5fb33afe40 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.4.39-pre" +version = "0.4.39" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From ee28858487deccc71bfaf43c6f8a8b9f2c3484e0 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 15 Jun 2022 09:16:44 +0200 Subject: [PATCH 06/24] set development version to 0.4.40-pre --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index e5fb33afe40..501213a397f 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.4.39" +version = "0.4.40-pre" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From 3c85b2da0d4849f6276a422f3ed319c276080d9d Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 15 Jun 2022 14:58:25 +0200 Subject: [PATCH 07/24] remove Cassette.jl from tests (#1173) * remove Cassette.jl from tests * remove artificial restriction of StaticArrays.jl --- Project.toml | 2 +- test/Project.toml | 2 -- test/test_unit.jl | 43 ++++++++++++++++++++++--------------------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Project.toml b/Project.toml index 501213a397f..b0cea6e8917 100644 --- a/Project.toml +++ b/Project.toml @@ -64,7 +64,7 @@ SciMLBase = "1.21" Setfield = "0.8, 1" StartUpDG = "0.13.1" Static = "0.3, 0.4, 0.5, 0.6" -StaticArrays = "1.0 - 1.4.4" +StaticArrays = "1" StrideArrays = "0.1.18" StructArrays = "0.6" SummationByPartsOperators = "0.5.10" diff --git a/test/Project.toml b/test/Project.toml index 3540583540a..73b65951955 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,7 +1,6 @@ [deps] BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -Cassette = "7057c7e9-c182-5462-911a-8362d720325c" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" @@ -15,7 +14,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] BSON = "0.3.3" CairoMakie = "0.6, 0.7, 0.8" -Cassette = "0.3.5" Flux = "0.13" ForwardDiff = "0.10" MPI = "0.19" diff --git a/test/test_unit.jl b/test/test_unit.jl index b9d1235ebc8..51eabcaa32c 100644 --- a/test/test_unit.jl +++ b/test/test_unit.jl @@ -1,7 +1,6 @@ module TestUnit using Test -using Cassette using Trixi include("test_trixi.jl") @@ -10,9 +9,6 @@ include("test_trixi.jl") outdir = "out" isdir(outdir) && rm(outdir, recursive=true) -# Create a Cassette context that will be used for mocking Trixi.mpi_nranks -Cassette.@context Ctx - # Run various unit (= non-elixir-triggered) tests @testset "Unit tests" begin @timed_testset "SerialTree" begin @@ -66,8 +62,8 @@ Cassette.@context Ctx @timed_testset "ParallelTreeMesh" begin @testset "partition!" begin @testset "mpi_nranks() = 2" begin - Cassette.overdub(::Ctx, ::typeof(Trixi.mpi_nranks)) = 2 - Cassette.overdub(Ctx(), () -> begin + Trixi.mpi_nranks() = 2 + let @test Trixi.mpi_nranks() == 2 mesh = TreeMesh{2, Trixi.ParallelTree{2}}(30, (0.0, 0.0), 1) @@ -89,13 +85,14 @@ Cassette.@context Ctx @test mesh.tree.mpi_ranks[1:21] == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] @test parent(mesh.first_cell_by_rank) == [1, 12] - end) + end + Trixi.mpi_nranks() = Trixi.MPI_SIZE[] # restore the original behavior end @testset "mpi_nranks() = 3" begin - Cassette.overdub(::Ctx, ::typeof(Trixi.mpi_nranks)) = 3 - Cassette.overdub(Ctx(), () -> begin - @test Trixi.mpi_nranks() == 3 + Trixi.mpi_nranks() = 3 + let + @test Trixi.mpi_nranks() == 3 mesh = TreeMesh{2, Trixi.ParallelTree{2}}(100, (0.0, 0.0), 1) # Refine twice @@ -116,13 +113,14 @@ Cassette.@context Ctx @test mesh.tree.mpi_ranks[1:21] == [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2] @test parent(mesh.first_cell_by_rank) == [1, 10, 16] - end) + end + Trixi.mpi_nranks() = Trixi.MPI_SIZE[] # restore the original behavior end @testset "mpi_nranks() = 9" begin - Cassette.overdub(::Ctx, ::typeof(Trixi.mpi_nranks)) = 9 - Cassette.overdub(Ctx(), () -> begin - @test Trixi.mpi_nranks() == 9 + Trixi.mpi_nranks() = 9 + let + @test Trixi.mpi_nranks() == 9 mesh = TreeMesh{2, Trixi.ParallelTree{2}}(1000, (0.0, 0.0), 1) # Refine twice @@ -136,12 +134,13 @@ Cassette.@context Ctx # Use parent for OffsetArray @test parent(mesh.n_cells_by_rank) == [44, 37, 38, 37, 37, 37, 38, 37, 36] @test parent(mesh.first_cell_by_rank) == [1, 45, 82, 120, 157, 194, 231, 269, 306] - end) + end + Trixi.mpi_nranks() = Trixi.MPI_SIZE[] # restore the original behavior end @testset "mpi_nranks() = 3 non-uniform" begin - Cassette.overdub(::Ctx, ::typeof(Trixi.mpi_nranks)) = 3 - Cassette.overdub(Ctx(), () -> begin + Trixi.mpi_nranks() = 3 + let @test Trixi.mpi_nranks() == 3 mesh = TreeMesh{2, Trixi.ParallelTree{2}}(100, (0.0, 0.0), 1) @@ -162,12 +161,13 @@ Cassette.@context Ctx @test parent(mesh.n_cells_by_rank) == [5, 2, 2] @test mesh.tree.mpi_ranks[1:9] == [0, 0, 0, 0, 0, 1, 1, 2, 2] @test parent(mesh.first_cell_by_rank) == [1, 6, 8] - end) + end + Trixi.mpi_nranks() = Trixi.MPI_SIZE[] # restore the original behavior end @testset "not enough ranks" begin - Cassette.overdub(::Ctx, ::typeof(Trixi.mpi_nranks)) = 3 - Cassette.overdub(Ctx(), () -> begin + Trixi.mpi_nranks() = 3 + let @test Trixi.mpi_nranks() == 3 mesh = TreeMesh{2, Trixi.ParallelTree{2}}(100, (0.0, 0.0), 1) @@ -183,7 +183,8 @@ Cassette.@context Ctx @test_throws AssertionError( "Too many ranks to properly partition the mesh!") Trixi.partition!(mesh) @test_nowarn Trixi.partition!(mesh; allow_coarsening=false) - end) + end + Trixi.mpi_nranks() = Trixi.MPI_SIZE[] # restore the original behavior end end end From 95875b489fab5b8a417eef23bb585648027ed29a Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 16 Jun 2022 06:59:20 +0200 Subject: [PATCH 08/24] set version to 0.4.40 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b0cea6e8917..2109d344528 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.4.40-pre" +version = "0.4.40" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From c7de88710b80d73fed6f181d1605eb897402908d Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 16 Jun 2022 06:59:34 +0200 Subject: [PATCH 09/24] set development version to 0.4.41-pre --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 2109d344528..24759d6257f 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.4.40" +version = "0.4.41-pre" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From 26d4916b62af1877988bdb6bd42eb47c485483b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 25 Jun 2022 09:53:27 +0200 Subject: [PATCH 10/24] CompatHelper: bump compat for HOHQMesh to 0.2 for package docs, (keep existing compat) (#1176) Co-authored-by: CompatHelper Julia --- docs/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Project.toml b/docs/Project.toml index 924f7b43fb9..5384679af93 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -15,7 +15,7 @@ Trixi2Vtk = "bc1476a1-1ca6-4cc3-950b-c312b255ff95" CairoMakie = "0.6, 0.7, 0.8" Documenter = "0.27" ForwardDiff = "0.10" -HOHQMesh = "0.1" +HOHQMesh = "0.1, 0.2" LaTeXStrings = "1.2" Literate = "2.9" Measurements = "2.5" From 92fbeb80222fa3f463dcd279609d940b4c3f6c57 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Tue, 28 Jun 2022 20:13:05 +0200 Subject: [PATCH 11/24] typo fix in README and front page of docs (#1177) --- README.md | 2 +- docs/src/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 866591f4b17..6e7cd6ed0e4 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ installation and postprocessing procedures. Its features include: * Structured and unstructured meshes * Hierarchical quadtree/octree grid with adaptive mesh refinement * Forests of quadtrees/octrees with [p4est](https://github.com/cburstedde/p4est) via [P4est.jl](https://github.com/trixi-framework/P4est.jl) -* High-order accuracy in space in time +* High-order accuracy in space and time * Discontinuous Galerkin methods * Kinetic energy-preserving and entropy-stable methods based on flux differencing * Entropy-stable shock capturing diff --git a/docs/src/index.md b/docs/src/index.md index f116d2b6aef..6fa239c5905 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -24,7 +24,7 @@ installation and postprocessing procedures. Its features include: * Structured and unstructured meshes * Hierarchical quadtree/octree grid with adaptive mesh refinement * Forests of quadtrees/octrees with [p4est](https://github.com/cburstedde/p4est) via [P4est.jl](https://github.com/trixi-framework/P4est.jl) -* High-order accuracy in space in time +* High-order accuracy in space and time * Discontinuous Galerkin methods * Kinetic energy-preserving and entropy-stable methods based on flux differencing * Entropy-stable shock capturing From 941b94bf54b86543c267a222581a263f6cdc2ff2 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 12 Jul 2022 08:04:51 +0200 Subject: [PATCH 12/24] update plot of default_example (#1180) --- README.md | 2 +- docs/src/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6e7cd6ed0e4..39c6b3a6682 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ julia> plot(sol) # No trailing semicolon, otherwise no plot is shown ``` 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 diff --git a/docs/src/index.md b/docs/src/index.md index 6fa239c5905..c46ee9d5012 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -174,7 +174,7 @@ julia> plot(sol) # No trailing semicolon, otherwise no plot is shown ``` This will open a new window with a 2D visualization of the final solution: -![image](https://user-images.githubusercontent.com/72009492/130952732-633159ff-c167-4d36-ba36-f2a2eac0a8d6.PNG) +![image](https://user-images.githubusercontent.com/26361975/177492363-74cee347-7abe-4522-8b2d-0dfadc317f7e.png) 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 From 83b0b3ae03de879eaf716e42b0e06b8447785e81 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 12 Jul 2022 12:14:12 +0200 Subject: [PATCH 13/24] set version to 0.4.41 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 24759d6257f..64fcfaffdeb 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.4.41-pre" +version = "0.4.41" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From c24682a41dfdf33e0e4f716d652bb611d0c2960b Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Tue, 12 Jul 2022 12:14:24 +0200 Subject: [PATCH 14/24] set development version to 0.4.42-pre --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 64fcfaffdeb..1b1586060e2 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.4.41" +version = "0.4.42-pre" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From 59ccf3b2e61fca74c17240961685105556a1d03d Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Wed, 13 Jul 2022 07:28:53 +0200 Subject: [PATCH 15/24] mention restriction of 3D to 2D plotting in the docs (#1181) --- docs/src/visualization.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/visualization.md b/docs/src/visualization.md index 2a9791fe19c..90f612de010 100644 --- a/docs/src/visualization.md +++ b/docs/src/visualization.md @@ -221,8 +221,8 @@ This creates the following plot: ![ScalarPlotData2D_example](https://user-images.githubusercontent.com/1156048/133856590-a9f0be02-8200-483b-af96-eab4a69bf2c7.png) ### Plotting a 3D solution as a 2D plot -It is possible to plot 2D slices from 3D simulation data with the same commands -as above: +It is possible to plot 2D slices from 3D simulation data using the [`TreeMesh`](@ref) +with the same commands as above: ```julia julia> plot(sol) # `sol` is from a 3D simulation ``` From 3078431c8ed56b46eae90e3152ca7b38a88cbbca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Jul 2022 10:12:33 +0200 Subject: [PATCH 16/24] CompatHelper: bump compat for Static to 0.7, (keep existing compat) (#1161) 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 1b1586060e2..379c0d504ea 100644 --- a/Project.toml +++ b/Project.toml @@ -63,7 +63,7 @@ Requires = "1.1" SciMLBase = "1.21" Setfield = "0.8, 1" StartUpDG = "0.13.1" -Static = "0.3, 0.4, 0.5, 0.6" +Static = "0.3, 0.4, 0.5, 0.6, 0.7" StaticArrays = "1" StrideArrays = "0.1.18" StructArrays = "0.6" From 53eb069c34b929f73fb4d8cf7008409be4b30a15 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 14 Jul 2022 10:14:06 +0200 Subject: [PATCH 17/24] set version to v0.4.42 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 379c0d504ea..4a87c4c6587 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.4.42-pre" +version = "0.4.42" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From bcdad4b4a94a14e547a281ccf3b181d7868f92d6 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 14 Jul 2022 10:14:29 +0200 Subject: [PATCH 18/24] set development version to v0.4.43-pre --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 4a87c4c6587..eb1db2c1454 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.4.42" +version = "0.4.43-pre" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From 189211d9b101dc127d1d2580d4fd85db0639f1b9 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Fri, 15 Jul 2022 07:55:29 +0200 Subject: [PATCH 19/24] Add JuliaCon announcement to README (#1172) * Add JuliaCon announcement to README * Use horizontal dividers * update JuliaCon announcement * add links to talks Co-authored-by: Hendrik Ranocha --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 39c6b3a6682..a75aa2e9160 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,18 @@

+*** +**Trixi.jl at JuliaCon 2022**
+At this year's JuliaCon, we will be present with two contributions that involve Trixi.jl: + +* [Running Julia code in parallel with MPI: Lessons learned](https://live.juliacon.org/talk/LUWYRJ), + 26th July 2022 +* [From Mesh Generation to Adaptive Simulation: A Journey in Julia](https://live.juliacon.org/talk/YSLKZJ), + 27th July 2022 + +We are looking forward to seeing you there ♥️ +*** + **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 From a7530dc763839fbe3cdafb3d939d950596c9f362 Mon Sep 17 00:00:00 2001 From: Arpit Babbar Date: Mon, 25 Jul 2022 11:41:49 +0530 Subject: [PATCH 20/24] Small additions to docs (#1186) * Small additions to docs * Apply suggestions from code review Co-authored-by: Hendrik Ranocha * Small fix Co-authored-by: Hendrik Ranocha --- docs/literate/src/files/DGSEM_FluxDiff.jl | 8 +++++++- docs/literate/src/files/time_stepping.jl | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/literate/src/files/DGSEM_FluxDiff.jl b/docs/literate/src/files/DGSEM_FluxDiff.jl index e508ebdb4bc..3bd4995fd49 100644 --- a/docs/literate/src/files/DGSEM_FluxDiff.jl +++ b/docs/literate/src/files/DGSEM_FluxDiff.jl @@ -82,7 +82,13 @@ # When using the diagonal SBP property it is possible to rewrite the application of the derivative # operator $D$ in the calculation of the volume integral into a subcell based finite volume type # differencing formulation ([Fisher, Carpenter (2013)](https://doi.org/10.1016/j.jcp.2013.06.014)). -# We replace $D \underline{f}$ in the strong form by $2D \underline{f}_{vol}(u^-, u^+)$ with +# Generalizing +# ```math +# (D \underline{f})_i = \sum_j D_{i,j} \underline{f}_j +# = 2\sum_j \frac{1}{2} D_{i,j} (\underline{f}_j + \underline{f}_i) +# \eqqcolon 2\sum_j D_{i,j} f_\text{central}(u_i, u_j), +# ``` +# we replace $D \underline{f}$ in the strong form by $2D \underline{f}_{vol}(u^-, u^+)$ with # the consistent two-point volume flux $f_{vol}$ and receive the DGSEM formulation with flux differencing # (split form DGSEM) ([Gassner, Winters, Kopriva (2016)](https://doi.org/10.1016/j.jcp.2016.09.013)). diff --git a/docs/literate/src/files/time_stepping.jl b/docs/literate/src/files/time_stepping.jl index 8fbebdf0467..3a09fec452b 100644 --- a/docs/literate/src/files/time_stepping.jl +++ b/docs/literate/src/files/time_stepping.jl @@ -46,6 +46,8 @@ # ```math # \Delta t_n = \text{CFL} * \min_i \frac{\Delta x_i}{\lambda_{\max}(u_i^n)} # ``` +# 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 # [`StepsizeCallback`](@ref). From 246735069d5b12c66fdfa8b8581bedb596412330 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 28 Jul 2022 16:41:10 +0200 Subject: [PATCH 21/24] more compilation in init (#1189) --- src/Trixi.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Trixi.jl b/src/Trixi.jl index 31c8a73662c..7142436edd3 100644 --- a/src/Trixi.jl +++ b/src/Trixi.jl @@ -240,6 +240,7 @@ function __init__() # FIXME upstream. This is a hacky workaround for # https://github.com/trixi-framework/Trixi.jl/issues/628 + # https://github.com/trixi-framework/Trixi.jl/issues/1185 # The related upstream issues appear to be # https://github.com/JuliaLang/julia/issues/35800 # https://github.com/JuliaLang/julia/issues/32552 @@ -248,9 +249,12 @@ function __init__() let for T in (Float32, Float64) u_mortars_2d = zeros(T, 2, 2, 2, 2, 2) - view(u_mortars_2d, 1, :, 1, :, 1) + u_view_2d = view(u_mortars_2d, 1, :, 1, :, 1) + LoopVectorization.axes(u_view_2d) + u_mortars_3d = zeros(T, 2, 2, 2, 2, 2, 2) - view(u_mortars_3d, 1, :, 1, :, :, 1) + u_view_3d = view(u_mortars_3d, 1, :, 1, :, :, 1) + LoopVectorization.axes(u_view_3d) end end end From 1191ec38fcc98bebdffecbd362301eda06ec2205 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Thu, 28 Jul 2022 20:23:53 +0200 Subject: [PATCH 22/24] fix boundary_condition_slip_wall for 2D TreeMesh (#1191) --- src/equations/compressible_euler_2d.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/equations/compressible_euler_2d.jl b/src/equations/compressible_euler_2d.jl index fea83db3d44..9c3d94cffd8 100644 --- a/src/equations/compressible_euler_2d.jl +++ b/src/equations/compressible_euler_2d.jl @@ -335,13 +335,14 @@ Should be used together with [`TreeMesh`](@ref). equations::CompressibleEulerEquations2D) # get the appropriate normal vector from the orientation if orientation == 1 - normal = SVector(1, 0) + normal_direction = SVector(1, 0) else # orientation == 2 - normal = SVector(0, 1) + normal_direction = SVector(0, 1) end # compute and return the flux using `boundary_condition_slip_wall` routine above - return boundary_condition_slip_wall(u_inner, normal, x, t, surface_flux_function, equations) + return boundary_condition_slip_wall(u_inner, normal_direction, direction, + x, t, surface_flux_function, equations) end """ From a6038907286968c94f1f5f8d14f84be11ea9abd7 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 29 Jul 2022 06:24:45 +0200 Subject: [PATCH 23/24] set version to v0.4.43 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index eb1db2c1454..cf36fdce091 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.4.43-pre" +version = "0.4.43" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" From 22348a75045aeeeda6a77a1e8922a9993b7617df Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Fri, 29 Jul 2022 06:25:00 +0200 Subject: [PATCH 24/24] set development version to v0.4.44-pre --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index cf36fdce091..fa707e3f4c0 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.4.43" +version = "0.4.44-pre" [deps] CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2"