Closed jhill1 closed 1 year ago
Yeah, not entirely sure what the right fix is: we could change https://github.com/thetisproject/thetis/blob/3437bbd2853f69568a8a996f9235fa4795b1bb2b/thetis/exporter.py#L223 to:
function = f.load_function(function.function_space().mesh(), function.name())
i.e. not read the mesh at all from the checkpoint and directly load into function. But this only works if the user provided mesh is read from a checkpoint (as in your example) and I'm also not entirely sure this is safe if that checkpoint wasn't created in the same run.
Or we could do a nasty copy instead of the assign
function.dat.data[:] = g.dat.data[:]
but again I don't really know how bad that is....
I've opened https://github.com/firedrakeproject/firedrake/discussions/3053 regarding this
If I run a script for a short time; with hdf5 output. Then continue from one of the checkpoints, I receive:
The mesh coming from the checkpoint is not identical according to UFL:
From assign.py in firedrake:
Version is as of 1st Feb: jh1889@envpc319 ~/firedrake/src/firedrake $ git log commit c0b45ce2123fdeadf358df1d5655ce42f3b3d74b (HEAD -> master, origin/master, origin/HEAD) Author: Uygar 83709209+uygarkov@users.noreply.github.com Date: Wed Feb 1 17:16:40 2023 +0100
The code to reproduce can be found here.