dragonfly_sim.utils.checkpoint ============================== .. py:module:: dragonfly_sim.utils.checkpoint .. autoapi-nested-parse:: Partition-independent checkpoints for time-dependent runs. A checkpoint is one .npz written on rank 0. Every DG field is stored per cell, keyed by the cell's index in the INPUT mesh (topology.original_cell_index) and the cell-local dof order, so a run may be restarted on any number of ranks. The dof coordinates are stored as well and checked on load. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: dragonfly_sim.utils.checkpoint._owned_cell_dofs dragonfly_sim.utils.checkpoint.load_checkpoint dragonfly_sim.utils.checkpoint.save_checkpoint Module Contents --------------- .. py:function:: _owned_cell_dofs(V) (owned cells' input-mesh indices, their dof blocks, the dof coordinates). .. !! processed by numpydoc !! .. py:function:: load_checkpoint(path, functions, coord_tol=1e-10, optional=False) Fill `functions` from a save_checkpoint file, on any rank count, and return its meta dict. With optional=True a field missing from the file is left untouched instead of raising (e.g. far-field history when restarting a riemann2 run from a plain riemann checkpoint). .. !! processed by numpydoc !! .. py:function:: save_checkpoint(path, functions, meta) Write `functions` (DG Functions on one mesh, distinct names) and the JSON serializable dict `meta` to `path`. The dof coordinates are stored as "coords" for the first function's space and "__coords" for any function on another space. Collective. .. !! processed by numpydoc !!