Last active
September 26, 2018 16:10
-
-
Save cmaurini/1cc7a02ecba2bf346acdc66deb9a9158 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write in XDFM format for paraview | |
with df.XDMFFile(mesh.mpi_comm(), "output/u.xdmf") as file: | |
file.write(us, 0) | |
# Write in XDFM format for checkpointing | |
with df.XDMFFile(mesh.mpi_comm(), "output/u-cp.xdmf") as file: | |
file.write_checkpoint(us, "us-cp", 0, append=False) | |
# And then to read back | |
with df.XDMFFile(mesh.mpi_comm(), "output/u-cp.xdmf") as file: | |
file.read(us, "us-cp", 0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment