(self)
| 49 | ) |
| 50 | |
| 51 | def init2(self): |
| 52 | n = 3.4 |
| 53 | w = 1 |
| 54 | r = 1 |
| 55 | pad = 4 |
| 56 | dpml = 2 |
| 57 | sxy = 2 * (r + w + pad + dpml) |
| 58 | cell = mp.Vector3(sxy, sxy) |
| 59 | |
| 60 | geometry = [ |
| 61 | mp.Cylinder(radius=r + w, height=mp.inf, material=mp.Medium(index=n)), |
| 62 | mp.Cylinder(radius=r, height=mp.inf, material=mp.air), |
| 63 | ] |
| 64 | |
| 65 | pml_layers = [mp.PML(dpml)] |
| 66 | resolution = 5 |
| 67 | fcen = 0.118 |
| 68 | df = 0.010 |
| 69 | |
| 70 | sources = [ |
| 71 | mp.Source( |
| 72 | src=mp.GaussianSource(fcen, fwidth=df), |
| 73 | component=mp.Ez, |
| 74 | center=mp.Vector3(r + 0.1), |
| 75 | ) |
| 76 | ] |
| 77 | |
| 78 | symmetries = [mp.Mirror(mp.Y)] |
| 79 | |
| 80 | return mp.Simulation( |
| 81 | cell_size=cell, |
| 82 | resolution=resolution, |
| 83 | geometry=geometry, |
| 84 | boundary_layers=pml_layers, |
| 85 | sources=sources, |
| 86 | symmetries=symmetries, |
| 87 | ) |
| 88 | |
| 89 | def test_integrate_field_function(self): |
| 90 | sim = self.init() |
no outgoing calls
no test coverage detected