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

Method _check

python/tests/test_simulation.py:779–796  ·  view source on GitHub ↗
(med, expected, default=mp.Medium())

Source from the content-addressed store, hash-verified

777
778 def test_has_mu(self):
779 def _check(med, expected, default=mp.Medium()):
780 geometry = [
781 mp.Block(center=mp.Vector3(), size=mp.Vector3(1, 1), material=med)
782 ]
783 sim = mp.Simulation(
784 cell_size=mp.Vector3(5, 5),
785 resolution=10,
786 geometry=geometry,
787 default_material=default,
788 )
789
790 result = sim.has_mu()
791 if expected:
792 self.assertTrue(result)
793 else:
794 self.assertFalse(result)
795
796 print(f"Estimated memory usage: {sim.get_estimated_memory_usage()}")
797
798 def mat_func(p):
799 return mp.Medium()

Callers

nothing calls this directly

Calls 2

has_muMethod · 0.95

Tested by

no test coverage detected