Hello,
I am using FENICSx (DOLFINx 0.6.0). I am solving an instationary problem with a changing mesh. In every time step t
, I calculate the new mesh for time step t
and the corresponding solution on this mesh for t
. I’d now like to write this to an XDMF File.
Time dependent functions can be written by first creating the XDMFFile
from dolfinx import io
file = io.XDMFFile(comm, "out.xdmf")
and then writing the function u at a certain time t
file.write_function(u, t)
But for the mesh there is no such possibility as providing a time, see corresponding docu, although it states
Write mesh to file for a given time (default 0.0)
as description. VTK apparently has this possibility, but it also states in the documentation
VTK supports arbitrary order Lagrange finite elements for the geometry description. XDMF is the preferred format for geometry order <= 2.
and I had issues with VTK and DG-0 elements, what seems like a known fact, see this thread.
How can I store a time-dependent function with corresponding time-dependent mesh in XDMF? How can I provide a time variable to the write_mesh
function? Or is the only possibility to use VTK and avoid DG-0 elements for the moment?