Skip to content

Commit

Permalink
Merge branch 'main' into conservative-amr
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwinters5000 authored Aug 15, 2024
2 parents 493bb16 + bb528a4 commit f1f322b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
10 changes: 8 additions & 2 deletions docs/src/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ For example, the following steps were used to benchmark the changes introduced i
```julia
julia> using BenchmarkTools, Revise; using Trixi

julia> trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")
julia> # nowadays "examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl"
trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")

julia> du_test = copy(sol.u[end]); u_test = copy(sol.u[end]);

Expand All @@ -65,7 +66,8 @@ For example, the following steps were used to benchmark the changes introduced i

shell> git checkout 222241ff54f8a4ca9876cc1fc25ae262416a4ea0

julia> trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")
julia> # nowadays "examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl"
trixi_include("examples/2d/elixir_euler_sedov_blast_wave.jl")

julia> @benchmark Trixi.rhs!(
$(du_test),
Expand All @@ -85,6 +87,10 @@ For example, the following steps were used to benchmark the changes introduced i
evals/sample: 1
```
Run the `@benchmark ...` commands multiple times to see whether there are any significant fluctuations.
Note that the elixir name has changed since
[PR #256](https://github.com/trixi-framework/Trixi.jl/pull/256).
Nowadays, the relevant elixir is
[`examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl`](https://github.com/trixi-framework/Trixi.jl/blob/main/examples/tree_2d_dgsem/elixir_euler_sedov_blast_wave.jl).

Follow these steps for both commits you want to compare. The relevant benchmark results you should typically be looking at
are the median and mean values of the runtime and the memory/allocs estimate. In this example, the differences
Expand Down
16 changes: 8 additions & 8 deletions src/solvers/dgsem_p4est/containers_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

mutable struct P4estMPIInterfaceContainer{NDIMS, uEltype <: Real, NDIMSP2} <:
AbstractContainer
u::Array{uEltype, NDIMSP2} # [primary/secondary, variable, i, j, interface]
local_neighbor_ids::Vector{Int} # [interface]
u::Array{uEltype, NDIMSP2} # [primary/secondary, variable, i, j, interface]
local_neighbor_ids::Vector{Int} # [interface]
node_indices::Vector{NTuple{NDIMS, Symbol}} # [interface]
local_sides::Vector{Int} # [interface]
local_sides::Vector{Int} # [interface]

# internal `resize!`able storage
_u::Vector{uEltype}
Expand Down Expand Up @@ -89,11 +89,11 @@ end
# the normal vectors on the surface of the small elements for each mortar.
mutable struct P4estMPIMortarContainer{NDIMS, uEltype <: Real, RealT <: Real, NDIMSP1,
NDIMSP2, NDIMSP3} <: AbstractContainer
u::Array{uEltype, NDIMSP3} # [small/large side, variable, position, i, j, mortar]
local_neighbor_ids::Vector{Vector{Int}} # [mortar]
local_neighbor_positions::Vector{Vector{Int}} # [mortar]
node_indices::Matrix{NTuple{NDIMS, Symbol}} # [small/large, mortar]
normal_directions::Array{RealT, NDIMSP2} # [dimension, i, j, position, mortar]
u::Array{uEltype, NDIMSP3} # [small/large side, variable, position, i, j, mortar]
local_neighbor_ids::Vector{Vector{Int}} # [mortar][ids]
local_neighbor_positions::Vector{Vector{Int}} # [mortar][positions]
node_indices::Matrix{NTuple{NDIMS, Symbol}} # [small/large, mortar]
normal_directions::Array{RealT, NDIMSP2} # [dimension, i, j, position, mortar]
# internal `resize!`able storage
_u::Vector{uEltype}
_node_indices::Vector{NTuple{NDIMS, Symbol}}
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/dgsem_tree/containers_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ end
mutable struct MPIL2MortarContainer2D{uEltype <: Real} <: AbstractContainer
u_upper::Array{uEltype, 4} # [leftright, variables, i, mortars]
u_lower::Array{uEltype, 4} # [leftright, variables, i, mortars]
local_neighbor_ids::Vector{Vector{Int}} # [mortars]
local_neighbor_positions::Vector{Vector{Int}} # [mortars]
local_neighbor_ids::Vector{Vector{Int}} # [mortars][ids]
local_neighbor_positions::Vector{Vector{Int}} # [mortars][positions]
# Large sides: left -> 1, right -> 2
large_sides::Vector{Int} # [mortars]
orientations::Vector{Int} # [mortars]
Expand Down

0 comments on commit f1f322b

Please sign in to comment.