Skip to content

Commit

Permalink
add LEADING_ZEROS
Browse files Browse the repository at this point in the history
  • Loading branch information
benegee committed Dec 20, 2024
1 parent 53100c0 commit c65bb90
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions test/test_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ end

@timed_testset "mesh data" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "mesh_000005.h5"), output_directory=outdir)
outfilename = "mesh_000005_celldata.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "mesh_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir)
outfilename = "mesh_" * LEADING_ZEROS * "000005_celldata.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -417,8 +417,8 @@ end

@timed_testset "solution celldata" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000005.h5"), output_directory=outdir)
outfilename = "solution_000005_celldata.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir)
outfilename = "solution_" * LEADING_ZEROS * "000005_celldata.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -433,8 +433,8 @@ end

@timed_testset "reinterpolate with nonuniform data" begin
# Create and test output with reinterpolation (default options: `reinterpolate=true, data_is_uniform=false`)
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000005.h5"), output_directory=outdir)
outfilename = "solution_000005.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir)
outfilename = "solution_" * LEADING_ZEROS * "000005.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -449,8 +449,8 @@ end

@timed_testset "do not reinterpolate with nonuniform data" begin
# Create and test output without reinterpolation on LGL nodes
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000005.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_000005.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_" * LEADING_ZEROS * "000005.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -466,8 +466,8 @@ end
@timed_testset "do not reinterpolate with uniform data" begin
# Create and test output without reinterpolation on uniform nodes
# OBS! This is a dummy test just to exercise code. The resulting plot will look weird.
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000005.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_000005.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_" * LEADING_ZEROS * "000005.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand Down
16 changes: 8 additions & 8 deletions test/test_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ end

@timed_testset "solution celldata" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000002.h5"), output_directory=outdir)
outfilename = "solution_000002_celldata.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000002.h5"), output_directory=outdir)
outfilename = "solution_" * LEADING_ZEROS * "000002_celldata.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -315,8 +315,8 @@ end

@timed_testset "reinterpolate with nonuniform data" begin
# Create and test output with reinterpolation (default options: `reinterpolate=true, data_is_uniform=false`)
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000002.h5"), output_directory=outdir)
outfilename = "solution_000002.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000002.h5"), output_directory=outdir)
outfilename = "solution_" * LEADING_ZEROS * "000002.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -331,8 +331,8 @@ end

@timed_testset "do not reinterpolate with nonuniform data" begin
# Create and test output without reinterpolation on LGL nodes
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000002.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_000002.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000002.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_" * LEADING_ZEROS * "000002.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -348,8 +348,8 @@ end
@timed_testset "do not reinterpolate with uniform data" begin
# Create and test output without reinterpolation on uniform nodes
# OBS! This is a dummy test just to exercise code. The resulting plot will look weird.
@test_nowarn trixi2vtk(joinpath(outdir, "solution_000002.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_000002.vtu"
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000002.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_" * LEADING_ZEROS * "000002.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand Down

0 comments on commit c65bb90

Please sign in to comment.