Skip to content

Commit 803b318

Browse files
authored
Merge pull request #81 from keiyamamo/save_mesh
Save mesh
2 parents a209f92 + be09bdd commit 803b318

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

turtleFSI/monolithic.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@
6262
# Get mesh information
6363
mesh, domains, boundaries = get_mesh_domain_and_boundaries(**vars())
6464

65+
# Save mesh, domains, and boundaries for post-processing
66+
if restart_folder is None:
67+
mesh_path = results_folder.joinpath("Mesh", "mesh.h5")
68+
with HDF5File(mesh.mpi_comm(), mesh_path.__str__(), "w") as hdf:
69+
hdf.write(mesh, "/mesh")
70+
hdf.write(boundaries, "/boundaries")
71+
hdf.write(domains, "/domains")
72+
6573
# Control FEniCS output
6674
set_log_level(loglevel)
6775

0 commit comments

Comments
 (0)