From 920aeef4605a3c348baec8c3b2455878f8787999 Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Mon, 29 Apr 2024 15:09:51 +0200 Subject: [PATCH 1/2] Load `current_filename` for unstructured and p4est --- src/meshes/mesh_io.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meshes/mesh_io.jl b/src/meshes/mesh_io.jl index 28e6efa8c57..eba505f9034 100644 --- a/src/meshes/mesh_io.jl +++ b/src/meshes/mesh_io.jl @@ -299,6 +299,7 @@ function load_mesh_serial(mesh_file::AbstractString; n_cells_max, RealT) mesh = UnstructuredMesh2D(mesh_filename; RealT = RealT, periodicity = periodicity_, unsaved_changes = false) + mesh.current_filename = mesh_file elseif mesh_type == "P4estMesh" p4est_filename, tree_node_coordinates, nodes, boundary_names_ = h5open(mesh_file, "r") do file @@ -317,7 +318,7 @@ function load_mesh_serial(mesh_file::AbstractString; n_cells_max, RealT) p4est = load_p4est(p4est_file, Val(ndims)) mesh = P4estMesh{ndims}(p4est, tree_node_coordinates, - nodes, boundary_names, "", false, true) + nodes, boundary_names, mesh_file, false, true) else error("Unknown mesh type!") end @@ -405,7 +406,7 @@ function load_mesh_parallel(mesh_file::AbstractString; n_cells_max, RealT) p4est = load_p4est(p4est_file, Val(ndims_)) mesh = P4estMesh{ndims_}(p4est, tree_node_coordinates, - nodes, boundary_names, "", false, true) + nodes, boundary_names, mesh_file, false, true) else error("Unknown mesh type!") end From cce53cbcf4bf0aab944e54448fa9d1c578c7e0dd Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Mon, 29 Apr 2024 15:18:34 +0200 Subject: [PATCH 2/2] fmt --- src/meshes/mesh_io.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshes/mesh_io.jl b/src/meshes/mesh_io.jl index eba505f9034..c1d78cbbf1e 100644 --- a/src/meshes/mesh_io.jl +++ b/src/meshes/mesh_io.jl @@ -299,7 +299,7 @@ function load_mesh_serial(mesh_file::AbstractString; n_cells_max, RealT) mesh = UnstructuredMesh2D(mesh_filename; RealT = RealT, periodicity = periodicity_, unsaved_changes = false) - mesh.current_filename = mesh_file + mesh.current_filename = mesh_file elseif mesh_type == "P4estMesh" p4est_filename, tree_node_coordinates, nodes, boundary_names_ = h5open(mesh_file, "r") do file