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

Function get_source

python/tests/test_adjoint_cyl.py:48–70  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

46
47
48def get_source(m):
49 source_center = mp.Vector3(
50 design_r / 2,
51 0,
52 -(sz / 2 - dpml + design_z / 2) / 2,
53 )
54 # exclude r=0 whenever |m| > 1
55 source_size = mp.Vector3(
56 design_r if abs(m) <= 1 else 0.5 * design_r,
57 0,
58 0,
59 )
60 src = mp.GaussianSource(frequency=fcen, fwidth=fwidth)
61 source = [
62 mp.Source(
63 src,
64 component=mp.Er,
65 center=source_center,
66 size=source_size,
67 )
68 ]
69
70 return source
71
72
73def forward_simulation(design_params, m, far_x):

Callers 2

forward_simulationFunction · 0.85
adjoint_solverFunction · 0.85

Calls 1

absFunction · 0.85

Tested by

no test coverage detected