dolfinx
dolfinx copied to clipboard
Write XML on XDMFFile.close, add flush
This PR avoids touching filesystem with pugi XML file on every write_foo call (beneficial in timeloops). It does so only on explicit .close() or .flush().
Barriers are needed only is some places in tests that unrealistically read right after writing. Processes must wait for rank0 to flush the XML file to disk. Barriers could be removed after #1032 is solved.
Closing since we plan to deprecate XDMF anyway.