You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the meepcon2022 tutorial notebook, there is a cell in which the optimisation problem is set up. The objective function J is defined. How can I access the value of the objective function J? More generally, I am interested in how to reproduce the same eigenmode computation from a simulation object directly.
From the meepcon2022 tutorial notebook, there is a cell in which the optimisation problem is set up. The objective function
J
is defined. How can I access the value of the objective functionJ
? More generally, I am interested in how to reproduce the same eigenmode computation from a simulation object directly.`TE0 = mpa.EigenmodeCoefficient(sim,
mp.Volume(center=mp.Vector3(x=-Sx/2 + pml_size + 2waveguide_length/3),
size=mp.Vector3(y=1.5)),mode)
TE_top = mpa.EigenmodeCoefficient(sim,
mp.Volume(center=mp.Vector3(Sx/2 - pml_size - 2waveguide_length/3,arm_separation/2,0),
size=mp.Vector3(y=arm_separation)),mode)
TE_bottom = mpa.EigenmodeCoefficient(sim,
mp.Volume(center=mp.Vector3(Sx/2 - pml_size - 2*waveguide_length/3,-arm_separation/2,0),
size=mp.Vector3(y=arm_separation)),mode)
ob_list = [TE0,TE_top,TE_bottom]
def J(source,top,bottom):
power = npa.abs(top/source) ** 2 + npa.abs(bottom/source) ** 2
return npa.mean(power)
opt = mpa.OptimizationProblem(
simulation = sim,
objective_functions = J,
objective_arguments = ob_list,
design_regions = [design_region],
frequencies=frequencies`
The text was updated successfully, but these errors were encountered: