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 May 12, 2023
2 parents 16d93b9 + 8bd2646 commit d2dbbb0
Show file tree
Hide file tree
Showing 45 changed files with 55 additions and 93 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ HDF5 = "0.14, 0.15, 0.16"
IfElse = "0.1"
LinearMaps = "2.7, 3.0"
LoopVectorization = "0.12.118"
MPI = "0.20"
MPI = "0.20 - 0.20.8"
MuladdMacro = "0.2.2"
Octavian = "0.3.5"
OffsetArrays = "1.3"
Expand Down
4 changes: 2 additions & 2 deletions benchmark/run_benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let results = judge(Trixi,
BenchmarkConfig(juliacmd=`$(Base.julia_cmd()) --check-bounds=no --threads=1`, id="main") # baseline
)

export_markdown(joinpath(pathof(Trixi) |> dirname |> dirname, "benchmark", "results_$(gethostname())_threads1.md"), results)
export_markdown(pkgdir(Trixi, "benchmark", "results_$(gethostname())_threads1.md"), results)
end


Expand All @@ -16,5 +16,5 @@ let results = judge(Trixi,
BenchmarkConfig(juliacmd=`$(Base.julia_cmd()) --check-bounds=no --threads=2`, id="main") # baseline
)

export_markdown(joinpath(pathof(Trixi) |> dirname |> dirname, "benchmark", "results_$(gethostname())_threads2.md"), results)
export_markdown(pkgdir(Trixi, "benchmark", "results_$(gethostname())_threads2.md"), results)
end
4 changes: 2 additions & 2 deletions docs/src/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ julia> using PkgBenchmark, Trixi

julia> results = benchmarkpkg(Trixi, BenchmarkConfig(juliacmd=`$(Base.julia_cmd()) --check-bounds=no --threads=1`))

julia> export_markdown(joinpath(pathof(Trixi) |> dirname |> dirname, "benchmark", "single_benchmark.md"), results)
julia> export_markdown(pkgdir(Trixi, "benchmark", "single_benchmark.md"), results)
```
This will save a markdown file with a summary of the benchmark results similar to
[this example](https://gist.github.com/ranocha/494fa2529e1e6703c17b08434c090980).
Expand All @@ -132,7 +132,7 @@ julia> results = judge(Trixi,
BenchmarkConfig(juliacmd=`$(Base.julia_cmd()) --check-bounds=no --threads=1`, id="main") # baseline
)

julia> export_markdown(joinpath(pathof(Trixi) |> dirname |> dirname, "benchmark", "results.md"), results)
julia> export_markdown(pkgdir(Trixi, "benchmark", "results.md"), results)
```
By default, the `target` is the current state of the repository. Remember that you
need to be in a clean state (commit or stash your changes) to run this successfully.
Expand Down
2 changes: 1 addition & 1 deletion src/auxiliary/auxiliary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ modified. To find out which files are available, use, e.g., `readdir`:
readdir(examples_dir())
```
"""
examples_dir() = joinpath(pathof(Trixi) |> dirname |> dirname, "examples")
examples_dir() = pkgdir(Trixi, "examples")


"""
Expand Down
2 changes: 1 addition & 1 deletion test/test_dgmulti_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Trixi

include("test_trixi.jl")

EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "dgmulti_3d")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "dgmulti_3d")

# Start with a clean environment: remove Trixi.jl output directory if it exists
outdir = "out"
Expand Down
3 changes: 1 addition & 2 deletions test/test_mpi_p4est_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
const EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "p4est_2d_dgsem")
const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_2d_dgsem")

@testset "P4estMesh MPI 2D" begin

Expand Down
3 changes: 1 addition & 2 deletions test/test_mpi_p4est_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
const EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "p4est_3d_dgsem")
const EXAMPLES_DIR = pkgdir(Trixi, "examples", "p4est_3d_dgsem")

@testset "P4estMesh MPI 3D" begin

Expand Down
3 changes: 1 addition & 2 deletions test/test_mpi_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
const EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
const EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

# Needed to skip certain tests on Windows CI
CI_ON_WINDOWS = (get(ENV, "GITHUB_ACTIONS", false) == "true") && Sys.iswindows()
Expand Down
3 changes: 1 addition & 2 deletions test/test_paper_self_gravitating_gas_dynamics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ include("test_trixi.jl")
outdir = "out"
isdir(outdir) && rm(outdir, recursive=true)

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
const EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "paper_self_gravitating_gas_dynamics")
const EXAMPLES_DIR = pkgdir(Trixi, "examples", "paper_self_gravitating_gas_dynamics")

# Numerical examples from the Euler-gravity paper
@testset "paper_self_gravitating_gas_dynamics" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_special_elixirs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ include("test_trixi.jl")
outdir = "out"
isdir(outdir) && rm(outdir, recursive=true)

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
const EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples")
const EXAMPLES_DIR = pkgdir(Trixi, "examples")

cmd = string(Base.julia_cmd())
coverage = occursin("--code-coverage", cmd) && !occursin("--code-coverage=none", cmd)
Expand Down
3 changes: 1 addition & 2 deletions test/test_structured_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "structured_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "structured_1d_dgsem")

# Start with a clean environment: remove Trixi.jl output directory if it exists
outdir = "out"
Expand Down
3 changes: 1 addition & 2 deletions test/test_structured_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "structured_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "structured_2d_dgsem")

# Start with a clean environment: remove Trixi.jl output directory if it exists
outdir = "out"
Expand Down
3 changes: 1 addition & 2 deletions test/test_structured_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "structured_3d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "structured_3d_dgsem")

# Start with a clean environment: remove Trixi.jl output directory if it exists
outdir = "out"
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

# Start with a clean environment: remove Trixi.jl output directory if it exists
outdir = "out"
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Linear scalar advection" begin
@trixi_testset "elixir_advection_basic.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_burgers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Inviscid Burgers" begin
@trixi_testset "elixir_burgers_basic.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Compressible Euler" begin
@trixi_testset "elixir_euler_source_terms.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_eulergravity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Compressible Euler with self-gravity" begin
@trixi_testset "elixir_eulergravity_convergence.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_eulermulti.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Compressible Euler Multicomponent" begin

Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_fdsbp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_fdsbp")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_fdsbp")

@testset "Inviscid Burgers" begin
@trixi_testset "elixir_burgers_basic.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_hypdiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Hyperbolic diffusion" begin

Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_mhd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "MHD" begin

Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_1d_mhdmulti.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "MHD Multicomponent" begin

Expand Down
2 changes: 1 addition & 1 deletion test/test_tree_1d_shallowwater.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Trixi

include("test_trixi.jl")

EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Shallow Water" begin
@trixi_testset "elixir_shallowwater_ec.jl" begin
Expand Down
8 changes: 4 additions & 4 deletions test/test_tree_1d_shallowwater_twolayer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Trixi

include("test_trixi.jl")

EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")

@testset "Shallow Water Two layer" begin
@trixi_testset "elixir_shallowwater_twolayer_convergence.jl" begin
Expand All @@ -20,7 +20,7 @@ EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1
@trixi_testset "elixir_shallowwater_twolayer_convergence.jl with flux_es_fjordholm_etal" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_twolayer_convergence.jl"),
l2 = [0.0027681377074701345, 0.0018007543202559165, 0.0028036917433720576,
0.0013980358596935737, 0.0004744186597732706],
0.0013980358596935737, 0.0004744186597732706],
linf = [0.005699303919826093, 0.006432952918256296, 0.0058507082844360125, 0.002717615543961216,
0.0008992474511784199],
surface_flux=(flux_es_fjordholm_etal, flux_nonconservative_fjordholm_etal),
Expand All @@ -38,8 +38,8 @@ EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_1

@trixi_testset "elixir_shallowwater_twolayer_dam_break.jl with flux_lax_friedrichs" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_shallowwater_twolayer_dam_break.jl"),
l2 = [0.35490827242437256, 1.6715402155795918, 0.6960264969949427,
0.9351481433409805, 0.7938172946965545],
l2 = [0.35490827242437256, 1.6715402155795918, 0.6960264969949427,
0.9351481433409805, 0.7938172946965545],
linf = [0.6417127471419837, 1.9742107034120873, 1.135774587483082, 1.236125279347084, 1.1],
surface_flux = (flux_lax_friedrichs, flux_nonconservative_fjordholm_etal),
tspan = (0.0, 0.25))
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_acoustics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "Acoustic Perturbation" begin
@trixi_testset "elixir_acoustics_convergence.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_advection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "Linear scalar advection" begin
@trixi_testset "elixir_advection_basic.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_euler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "Compressible Euler" begin
@trixi_testset "elixir_euler_source_terms.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_eulermulti.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "Compressible Euler Multicomponent" begin
# NOTE: Some of the L2/Linf errors are comparably large. This is due to the fact that some of the
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_fdsbp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_fdsbp")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_fdsbp")

@testset "Linear scalar advection" begin
@trixi_testset "elixir_advection_extended.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_hypdiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "Hyperbolic diffusion" begin
@trixi_testset "elixir_hypdiff_lax_friedrichs.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_lbm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "Lattice-Boltzmann" begin
@trixi_testset "elixir_lbm_constant.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_linearizedeuler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "Linearized Euler Equations 2D" begin
@trixi_testset "elixir_linearizedeuler_convergence.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_mhd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "MHD" begin
@trixi_testset "elixir_mhd_alfven_wave.jl" begin
Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_mhdmulti.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

@testset "MHD Multicomponent" begin

Expand Down
3 changes: 1 addition & 2 deletions test/test_tree_2d_part1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ using Trixi

include("test_trixi.jl")

# pathof(Trixi) returns /path/to/Trixi.jl/src/Trixi.jl, dirname gives the parent directory
EXAMPLES_DIR = joinpath(pathof(Trixi) |> dirname |> dirname, "examples", "tree_2d_dgsem")
EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")

# Start with a clean environment: remove Trixi.jl output directory if it exists
outdir = "out"
Expand Down
Loading

0 comments on commit d2dbbb0

Please sign in to comment.