zoomy_core.misc.io module

zoomy_core.misc.io module#

HDF5 settings, field checkpoints, and mesh I/O helpers used by solvers and drivers.

zoomy_core.misc.io.init_output_directory(path, clean)#

Create (and optionally wipe) a run directory under the Zoomy project root.

zoomy_core.misc.io.get_hdf5_type(value)#

Get hdf5 type.

zoomy_core.misc.io.write_dict_to_hdf5(group, d)#

Recursively store nested dicts / Zstruct-like objects into an HDF5 group.

zoomy_core.misc.io.load_hdf5_to_dict(group)#

Inverse of write_dict_to_hdf5() for reading settings or metadata.

zoomy_core.misc.io.save_settings(settings)#

Write settings to settings.h5 inside the configured output directory.

zoomy_core.misc.io.load_settings(filepath)#

Load a Settings object from settings.h5.

zoomy_core.misc.io.load_settings2(filepath)#

Legacy HDF5 layout: model/solver/output groups plus callbacks attribute.

zoomy_core.misc.io.clean_files(filepath, filename='.vtk')#

Clean files.

zoomy_core.misc.io.get_save_fields_simple(_filepath, write_all, overwrite=True)#

Return a plain callback that appends one snapshot to HDF5 (no time gating).

zoomy_core.misc.io.get_save_fields(_filepath, write_all=False, overwrite=True)#

Factory for a time-gated field writer compatible with solver time-stepping loops.

zoomy_core.misc.io.save_fields_test(a)#

Test helper: tuple interface around _save_fields_to_hdf5().

zoomy_core.misc.io.load_mesh_from_hdf5(filepath)#

Load a LSQMesh from disk via Mesh.from_hdf5.

zoomy_core.misc.io.load_fields_from_hdf5(filepath, i_snapshot=- 1)#

Read Q, Qaux, and time for one snapshot (default: latest).

zoomy_core.misc.io.load_timeline_of_fields_from_hdf5(filepath)#

Load all field snapshots plus mesh geometry from a combined HDF5 file.

zoomy_core.misc.io.generate_vtk(filepath, field_names=None, aux_field_names=None, skip_aux=False, filename='out', warp=False)#

Export VTK time series (and a .vtk.series manifest) from HDF5 mesh+fields.

Parameters:

filepath (str) –