Skip to content

Commit

Permalink
more fixes for leading zeros in 2D
Browse files Browse the repository at this point in the history
  • Loading branch information
ranocha authored Jul 1, 2024
1 parent aed1eef commit 7746a79
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions test/test_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ end
@timed_testset "mesh data" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "mesh_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir)
outfilename = "mesh_000010_celldata.vtu"
outfilename = "mesh_" * LEADING_ZEROS * "000010_celldata.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -39,7 +39,7 @@ end
@timed_testset "solution celldata" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir)
outfilename = "solution_000010_celldata.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000010_celldata.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -55,7 +55,7 @@ end
@timed_testset "reinterpolate with nonuniform data with VTU format" begin
# Create and test output with reinterpolation (default options: `reinterpolate=true, data_is_uniform=false`)
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir)
outfilename = "solution_000010.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000010.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -71,7 +71,7 @@ end
@timed_testset "reinterpolate with nonuniform data with VTI format" begin
# Create and test output with reinterpolation (default options: `reinterpolate=true, data_is_uniform=false`)
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir, format=:vti)
outfilename = "solution_000010.vti"
outfilename = "solution_" * LEADING_ZEROS * "000010.vti"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -87,7 +87,7 @@ 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_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_000010.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000010.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -104,7 +104,7 @@ end
# 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_" * LEADING_ZEROS * "000010.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_000010.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000010.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand Down Expand Up @@ -154,7 +154,7 @@ end
# that only needs to be tested once.
@test_nowarn trixi2vtk(joinpath(outdir, "solution_00000*.h5"), output_directory=outdir)

outfilename = "solution_000001_celldata.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001_celldata.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -170,7 +170,7 @@ 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_" * LEADING_ZEROS * "000001.h5"), output_directory=outdir)
outfilename = "solution_000001.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -186,7 +186,7 @@ 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_" * LEADING_ZEROS * "000001.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_000001.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -203,7 +203,7 @@ end
# 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_" * LEADING_ZEROS * "000001.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_000001.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand Down Expand Up @@ -246,7 +246,7 @@ end
@timed_testset "solution celldata" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000001.h5"), output_directory=outdir)
outfilename = "solution_000001_celldata.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001_celldata.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -262,7 +262,7 @@ 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_" * LEADING_ZEROS * "000001.h5"), output_directory=outdir)
outfilename = "solution_000001.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -278,7 +278,7 @@ 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_" * LEADING_ZEROS * "000001.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_000001.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -295,7 +295,7 @@ end
# 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_" * LEADING_ZEROS * "000001.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_000001.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000001.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -316,7 +316,7 @@ end
@timed_testset "mesh data" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "mesh_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir)
outfilename = "mesh_000005_celldata.vtu"
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 @@ -332,7 +332,7 @@ end
@timed_testset "solution celldata" begin
# create the output file to be tested
@test_nowarn trixi2vtk(joinpath(outdir, "solution_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir)
outfilename = "solution_000005_celldata.vtu"
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 @@ -348,7 +348,7 @@ 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_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir)
outfilename = "solution_000005.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000005.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -364,7 +364,7 @@ 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_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir, reinterpolate=false)
outfilename = "solution_000005.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000005.vtu"
out_file = joinpath(outdir, outfilename)

# save output file to `artifacts` to facilitate debugging of failing tests
Expand All @@ -381,7 +381,7 @@ end
# 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_" * LEADING_ZEROS * "000005.h5"), output_directory=outdir, reinterpolate=false, data_is_uniform=true)
outfilename = "solution_000005.vtu"
outfilename = "solution_" * LEADING_ZEROS * "000005.vtu"
out_file = joinpath(outdir, outfilename)

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

0 comments on commit 7746a79

Please sign in to comment.