zkit.io.wavefunction

Read td/wfs_<inp>.h5 files produced by PETSc HDF5 viewer.

zkit.io.wavefunction.read_wfs(path)

Read wavefunction snapshot file written by PETSc HDF5 viewer.

PETSc writes either a group wavefunction containing numbered datasets 0, 1, … or a single dataset with an extended first dimension. This reader handles both. The spatial dimension is inferred from the file (number of knots_* datasets), so the input file is not required.

Parameters:

path (str | Path)

Return type:

WavefunctionSeries