(self)
| 333 | self.assertAlmostEqual(fp, -0.002989654055823199) |
| 334 | |
| 335 | def test_numpy_epsilon(self): |
| 336 | sim = self.init_simple_simulation() |
| 337 | eps_input_fname = "cyl-ellipsoid-eps-ref.h5" |
| 338 | eps_input_dir = os.path.abspath( |
| 339 | os.path.join( |
| 340 | os.path.dirname(os.path.abspath(__file__)), "..", "..", "tests" |
| 341 | ) |
| 342 | ) |
| 343 | eps_input_path = os.path.join(eps_input_dir, eps_input_fname) |
| 344 | |
| 345 | with h5py.File(eps_input_path, "r") as f: |
| 346 | sim.default_material = f["eps"][()] |
| 347 | |
| 348 | sim.run(until=200) |
| 349 | fp = sim.get_field_point(mp.Ez, mp.Vector3(x=1)) |
| 350 | |
| 351 | places = 6 if mp.is_single_precision() else 7 |
| 352 | self.assertAlmostEqual(fp, -0.002989654055823199, places=places) |
| 353 | |
| 354 | def test_set_materials(self): |
| 355 | def change_geom(sim): |
nothing calls this directly
no test coverage detected