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

Method test_synchronized_magnetic

python/tests/test_simulation.py:474–506  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

472 np.testing.assert_allclose(efield, efield_arr)
473
474 def test_synchronized_magnetic(self):
475 # Issue 309
476 cell = mp.Vector3(16, 8, 0)
477
478 geometry = [
479 mp.Block(
480 mp.Vector3(1e20, 1, 1e20),
481 center=mp.Vector3(0, 0),
482 material=mp.Medium(epsilon=12),
483 )
484 ]
485
486 sources = [
487 mp.Source(
488 mp.ContinuousSource(frequency=0.15),
489 component=mp.Ez,
490 center=mp.Vector3(-7, 0),
491 )
492 ]
493
494 pml_layers = [mp.PML(1.0)]
495 resolution = 10
496
497 sim = mp.Simulation(
498 cell_size=cell,
499 boundary_layers=pml_layers,
500 geometry=geometry,
501 sources=sources,
502 resolution=resolution,
503 )
504
505 sim.use_output_directory(self.temp_dir)
506 sim.run(mp.synchronized_magnetic(mp.output_bfield_y), until=10)
507
508 def test_harminv_warnings(self):
509 def check_warnings(sim, h, should_warn=True):

Callers

nothing calls this directly

Calls 2

use_output_directoryMethod · 0.95
runMethod · 0.95

Tested by

no test coverage detected