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

Method change_sources

python/simulation.py:4479–4488  ·  view source on GitHub ↗

Change the list of sources in `Simulation.sources` to `new_sources`, and changes the sources used for the current simulation. `new_sources` must be a list of `Source` objects.

(self, new_sources)

Source from the content-addressed store, hash-verified

4477 self.fields.change_m(m)
4478
4479 def change_sources(self, new_sources):
4480 """
4481 Change the list of sources in `Simulation.sources` to `new_sources`, and changes
4482 the sources used for the current simulation. `new_sources` must be a list of
4483 `Source` objects.
4484 """
4485 self.sources = new_sources
4486 if self.fields:
4487 self.fields.remove_sources()
4488 self.add_sources()
4489
4490 def reset_meep(self):
4491 """

Callers 9

adjoint_solverMethod · 0.95
parallel_waveguideFunction · 0.95
move_sourceFunction · 0.80
prepare_forward_runMethod · 0.80
adjoint_runMethod · 0.80
calculate_fd_gradientMethod · 0.80
_run_fwd_simulationMethod · 0.80

Calls 2

add_sourcesMethod · 0.95
remove_sourcesMethod · 0.80

Tested by 2

adjoint_solverMethod · 0.76