MCPcopy Create free account
hub / github.com/NanoComp/meep / load_flux

Method load_flux

python/simulation.py:3588–3600  ·  view source on GitHub ↗

Load the Fourier-transformed fields into the given flux 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 saved

(self, fname, flux)

Source from the content-addressed store, hash-verified

3586 )
3587
3588 def load_flux(self, fname, flux):
3589 """
3590 Load the Fourier-transformed fields into the given flux object (replacing any
3591 values currently there) from an HDF5 file of the given `filename` without the
3592 `.h5` suffix (the current filename-prefix is prepended automatically). You must
3593 load from a file that was saved by `save_flux` in a simulation of the same
3594 dimensions (for both the cell and the flux regions) with the same number of
3595 processors and chunk layout.
3596 """
3597 if self.fields is None:
3598 self.init_sim()
3599
3600 flux.load_hdf5(self.fields, fname, "", self.get_filename_prefix())
3601
3602 load_mode = load_flux
3603

Callers 1

load_minus_fluxMethod · 0.95

Calls 3

init_simMethod · 0.95
get_filename_prefixMethod · 0.95
load_hdf5Method · 0.45

Tested by

no test coverage detected