Function write and read

Hello everyone,

I have a simple question: can a dolfinx function, after being exported in a (for example) xdmf file with write_function(), be read in another code?
I don’t need that specific format, but I need the possibility to export a function and import it later.

I think that I could handle this with PETSc vectors, but I wonder if there is a more straightforward way with dolfinx.

Thank you very much

For now I would suggest using PETSc: I/O from XDMF/HDF5 files in dolfin-x - #23 by hawkspar

Checkpointing is on the DOLFINx roadmap for 2023, and anyone who would like to make a contribution is very welcome to do so.

1 Like