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

Method save_flux

python/simulation.py:3604–3613  ·  view source on GitHub ↗

Save the Fourier-transformed fields corresponding to the given flux object in an HDF5 file of the given `filename` without the `.h5` suffix (the current filename-prefix is prepended automatically).

(self, fname, flux)

Source from the content-addressed store, hash-verified

3602 load_mode = load_flux
3603
3604 def save_flux(self, fname, flux):
3605 """
3606 Save the Fourier-transformed fields corresponding to the given flux object in an
3607 HDF5 file of the given `filename` without the `.h5` suffix (the current
3608 filename-prefix is prepended automatically).
3609 """
3610 if self.fields is None:
3611 self.init_sim()
3612
3613 flux.save_hdf5(self.fields, fname, "", self.get_filename_prefix())
3614
3615 save_mode = save_flux
3616

Callers 1

test_chunksMethod · 0.95

Calls 3

init_simMethod · 0.95
get_filename_prefixMethod · 0.95
save_hdf5Method · 0.45

Tested by 1

test_chunksMethod · 0.76