(self, **kwargs)
| 195 | np.testing.assert_allclose(expected, res) |
| 196 | |
| 197 | def init_simple_simulation(self, **kwargs): |
| 198 | resolution = 20 |
| 199 | |
| 200 | cell = mp.Vector3(10, 10) |
| 201 | |
| 202 | pml_layers = mp.PML(1.0) |
| 203 | |
| 204 | fcen = 1.0 |
| 205 | df = 1.0 |
| 206 | |
| 207 | sources = mp.Source( |
| 208 | src=mp.GaussianSource(fcen, fwidth=df), center=mp.Vector3(), component=mp.Ez |
| 209 | ) |
| 210 | |
| 211 | symmetries = [mp.Mirror(mp.X), mp.Mirror(mp.Y)] |
| 212 | |
| 213 | return mp.Simulation( |
| 214 | resolution=resolution, |
| 215 | cell_size=cell, |
| 216 | boundary_layers=[pml_layers], |
| 217 | sources=[sources], |
| 218 | symmetries=symmetries, |
| 219 | **kwargs, |
| 220 | ) |
| 221 | |
| 222 | @unittest.skipIf(not mp.with_mpi(), "MPI specific test") |
| 223 | def test_mpi(self): |
no outgoing calls
no test coverage detected