diff --git a/docs/literate/src/files/first_steps/create_first_setup.jl b/docs/literate/src/files/first_steps/create_first_setup.jl index ae78a6a1546..227e4cd2cce 100644 --- a/docs/literate/src/files/first_steps/create_first_setup.jl +++ b/docs/literate/src/files/first_steps/create_first_setup.jl @@ -260,28 +260,28 @@ plot!(getmesh(pd)) # import Pkg # Pkg.add(["Trixi2Vtk"]) # ``` -# Now we load the Trixi2Vtk.jl package and convert the file `out/solution_000032.h5` with +# Now we load the Trixi2Vtk.jl package and convert the file `out/solution_000000032.h5` with # the final solution using the [`trixi2vtk`](@ref) function saving the resulting file in the # `out` folder. using Trixi2Vtk -trixi2vtk(joinpath("out", "solution_000032.h5"), output_directory="out") +trixi2vtk(joinpath("out", "solution_000000032.h5"), output_directory="out") -# Now two files `solution_000032.vtu` and `solution_000032_celldata.vtu` have been generated in the +# Now two files `solution_000000032.vtu` and `solution_000000032_celldata.vtu` have been generated in the # `out` folder. The first one contains all the information for visualizing the solution, the # second one contains all the cell-based or discretization-based information. # Now let's visualize the solution from the generated files in ParaView. Follow this short # instruction to get the visualization. # - Download, install and open [ParaView](https://www.paraview.org/download/). -# - Press `Ctrl+O` and select the generated files `solution_000032.vtu` and -# `solution_000032_celldata.vtu` from the `out` folder. +# - Press `Ctrl+O` and select the generated files `solution_000000032.vtu` and +# `solution_000000032_celldata.vtu` from the `out` folder. # - In the upper-left corner in the Pipeline Browser window, left-click on the eye-icon near -# `solution_000032.vtu`. +# `solution_000000032.vtu`. # - In the lower-left corner in the Properties window, change the Coloring from Solid Color to # scalar. This already generates the visualization of the final solution. # - Now let's add the mesh to the visualization. In the upper-left corner in the -# Pipeline Browser window, left-click on the eye-icon near `solution_000032_celldata.vtu`. +# Pipeline Browser window, left-click on the eye-icon near `solution_000000032_celldata.vtu`. # - In the lower-left corner in the Properties window, change the Representation from Surface # to Wireframe. Then a white grid should appear on the visualization. # Now, if you followed the instructions exactly, you should get a similar image as shown in the diff --git a/docs/literate/src/files/hohqmesh_tutorial.jl b/docs/literate/src/files/hohqmesh_tutorial.jl index dd81f47951e..f5d93428f10 100644 --- a/docs/literate/src/files/hohqmesh_tutorial.jl +++ b/docs/literate/src/files/hohqmesh_tutorial.jl @@ -54,7 +54,7 @@ end #hide #md using Trixi2Vtk redirect_stdio(stdout=devnull, stderr=devnull) do # code that prints annoying stuff we don't want to see here #hide #md -trixi2vtk("out/solution_000180.h5", output_directory="out") +trixi2vtk("out/solution_000000180.h5", output_directory="out") end #hide #md # Note this step takes about 15-30 seconds as the package `Trixi2Vtk` must be precompiled and executed for the first time @@ -64,7 +64,7 @@ end #hide #md # visualization nodes. For instance, if we want to use 12 uniformly spaced nodes for visualization we can execute redirect_stdio(stdout=devnull, stderr=devnull) do # code that prints annoying stuff we don't want to see here #hide #md -trixi2vtk("out/solution_000180.h5", output_directory="out", nvisnodes=12) +trixi2vtk("out/solution_000000180.h5", output_directory="out", nvisnodes=12) end #hide #md # By default `trixi2vtk` sets `nvisnodes` to be the same as the number of nodes specified in diff --git a/docs/src/restart.md b/docs/src/restart.md index c7cbcd11852..fd2044b6a11 100644 --- a/docs/src/restart.md +++ b/docs/src/restart.md @@ -30,7 +30,7 @@ conditionals like `if restart` with a boolean variable `restart` that is user de First we need to define from which file we want to restart, e.g. ```julia -restart_file = "restart_000021.h5" +restart_file = "restart_000000021.h5" restart_filename = joinpath("out", restart_file) ``` diff --git a/docs/src/visualization.md b/docs/src/visualization.md index 36a7e8f5ac8..95f7ed6b684 100644 --- a/docs/src/visualization.md +++ b/docs/src/visualization.md @@ -415,15 +415,15 @@ julia> using Trixi2Vtk ``` To process an HDF5 file generated by Trixi.jl, execute ```julia -julia> trixi2vtk(joinpath("out", "solution_000000.h5"), output_directory="out") +julia> trixi2vtk(joinpath("out", "solution_000000000.h5"), output_directory="out") ``` This will create two unstructured VTK files in the `out` subdirectory that can -be opened with ParaView or VisIt: `solution_000000.vtu` contains the -discontinuous Galerkin solution data while `solution_000000_celldata.vtu` holds +be opened with ParaView or VisIt: `solution_000000000.vtu` contains the +discontinuous Galerkin solution data while `solution_000000000_celldata.vtu` holds any cell-based values such as the current AMR indicator or the cell refinement level. -!["solution_000000_scalar_mesh"](https://github.com/trixi-framework/Trixi2Vtk.jl/raw/main/docs/src/assets/solution_000000_scalar_mesh.png) +!["solution_000000000_scalar_mesh"](https://github.com/trixi-framework/Trixi2Vtk.jl/raw/main/docs/src/assets/solution_000000_scalar_mesh.png) This allows you to generate VTK files for solution, restart and mesh files. By default, Trixi2Vtk generates `.vtu` (unstructured VTK) files for both @@ -440,7 +440,7 @@ publication-quality images, but increases the file size. If you want to convert multiple solution/restart files at once, you can just supply multiple input files as the positional arguments to `trixi2vtk`, e.g., ```julia -julia> trixi2vtk("out/solution_000000.h5", "out/solution_000040.h5") +julia> trixi2vtk("out/solution_000000000.h5", "out/solution_000000040.h5") ``` You may also use file globbing to select a range of files based on filename patterns, e.g., ```julia @@ -450,7 +450,7 @@ to convert all solution files in the `out/` directory or ```julia julia> trixi2vtk("out/restart_00[0-9]000.h5") ``` -to convert every one-thousandth restart file (`out/restart_000000.h5`, +to convert every one-thousandth restart file (`out/restart_000000000.h5`, `out/restart_001000.h5` etc.). When multiple solution/restart files are provided, Trixi2Vtk will also generate a diff --git a/examples/p4est_2d_dgsem/elixir_advection_restart.jl b/examples/p4est_2d_dgsem/elixir_advection_restart.jl index 0f573714c1f..6fb14c60038 100644 --- a/examples/p4est_2d_dgsem/elixir_advection_restart.jl +++ b/examples/p4est_2d_dgsem/elixir_advection_restart.jl @@ -6,7 +6,7 @@ using Trixi # create a restart file elixir_file = "elixir_advection_extended.jl" -restart_file = "restart_000021.h5" +restart_file = "restart_000000021.h5" trixi_include(@__MODULE__, joinpath(@__DIR__, elixir_file)) diff --git a/examples/p4est_2d_dgsem/elixir_advection_restart_amr.jl b/examples/p4est_2d_dgsem/elixir_advection_restart_amr.jl index fd3623dd88b..6b68347493a 100644 --- a/examples/p4est_2d_dgsem/elixir_advection_restart_amr.jl +++ b/examples/p4est_2d_dgsem/elixir_advection_restart_amr.jl @@ -6,7 +6,7 @@ using Trixi # create a restart file elixir_file = "elixir_advection_extended.jl" -restart_file = "restart_000021.h5" +restart_file = "restart_000000021.h5" trixi_include(@__MODULE__, joinpath(@__DIR__, elixir_file)) diff --git a/examples/p4est_3d_dgsem/elixir_advection_restart.jl b/examples/p4est_3d_dgsem/elixir_advection_restart.jl index b3dead42399..9d19d81cf47 100644 --- a/examples/p4est_3d_dgsem/elixir_advection_restart.jl +++ b/examples/p4est_3d_dgsem/elixir_advection_restart.jl @@ -14,7 +14,7 @@ trixi_include(@__MODULE__, joinpath(@__DIR__, "elixir_advection_basic.jl"), # Note: If you get a restart file from somewhere else, you need to provide # appropriate setups in the elixir loading a restart file -restart_filename = joinpath("out", "restart_000010.h5") +restart_filename = joinpath("out", "restart_000000010.h5") mesh = load_mesh(restart_filename) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergence_test, diff --git a/examples/structured_2d_dgsem/elixir_advection_restart.jl b/examples/structured_2d_dgsem/elixir_advection_restart.jl index 0accbdba702..896eda4f845 100644 --- a/examples/structured_2d_dgsem/elixir_advection_restart.jl +++ b/examples/structured_2d_dgsem/elixir_advection_restart.jl @@ -6,7 +6,7 @@ using Trixi # create a restart file elixir_file = "elixir_advection_extended.jl" -restart_file = "restart_000021.h5" +restart_file = "restart_000000021.h5" trixi_include(@__MODULE__, joinpath(@__DIR__, elixir_file)) diff --git a/examples/structured_3d_dgsem/elixir_advection_restart.jl b/examples/structured_3d_dgsem/elixir_advection_restart.jl index e516d794df8..e70a83cee6a 100644 --- a/examples/structured_3d_dgsem/elixir_advection_restart.jl +++ b/examples/structured_3d_dgsem/elixir_advection_restart.jl @@ -14,7 +14,7 @@ trixi_include(@__MODULE__, joinpath(@__DIR__, "elixir_advection_basic.jl"), # Note: If you get a restart file from somewhere else, you need to provide # appropriate setups in the elixir loading a restart file -restart_filename = joinpath("out", "restart_000010.h5") +restart_filename = joinpath("out", "restart_000000010.h5") mesh = load_mesh(restart_filename) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition_convergence_test, diff --git a/examples/tree_2d_dgsem/elixir_advection_restart.jl b/examples/tree_2d_dgsem/elixir_advection_restart.jl index 6052632ecad..c1a0cb8a8cc 100644 --- a/examples/tree_2d_dgsem/elixir_advection_restart.jl +++ b/examples/tree_2d_dgsem/elixir_advection_restart.jl @@ -15,7 +15,7 @@ trixi_include(@__MODULE__, joinpath(@__DIR__, "elixir_advection_extended.jl"), a # Note: If you get a restart file from somewhere else, you need to provide # appropriate setups in the elixir loading a restart file -restart_filename = joinpath("out", "restart_000040.h5") +restart_filename = joinpath("out", "restart_000000040.h5") mesh = load_mesh(restart_filename) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver) diff --git a/examples/tree_2d_dgsem/elixir_advection_restart_amr.jl b/examples/tree_2d_dgsem/elixir_advection_restart_amr.jl index f366640ef51..96b62f4f4c8 100644 --- a/examples/tree_2d_dgsem/elixir_advection_restart_amr.jl +++ b/examples/tree_2d_dgsem/elixir_advection_restart_amr.jl @@ -15,7 +15,7 @@ trixi_include(@__MODULE__, joinpath(@__DIR__, "elixir_advection_extended.jl"), a # Note: If you get a restart file from somewhere else, you need to provide # appropriate setups in the elixir loading a restart file -restart_filename = joinpath("out", "restart_000040.h5") +restart_filename = joinpath("out", "restart_000000040.h5") mesh = load_mesh(restart_filename) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver) diff --git a/examples/tree_3d_dgsem/elixir_advection_restart.jl b/examples/tree_3d_dgsem/elixir_advection_restart.jl index a53f4ebf5b1..0a3e97ece06 100644 --- a/examples/tree_3d_dgsem/elixir_advection_restart.jl +++ b/examples/tree_3d_dgsem/elixir_advection_restart.jl @@ -13,7 +13,7 @@ trixi_include(@__MODULE__, joinpath(@__DIR__, "elixir_advection_extended.jl")) # Note: If you get a restart file from somewhere else, you need to provide # appropriate setups in the elixir loading a restart file -restart_filename = joinpath("out", "restart_000019.h5") +restart_filename = joinpath("out", "restart_000000019.h5") mesh = load_mesh(restart_filename) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver) diff --git a/examples/unstructured_2d_dgsem/elixir_euler_restart.jl b/examples/unstructured_2d_dgsem/elixir_euler_restart.jl index c1908691902..4676718f72f 100644 --- a/examples/unstructured_2d_dgsem/elixir_euler_restart.jl +++ b/examples/unstructured_2d_dgsem/elixir_euler_restart.jl @@ -13,7 +13,7 @@ trixi_include(@__MODULE__, joinpath(@__DIR__, "elixir_euler_basic.jl")) # Note: If you get a restart file from somewhere else, you need to provide # appropriate setups in the elixir loading a restart file -restart_filename = joinpath("out", "restart_000050.h5") +restart_filename = joinpath("out", "restart_000000050.h5") mesh = load_mesh(restart_filename) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver, diff --git a/test/test_structured_2d.jl b/test/test_structured_2d.jl index 4b3aa5c87e4..c22a8e038a7 100644 --- a/test/test_structured_2d.jl +++ b/test/test_structured_2d.jl @@ -256,7 +256,7 @@ end linf=[0.0015194252169410394], rtol=5.0e-5, # Higher tolerance to make tests pass in CI (in particular with macOS) elixir_file="elixir_advection_waving_flag.jl", - restart_file="restart_000021.h5", + restart_file="restart_000000021.h5", # With the default `maxiters = 1` in coverage tests, # there would be no time steps after the restart. coverage_override=(maxiters = 100_000,)) @@ -275,7 +275,7 @@ end l2=[7.841217436552029e-15], linf=[1.0857981180834031e-13], elixir_file="elixir_advection_free_stream.jl", - restart_file="restart_000036.h5", + restart_file="restart_000000036.h5", # With the default `maxiters = 1` in coverage tests, # there would be no time steps after the restart. coverage_override=(maxiters = 100_000,)) diff --git a/test/test_threaded.jl b/test/test_threaded.jl index 7365dcef21c..7fb64d61cb4 100644 --- a/test/test_threaded.jl +++ b/test/test_threaded.jl @@ -209,7 +209,7 @@ end linf=[0.0015194252169410394], rtol=5.0e-5, # Higher tolerance to make tests pass in CI (in particular with macOS) elixir_file="elixir_advection_waving_flag.jl", - restart_file="restart_000021.h5", + restart_file="restart_000000021.h5", # With the default `maxiters = 1` in coverage tests, # there would be no time steps after the restart. coverage_override=(maxiters = 100_000,)) diff --git a/test/test_visualization.jl b/test/test_visualization.jl index 6444dc91d5d..5c7e5dbbd1f 100644 --- a/test/test_visualization.jl +++ b/test/test_visualization.jl @@ -335,9 +335,9 @@ end tspan = (0.0, 3.0)) @testset "elixir_advection_amr_visualization.jl with save_plot" begin - @test isfile(joinpath(outdir, "solution_000000.png")) - @test isfile(joinpath(outdir, "solution_000020.png")) - @test isfile(joinpath(outdir, "solution_000022.png")) + @test isfile(joinpath(outdir, "solution_000000000.png")) + @test isfile(joinpath(outdir, "solution_000000020.png")) + @test isfile(joinpath(outdir, "solution_000000022.png")) end @testset "show" begin diff --git a/utils/plot.gp b/utils/plot.gp index f58cfcdf608..497b08cd8d8 100644 --- a/utils/plot.gp +++ b/utils/plot.gp @@ -2,7 +2,7 @@ set term pdfcairo color enhanced font ",8" fontscale 1.0 lw 0.5 size 14cm,10cm # Set defaults -if (!exists("infile")) infile="solution_000000.txt" +if (!exists("infile")) infile="solution_000000000.txt" if (!exists("eqn")) eqn="linear_scalar_advection" ext = ".pdf"