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

Method change_m

python/simulation.py:4464–4477  ·  view source on GitHub ↗

Changes the simulation's `m` number (the angular ϕ dependence).

(self, m: float)

Source from the content-addressed store, hash-verified

4462 )
4463
4464 def change_m(self, m: float) -> None:
4465 """Changes the simulation's `m` number (the angular ϕ dependence)."""
4466 self.m = m
4467
4468 if self.fields:
4469 needs_complex_fields = not (not self.m or self.m == 0)
4470
4471 if needs_complex_fields and self.fields.is_real:
4472 self.fields = None
4473 self._is_initialized = False
4474 self.init_sim()
4475 else:
4476 if self.m is not None:
4477 self.fields.change_m(m)
4478
4479 def change_sources(self, new_sources):
4480 """

Callers 1

adjoint_runMethod · 0.45

Calls 1

init_simMethod · 0.95

Tested by

no test coverage detected