How can I save a MeshFunction in parallel?

6 views
Skip to first unread message

Chris Richardson

unread,
Jun 5, 2013, 10:16:47 AM6/5/13
to myd...@googlegroups.com
If I have some code which produces MeshFunctions whilst running in parallel, can I save that all to one file?





Chris Richardson

unread,
Jun 5, 2013, 10:19:03 AM6/5/13
to myd...@googlegroups.com


On Wednesday, June 5, 2013 3:16:47 PM UTC+1, Chris Richardson wrote:
If I have some code which produces MeshFunctions whilst running in parallel, can I save that all to one file?


You can use XDMF or HDF5 to achieve this:

e.g.

MF = MeshFunction("size_t", Mesh, 1)
XFile = XDMFFile("test.xdmf")
XFile << MF

HFile =HDF5File("h5test.h5","w")
HFile.write(MF, "meshfunction/example")

 
Reply all
Reply to author
Forward
0 new messages