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

Method setUp

python/tests/test_source.py:85–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83
84class TestSourceTypemaps(unittest.TestCase):
85 def setUp(self):
86 def dummy_eps(v):
87 return 1.0
88
89 gv = mp.voltwo(16, 16, 10)
90 gv.center_origin()
91 sym = mp.mirror(mp.Y, gv)
92 the_structure = mp.structure(gv, dummy_eps, mp.pml(2), sym)
93 objects = []
94 objects.append(Cylinder(1))
95 mp.set_materials_from_geometry(the_structure, objects)
96 self.f = mp.fields(the_structure)
97 self.v = mp.volume(mp.vec(1.1, 0.0), mp.vec(0.0, 0.0))
98
99 def test_typemap_swig(self):
100 src = mp.gaussian_src_time(0.15, 0.1)

Callers

nothing calls this directly

Calls 6

CylinderClass · 0.90
center_originMethod · 0.80
structureMethod · 0.80
fieldsMethod · 0.80
vecMethod · 0.80
volumeMethod · 0.45

Tested by

no test coverage detected