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)
| 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 | """ |