-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trixi-framework:main' into main
- Loading branch information
Showing
224 changed files
with
47,128 additions
and
42,980 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Use SciML style: https://github.com/SciML/SciMLStyle | ||
style = "sciml" | ||
|
||
# Python style alignment. See https://github.com/domluna/JuliaFormatter.jl/pull/732. | ||
yas_style_nesting = true | ||
|
||
# Align struct fields for better readability of large struct definitions | ||
align_struct_field = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: format-check | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: '*' | ||
pull_request: | ||
|
||
jobs: | ||
check-format: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
julia-version: [1] | ||
julia-arch: [x86] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Install JuliaFormatter and format | ||
# This will use the latest version by default but you can set the version like so: | ||
# | ||
# julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))' | ||
# | ||
# TODO: Change the call below to | ||
# format(".") | ||
run: | | ||
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter"))' | ||
julia -e 'using JuliaFormatter; format(["benchmark", "ext", "src", "utils"])' | ||
- name: Format check | ||
run: | | ||
julia -e ' | ||
out = Cmd(`git diff --name-only`) |> read |> String | ||
if out == "" | ||
exit(0) | ||
else | ||
@error "Some files have not been formatted !!!" | ||
write(stdout, out) | ||
exit(1) | ||
end' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ jobs: | |
- name: Checkout Actions Repository | ||
uses: actions/checkout@v3 | ||
- name: Check spelling | ||
uses: crate-ci/[email protected].9 | ||
uses: crate-ci/[email protected].12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
os: | ||
- ubuntu-latest | ||
version: | ||
- '1.8' | ||
- '1.9' | ||
arch: | ||
- x64 | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.25-pre" | ||
version = "0.5.29-pre" | ||
|
||
[deps] | ||
CodeTracking = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" | ||
|
@@ -42,6 +42,12 @@ Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344" | |
TriplotBase = "981d1d27-644d-49a2-9326-4793e63143c3" | ||
TriplotRecipes = "808ab39a-a642-4abf-81ff-4cb34ebbffa3" | ||
|
||
[weakdeps] | ||
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" | ||
|
||
[extensions] | ||
TrixiMakieExt = "Makie" | ||
|
||
[compat] | ||
CodeTracking = "1.0.5" | ||
ConstructionBase = "1.3" | ||
|
@@ -53,6 +59,7 @@ HDF5 = "0.14, 0.15, 0.16" | |
IfElse = "0.1" | ||
LinearMaps = "2.7, 3.0" | ||
LoopVectorization = "0.12.118" | ||
Makie = "0.19" | ||
MPI = "0.20" | ||
MuladdMacro = "0.2.2" | ||
Octavian = "0.3.5" | ||
|
@@ -66,7 +73,7 @@ Requires = "1.1" | |
SciMLBase = "1.90" | ||
Setfield = "0.8, 1" | ||
SimpleUnPack = "1.1" | ||
StartUpDG = "0.16" | ||
StartUpDG = "0.17" | ||
Static = "0.3, 0.4, 0.5, 0.6, 0.7, 0.8" | ||
StaticArrayInterface = "1.4" | ||
StaticArrays = "1" | ||
|
@@ -78,3 +85,6 @@ Triangulate = "2.0" | |
TriplotBase = "0.1" | ||
TriplotRecipes = "0.1" | ||
julia = "1.8" | ||
|
||
[extras] | ||
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
using Printf, BenchmarkTools, Trixi | ||
|
||
function run_benchmarks(benchmark_run; levels=0:5, polydeg=3) | ||
runtimes = zeros(length(levels)) | ||
for (idx,initial_refinement_level) in enumerate(levels) | ||
result = benchmark_run(; initial_refinement_level, polydeg) | ||
display(result) | ||
runtimes[idx] = result |> median |> time # in nanoseconds | ||
end | ||
return (; levels, runtimes, polydeg) | ||
function run_benchmarks(benchmark_run; levels = 0:5, polydeg = 3) | ||
runtimes = zeros(length(levels)) | ||
for (idx, initial_refinement_level) in enumerate(levels) | ||
result = benchmark_run(; initial_refinement_level, polydeg) | ||
display(result) | ||
runtimes[idx] = result |> median |> time # in nanoseconds | ||
end | ||
return (; levels, runtimes, polydeg) | ||
end | ||
|
||
function tabulate_benchmarks(args...; kwargs...) | ||
result = run_benchmarks(args...; kwargs...) | ||
println("#Elements | Runtime in seconds") | ||
for (level,runtime) in zip(result.levels, result.runtimes) | ||
@printf("%9d | %.2e\n", 4^level, 1.0e-9 * runtime) | ||
end | ||
for (level,runtime) in zip(result.levels, result.runtimes) | ||
@printf("%.16e\n", 1.0e-9 * runtime) | ||
end | ||
result = run_benchmarks(args...; kwargs...) | ||
println("#Elements | Runtime in seconds") | ||
for (level, runtime) in zip(result.levels, result.runtimes) | ||
@printf("%9d | %.2e\n", 4^level, 1.0e-9*runtime) | ||
end | ||
for (level, runtime) in zip(result.levels, result.runtimes) | ||
@printf("%.16e\n", 1.0e-9*runtime) | ||
end | ||
end | ||
|
||
function benchmark_euler(; initial_refinement_level=1, polydeg=3) | ||
function benchmark_euler(; initial_refinement_level = 1, polydeg = 3) | ||
γ = 1.4 | ||
equations = CompressibleEulerEquations2D(γ) | ||
|
||
γ = 1.4 | ||
equations = CompressibleEulerEquations2D(γ) | ||
surface_flux = flux_ranocha | ||
volume_flux = flux_ranocha | ||
solver = DGSEM(polydeg, surface_flux, VolumeIntegralFluxDifferencing(volume_flux)) | ||
|
||
surface_flux = flux_ranocha | ||
volume_flux = flux_ranocha | ||
solver = DGSEM(polydeg, surface_flux, VolumeIntegralFluxDifferencing(volume_flux)) | ||
coordinates_min = (-2.0, -2.0) | ||
coordinates_max = (2.0, 2.0) | ||
mesh = TreeMesh(coordinates_min, coordinates_max, | ||
initial_refinement_level = initial_refinement_level, | ||
n_cells_max = 100_000) | ||
|
||
coordinates_min = (-2.0, -2.0) | ||
coordinates_max = ( 2.0, 2.0) | ||
mesh = TreeMesh(coordinates_min, coordinates_max, | ||
initial_refinement_level=initial_refinement_level, | ||
n_cells_max=100_000) | ||
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_weak_blast_wave, | ||
solver) | ||
|
||
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_weak_blast_wave, solver) | ||
t0 = 0.0 | ||
u0 = compute_coefficients(t0, semi) | ||
du = similar(u0) | ||
|
||
t0 = 0.0 | ||
u0 = compute_coefficients(t0, semi) | ||
du = similar(u0) | ||
|
||
@benchmark Trixi.rhs!($du, $u0, $semi, $t0) | ||
@benchmark Trixi.rhs!($du, $u0, $semi, $t0) | ||
end | ||
|
||
# versioninfo(verbose=true) | ||
@show Threads.nthreads() | ||
tabulate_benchmarks(benchmark_euler, levels=0:8) | ||
tabulate_benchmarks(benchmark_euler, levels = 0:8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.