Load the Fourier-transformed fields into the given energy object (replacing any values currently there) from an HDF5 file of the given `filename` without the `.h5` suffix (the current filename-prefix is prepended automatically). You must load from a file that was sav
(self, fname: str, energy: DftEnergy)
| 3193 | self._display_energy("total", get_total_energy, energys) |
| 3194 | |
| 3195 | def load_energy(self, fname: str, energy: DftEnergy): |
| 3196 | """ |
| 3197 | Load the Fourier-transformed fields into the given energy object (replacing any |
| 3198 | values currently there) from an HDF5 file of the given `filename` without the |
| 3199 | `.h5` suffix (the current filename-prefix is prepended automatically). You must |
| 3200 | load from a file that was saved by `save_energy` in a simulation of the same |
| 3201 | dimensions for both the cell and the energy regions with the same number of |
| 3202 | processors and chunk layout. |
| 3203 | """ |
| 3204 | if self.fields is None: |
| 3205 | self.init_sim() |
| 3206 | energy.load_hdf5(self.fields, fname, "", self.get_filename_prefix()) |
| 3207 | |
| 3208 | def save_energy(self, fname: str, energy: DftEnergy): |
| 3209 | """ |
no test coverage detected