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

Function _output

python/solver.py:1285–1293  ·  view source on GitHub ↗
(ms, which_band)

Source from the content-addressed store, hash-verified

1283 """
1284
1285 def _output(ms, which_band):
1286 ms.get_dfield(which_band, False)
1287 ms.compute_field_energy()
1288 energy = ms.compute_energy_in_objects(objects)
1289 if verbosity.mpb > 0:
1290 fmt = "dpwr:, {}, {}, {} "
1291 print(fmt.format(which_band, ms.freqs[which_band - 1], energy))
1292 if energy >= min_energy:
1293 apply_band_func(ms, output_func, which_band)
1294
1295 return _output
1296

Callers

nothing calls this directly

Calls 4

apply_band_funcFunction · 0.85
get_dfieldMethod · 0.45
compute_field_energyMethod · 0.45

Tested by

no test coverage detected