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

Method load_minus_energy

python/simulation.py:3218–3225  ·  view source on GitHub ↗

As `load_energy`, but negates the Fourier-transformed fields after they are loaded. This means that they will be *subtracted* from any future field Fourier transforms that are accumulated.

(self, fname: str, energy: DftEnergy)

Source from the content-addressed store, hash-verified

3216 energy.save_hdf5(self.fields, fname, "", self.get_filename_prefix())
3217
3218 def load_minus_energy(self, fname: str, energy: DftEnergy):
3219 """
3220 As `load_energy`, but negates the Fourier-transformed fields after they are
3221 loaded. This means that they will be *subtracted* from any future field Fourier
3222 transforms that are accumulated.
3223 """
3224 self.load_energy(fname, energy)
3225 energy.scale_dfts(-1.0)
3226
3227 def get_farfield(self, near2far, x, greencyl_tol: float = 1e-3):
3228 """

Callers

nothing calls this directly

Calls 2

load_energyMethod · 0.95
scale_dftsMethod · 0.45

Tested by

no test coverage detected