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

Method init_simple_simulation

python/tests/test_simulation.py:197–220  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

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):

Callers 15

test_at_timeMethod · 0.95
test_with_prefixMethod · 0.95
test_extra_materialsMethod · 0.95
test_infer_dimensionsMethod · 0.95
test_in_volumeMethod · 0.95
test_in_pointMethod · 0.95
test_numpy_epsilonMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected