Skip to content

Commit

Permalink
use vtk_save instead of Base.close on pvd files in docs (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
KnutAM committed Sep 18, 2024
1 parent 19214c7 commit 31096cb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ function solve(interpolation_u, interpolation_p)
pvd[t] = vtk
end
end;
close(pvd);
vtk_save(pvd);
vol_def = calculate_volume_deformed_mesh(w, dh, cellvalues_u);
print("Deformed volume is $vol_def")
return vol_def;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate-tutorials/ns_vs_diffeq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ for (step, (u,t)) in enumerate(intervals(integrator))
pvd[t] = vtk
end
end
close(pvd);
vtk_save(pvd);


using Test #hide
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate-tutorials/porous_media.jl
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function solve(dh, ch, domains; Δt=0.025, t_total=1.0)
pvd[t] = vtk
end
end
close(pvd);
vtk_save(pvd);
end;

# Finally we call the functions to actually run the code
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate-tutorials/reactive_surface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ function gray_scott_on_sphere(material::GrayScottMaterial, Δt::Real, T::Real, r
uₜ₋₁ .= uₜ
end

close(pvd);
vtk_save(pvd);
end

## This parametrization gives the spot pattern shown in the gif above.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate-tutorials/transient_heat_equation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ for (step, t) in enumerate(Δt:Δt:T)
uₙ .= u
end
# In order to use the .pvd file we need to store it to the disk, which is done by:
close(pvd);
vtk_save(pvd);

#md # ## [Plain program](@id transient_heat_equation-plain-program)
#md #
Expand Down
2 changes: 1 addition & 1 deletion docs/src/topics/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ for (step, t) in enumerate(range(0, 1, 5))
pvd[t] = vtk
end
end
close(pvd);
vtk_save(pvd);
```
See [Transient heat equation](@ref tutorial-transient-heat-equation) for an example

0 comments on commit 31096cb

Please sign in to comment.