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

Method load_near2far

python/simulation.py:3322–3333  ·  view source on GitHub ↗

Load the Fourier-transformed fields into the given `near2far` 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

(self, fname, near2far)

Source from the content-addressed store, hash-verified

3320 self.fields.finished_working()
3321
3322 def load_near2far(self, fname, near2far):
3323 """
3324 Load the Fourier-transformed fields into the given `near2far` object (replacing
3325 any values currently there) from an HDF5 file of the given `filename` without the
3326 `.h5` suffix (the current filename-prefix is prepended automatically). You must
3327 load from a file that was saved by `save_near2far` in a simulation of *the same
3328 dimensions* for both the cell and the near2far regions with the same number of
3329 processors and chunk layout.
3330 """
3331 if self.fields is None:
3332 self.init_sim()
3333 near2far.load_hdf5(self.fields, fname, "", self.get_filename_prefix())
3334
3335 def save_near2far(self, fname, near2far):
3336 """

Callers 1

load_minus_near2farMethod · 0.95

Calls 3

init_simMethod · 0.95
get_filename_prefixMethod · 0.95
load_hdf5Method · 0.45

Tested by

no test coverage detected