In [1]:
import meep as mp
import numpy
import matplotlib.pyplot as plt

res = 50        # pixels/μm
three_d = False # 3d calculation?
d = 0.12        # branch separation

gdsII_file = 'coupler.gds'
CELL_LAYER = 0
PORT1_LAYER = 1
PORT2_LAYER = 2
PORT3_LAYER = 3
PORT4_LAYER = 4
SOURCE_LAYER = 5
UPPER_BRANCH_LAYER = 31
LOWER_BRANCH_LAYER = 32
default_d = 0.3

t_oxide = 1.0
t_Si = 0.22
t_air = 0.78

dpml = 1
cell_thickness = dpml+t_oxide+t_Si+t_air+dpml
si_zmin = 0

oxide = mp.Medium(epsilon=2.25)
silicon=mp.Medium(epsilon=12)

lcen = 1.55
fcen = 1/lcen
df = 0.2*fcen

cell_zmax = 0.5*cell_thickness if three_d else 0
cell_zmin = -0.5*cell_thickness if three_d else 0
si_zmax = t_Si if three_d else 0

# read cell size, volumes for source region and flux monitors,
# and coupler geometry from GDSII file
upper_branch = mp.get_GDSII_prisms(silicon, gdsII_file, UPPER_BRANCH_LAYER, si_zmin, si_zmax)
lower_branch = mp.get_GDSII_prisms(silicon, gdsII_file, LOWER_BRANCH_LAYER, si_zmin, si_zmax)

cell = mp.GDSII_vol(gdsII_file, CELL_LAYER, cell_zmin, cell_zmax)
p1 = mp.GDSII_vol(gdsII_file, PORT1_LAYER, si_zmin, si_zmax)
p2 = mp.GDSII_vol(gdsII_file, PORT2_LAYER, si_zmin, si_zmax)
p3 = mp.GDSII_vol(gdsII_file, PORT3_LAYER, si_zmin, si_zmax)
p4 = mp.GDSII_vol(gdsII_file, PORT4_LAYER, si_zmin, si_zmax)
src_vol = mp.GDSII_vol(gdsII_file, SOURCE_LAYER, si_zmin, si_zmax)

# displace upper and lower branches of coupler (as well as source and flux regions)
if d != default_d:
    delta_y = 0.5*(d-default_d)
    delta = mp.Vector3(y=delta_y)
    p1.center += delta
    p2.center -= delta
    p3.center += delta
    p4.center -= delta
    src_vol.center += delta
    cell.size += 2*delta
    for np in range(len(lower_branch)):
        lower_branch[np].center -= delta
        for nv in range(len(lower_branch[np].vertices)):
            lower_branch[np].vertices[nv] -= delta
    for np in range(len(upper_branch)):
        upper_branch[np].center += delta
        for nv in range(len(upper_branch[np].vertices)):
            upper_branch[np].vertices[nv] += delta

geometry = upper_branch+lower_branch

if three_d:
    oxide_center = mp.Vector3(z=-0.5*t_oxide)
    oxide_size = mp.Vector3(cell.size.x,cell.size.y,t_oxide)
    oxide_layer = [mp.Block(material=oxide, center=oxide_center, size=oxide_size)]
    geometry = geometry+oxide_layer

sources = [mp.EigenModeSource(src=mp.GaussianSource(fcen,fwidth=df),
                              size=src_vol.size,
                              center=src_vol.center,
                              eig_band=1,
                              eig_parity=mp.NO_PARITY if three_d else mp.EVEN_Y+mp.ODD_Z,
                              eig_match_freq=True)]

sim = mp.Simulation(resolution=res,
                    cell_size=cell.size,
                    boundary_layers=[mp.PML(dpml)],
                    sources=sources,
                    geometry=geometry)

mode1 = sim.add_mode_monitor(fcen, 0, 1, mp.ModeRegion(volume=p1))
mode2 = sim.add_mode_monitor(fcen, 0, 1, mp.ModeRegion(volume=p2))
mode3 = sim.add_mode_monitor(fcen, 0, 1, mp.ModeRegion(volume=p3))
mode4 = sim.add_mode_monitor(fcen, 0, 1, mp.ModeRegion(volume=p4))

sim.run(until_after_sources=100)
-----------
Initializing structure...
Working in 2D dimensions.
Computational cell is 34.4 x 7.82 x 0 with resolution 50
     prism, center = (-9.09425,1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (-4,0.06,0)
          (-4.108,0.061,0)
          (-4.215,0.062,0)
          (-4.322,0.065,0)
          (-4.429,0.07,0)
          (-4.535,0.075,0)
          (-4.641,0.081,0)
          (-4.747,0.089,0)
          (-4.852,0.097,0)
          (-5.062,0.117,0)
          (-5.167,0.129,0)
          (-5.271,0.141,0)
          (-5.479,0.169,0)
          (-5.582,0.184,0)
          (-5.685,0.2,0)
          (-5.788,0.217,0)
          (-5.891,0.235,0)
          (-5.993,0.253,0)
          (-6.095,0.272,0)
          (-6.197,0.292,0)
          (-6.299,0.313,0)
          (-6.4,0.334,0)
          (-6.501,0.356,0)
          (-6.703,0.402,0)
          (-6.803,0.425,0)
          (-6.904,0.45,0)
          (-7.204,0.525,0)
          (-7.303,0.552,0)
          (-7.403,0.578,0)
          (-7.502,0.605,0)
          (-7.601,0.633,0)
          (-7.7,0.66,0)
          (-7.799,0.688,0)
          (-7.898,0.717,0)
          (-7.996,0.745,0)
          (-8.095,0.774,0)
          (-8.193,0.803,0)
          (-8.291,0.833,0)
          (-8.389,0.862,0)
          (-8.487,0.892,0)
          (-8.585,0.921,0)
          (-8.781,0.981,0)
          (-8.878,1.011,0)
          (-9.074,1.071,0)
          (-9.268,1.131,0)
          (-9.366,1.161,0)
          (-9.463,1.191,0)
          (-9.56,1.22,0)
          (-9.658,1.25,0)
          (-9.949,1.337,0)
          (-10.047,1.366,0)
          (-10.144,1.395,0)
          (-10.338,1.451,0)
          (-10.436,1.478,0)
          (-10.533,1.506,0)
          (-10.63,1.533,0)
          (-10.728,1.559,0)
          (-10.922,1.611,0)
          (-11.02,1.636,0)
          (-11.117,1.66,0)
          (-11.215,1.685,0)
          (-11.313,1.708,0)
          (-11.41,1.731,0)
          (-11.508,1.754,0)
          (-11.606,1.776,0)
          (-11.704,1.797,0)
          (-11.802,1.817,0)
          (-11.901,1.837,0)
          (-11.999,1.856,0)
          (-12.098,1.875,0)
          (-12.196,1.893,0)
          (-12.295,1.91,0)
          (-12.394,1.926,0)
          (-12.592,1.956,0)
          (-12.691,1.97,0)
          (-12.791,1.982,0)
          (-12.89,1.994,0)
          (-12.99,2.005,0)
          (-13.19,2.025,0)
          (-13.291,2.033,0)
          (-13.392,2.04,0)
          (-13.492,2.046,0)
          (-13.593,2.051,0)
          (-13.695,2.055,0)
          (-13.796,2.058,0)
          (-14,2.06,0)
          (-17.2,2.06,0)
          (-17.2,2.56,0)
          (-14,2.56,0)
          (-13.892,2.559,0)
          (-13.785,2.558,0)
          (-13.678,2.555,0)
          (-13.571,2.55,0)
          (-13.465,2.545,0)
          (-13.359,2.539,0)
          (-13.253,2.531,0)
          (-13.148,2.523,0)
          (-12.938,2.503,0)
          (-12.833,2.491,0)
          (-12.729,2.479,0)
          (-12.521,2.451,0)
          (-12.418,2.436,0)
          (-12.315,2.42,0)
          (-12.212,2.403,0)
          (-12.109,2.385,0)
          (-12.007,2.367,0)
          (-11.905,2.348,0)
          (-11.803,2.328,0)
          (-11.701,2.307,0)
          (-11.6,2.286,0)
          (-11.499,2.264,0)
          (-11.297,2.218,0)
          (-11.197,2.195,0)
          (-11.096,2.17,0)
          (-10.796,2.095,0)
          (-10.697,2.068,0)
          (-10.597,2.042,0)
          (-10.498,2.015,0)
          (-10.399,1.987,0)
          (-10.3,1.96,0)
          (-10.201,1.932,0)
          (-10.102,1.903,0)
          (-10.004,1.875,0)
          (-9.905,1.846,0)
          (-9.807,1.817,0)
          (-9.709,1.787,0)
          (-9.611,1.758,0)
          (-9.513,1.728,0)
          (-9.415,1.699,0)
          (-9.219,1.639,0)
          (-9.122,1.609,0)
          (-8.926,1.549,0)
          (-8.732,1.489,0)
          (-8.634,1.459,0)
          (-8.537,1.429,0)
          (-8.44,1.4,0)
          (-8.342,1.37,0)
          (-8.051,1.283,0)
          (-7.953,1.254,0)
          (-7.856,1.225,0)
          (-7.662,1.169,0)
          (-7.564,1.142,0)
          (-7.467,1.114,0)
          (-7.37,1.087,0)
          (-7.272,1.061,0)
          (-7.078,1.009,0)
          (-6.98,0.984,0)
          (-6.883,0.96,0)
          (-6.785,0.935,0)
          (-6.687,0.912,0)
          (-6.59,0.889,0)
          (-6.492,0.866,0)
          (-6.394,0.844,0)
          (-6.296,0.823,0)
          (-6.198,0.803,0)
          (-6.099,0.783,0)
          (-6.001,0.764,0)
          (-5.902,0.745,0)
          (-5.804,0.727,0)
          (-5.705,0.71,0)
          (-5.606,0.694,0)
          (-5.408,0.664,0)
          (-5.309,0.65,0)
          (-5.209,0.638,0)
          (-5.11,0.626,0)
          (-5.01,0.615,0)
          (-4.81,0.595,0)
          (-4.709,0.587,0)
          (-4.608,0.58,0)
          (-4.508,0.574,0)
          (-4.407,0.569,0)
          (-4.305,0.565,0)
          (-4.204,0.562,0)
          (-4,0.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (9.09425,1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (4,0.06,0)
          (4,0.56,0)
          (4.204,0.562,0)
          (4.305,0.565,0)
          (4.407,0.569,0)
          (4.508,0.574,0)
          (4.608,0.58,0)
          (4.709,0.587,0)
          (4.81,0.595,0)
          (5.01,0.615,0)
          (5.11,0.626,0)
          (5.209,0.638,0)
          (5.309,0.65,0)
          (5.408,0.664,0)
          (5.606,0.694,0)
          (5.705,0.71,0)
          (5.804,0.727,0)
          (5.902,0.745,0)
          (6.001,0.764,0)
          (6.099,0.783,0)
          (6.198,0.803,0)
          (6.296,0.823,0)
          (6.394,0.844,0)
          (6.492,0.866,0)
          (6.59,0.889,0)
          (6.687,0.912,0)
          (6.785,0.935,0)
          (6.883,0.96,0)
          (6.98,0.984,0)
          (7.078,1.009,0)
          (7.272,1.061,0)
          (7.37,1.087,0)
          (7.467,1.114,0)
          (7.564,1.142,0)
          (7.662,1.169,0)
          (7.856,1.225,0)
          (7.953,1.254,0)
          (8.051,1.283,0)
          (8.342,1.37,0)
          (8.44,1.4,0)
          (8.537,1.429,0)
          (8.634,1.459,0)
          (8.732,1.489,0)
          (8.926,1.549,0)
          (9.122,1.609,0)
          (9.219,1.639,0)
          (9.415,1.699,0)
          (9.513,1.728,0)
          (9.611,1.758,0)
          (9.709,1.787,0)
          (9.807,1.817,0)
          (9.905,1.846,0)
          (10.004,1.875,0)
          (10.102,1.903,0)
          (10.201,1.932,0)
          (10.3,1.96,0)
          (10.399,1.987,0)
          (10.498,2.015,0)
          (10.597,2.042,0)
          (10.697,2.068,0)
          (10.796,2.095,0)
          (11.096,2.17,0)
          (11.197,2.195,0)
          (11.297,2.218,0)
          (11.499,2.264,0)
          (11.6,2.286,0)
          (11.701,2.307,0)
          (11.803,2.328,0)
          (11.905,2.348,0)
          (12.007,2.367,0)
          (12.109,2.385,0)
          (12.212,2.403,0)
          (12.315,2.42,0)
          (12.418,2.436,0)
          (12.521,2.451,0)
          (12.729,2.479,0)
          (12.833,2.491,0)
          (12.938,2.503,0)
          (13.148,2.523,0)
          (13.253,2.531,0)
          (13.359,2.539,0)
          (13.465,2.545,0)
          (13.571,2.55,0)
          (13.678,2.555,0)
          (13.785,2.558,0)
          (13.892,2.559,0)
          (14,2.56,0)
          (17.2,2.56,0)
          (17.2,2.06,0)
          (14,2.06,0)
          (13.796,2.058,0)
          (13.695,2.055,0)
          (13.593,2.051,0)
          (13.492,2.046,0)
          (13.392,2.04,0)
          (13.291,2.033,0)
          (13.19,2.025,0)
          (12.99,2.005,0)
          (12.89,1.994,0)
          (12.791,1.982,0)
          (12.691,1.97,0)
          (12.592,1.956,0)
          (12.394,1.926,0)
          (12.295,1.91,0)
          (12.196,1.893,0)
          (12.098,1.875,0)
          (11.999,1.856,0)
          (11.901,1.837,0)
          (11.802,1.817,0)
          (11.704,1.797,0)
          (11.606,1.776,0)
          (11.508,1.754,0)
          (11.41,1.731,0)
          (11.313,1.708,0)
          (11.215,1.685,0)
          (11.117,1.66,0)
          (11.02,1.636,0)
          (10.922,1.611,0)
          (10.728,1.559,0)
          (10.63,1.533,0)
          (10.533,1.506,0)
          (10.436,1.478,0)
          (10.338,1.451,0)
          (10.144,1.395,0)
          (10.047,1.366,0)
          (9.949,1.337,0)
          (9.658,1.25,0)
          (9.56,1.22,0)
          (9.463,1.191,0)
          (9.366,1.161,0)
          (9.268,1.131,0)
          (9.074,1.071,0)
          (8.878,1.011,0)
          (8.781,0.981,0)
          (8.585,0.921,0)
          (8.487,0.892,0)
          (8.389,0.862,0)
          (8.291,0.833,0)
          (8.193,0.803,0)
          (8.095,0.774,0)
          (7.996,0.745,0)
          (7.898,0.717,0)
          (7.799,0.688,0)
          (7.7,0.66,0)
          (7.601,0.633,0)
          (7.502,0.605,0)
          (7.403,0.578,0)
          (7.303,0.552,0)
          (7.204,0.525,0)
          (6.904,0.45,0)
          (6.803,0.425,0)
          (6.703,0.402,0)
          (6.501,0.356,0)
          (6.4,0.334,0)
          (6.299,0.313,0)
          (6.197,0.292,0)
          (6.095,0.272,0)
          (5.993,0.253,0)
          (5.891,0.235,0)
          (5.788,0.217,0)
          (5.685,0.2,0)
          (5.582,0.184,0)
          (5.479,0.169,0)
          (5.271,0.141,0)
          (5.167,0.129,0)
          (5.062,0.117,0)
          (4.852,0.097,0)
          (4.747,0.089,0)
          (4.641,0.081,0)
          (4.535,0.075,0)
          (4.429,0.07,0)
          (4.322,0.065,0)
          (4.215,0.062,0)
          (4.108,0.061,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (0,0.31,0)
          height 0, axis (0,0,1), 4 vertices:
          (-4,0.06,0)
          (-4,0.56,0)
          (4,0.56,0)
          (4,0.06,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (-9.09425,-1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (-17.2,-2.56,0)
          (-17.2,-2.06,0)
          (-14,-2.06,0)
          (-13.796,-2.058,0)
          (-13.695,-2.055,0)
          (-13.593,-2.051,0)
          (-13.492,-2.046,0)
          (-13.392,-2.04,0)
          (-13.291,-2.033,0)
          (-13.19,-2.025,0)
          (-12.99,-2.005,0)
          (-12.89,-1.994,0)
          (-12.791,-1.982,0)
          (-12.691,-1.97,0)
          (-12.592,-1.956,0)
          (-12.394,-1.926,0)
          (-12.295,-1.91,0)
          (-12.196,-1.893,0)
          (-12.098,-1.875,0)
          (-11.999,-1.856,0)
          (-11.901,-1.837,0)
          (-11.802,-1.817,0)
          (-11.704,-1.797,0)
          (-11.606,-1.776,0)
          (-11.508,-1.754,0)
          (-11.41,-1.731,0)
          (-11.313,-1.708,0)
          (-11.215,-1.685,0)
          (-11.117,-1.66,0)
          (-11.02,-1.636,0)
          (-10.922,-1.611,0)
          (-10.728,-1.559,0)
          (-10.63,-1.533,0)
          (-10.533,-1.506,0)
          (-10.436,-1.478,0)
          (-10.338,-1.451,0)
          (-10.144,-1.395,0)
          (-10.047,-1.366,0)
          (-9.949,-1.337,0)
          (-9.658,-1.25,0)
          (-9.56,-1.22,0)
          (-9.463,-1.191,0)
          (-9.366,-1.161,0)
          (-9.268,-1.131,0)
          (-9.074,-1.071,0)
          (-8.878,-1.011,0)
          (-8.781,-0.981,0)
          (-8.585,-0.921,0)
          (-8.487,-0.892,0)
          (-8.389,-0.862,0)
          (-8.291,-0.833,0)
          (-8.193,-0.803,0)
          (-8.095,-0.774,0)
          (-7.996,-0.745,0)
          (-7.898,-0.717,0)
          (-7.799,-0.688,0)
          (-7.7,-0.66,0)
          (-7.601,-0.633,0)
          (-7.502,-0.605,0)
          (-7.403,-0.578,0)
          (-7.303,-0.552,0)
          (-7.204,-0.525,0)
          (-6.904,-0.45,0)
          (-6.803,-0.425,0)
          (-6.703,-0.402,0)
          (-6.501,-0.356,0)
          (-6.4,-0.334,0)
          (-6.299,-0.313,0)
          (-6.197,-0.292,0)
          (-6.095,-0.272,0)
          (-5.993,-0.253,0)
          (-5.891,-0.235,0)
          (-5.788,-0.217,0)
          (-5.685,-0.2,0)
          (-5.582,-0.184,0)
          (-5.479,-0.169,0)
          (-5.271,-0.141,0)
          (-5.167,-0.129,0)
          (-5.062,-0.117,0)
          (-4.852,-0.097,0)
          (-4.747,-0.089,0)
          (-4.641,-0.081,0)
          (-4.535,-0.075,0)
          (-4.429,-0.07,0)
          (-4.322,-0.065,0)
          (-4.215,-0.062,0)
          (-4.108,-0.061,0)
          (-4,-0.06,0)
          (-4,-0.56,0)
          (-4.204,-0.562,0)
          (-4.305,-0.565,0)
          (-4.407,-0.569,0)
          (-4.508,-0.574,0)
          (-4.608,-0.58,0)
          (-4.709,-0.587,0)
          (-4.81,-0.595,0)
          (-5.01,-0.615,0)
          (-5.11,-0.626,0)
          (-5.209,-0.638,0)
          (-5.309,-0.65,0)
          (-5.408,-0.664,0)
          (-5.606,-0.694,0)
          (-5.705,-0.71,0)
          (-5.804,-0.727,0)
          (-5.902,-0.745,0)
          (-6.001,-0.764,0)
          (-6.099,-0.783,0)
          (-6.198,-0.803,0)
          (-6.296,-0.823,0)
          (-6.394,-0.844,0)
          (-6.492,-0.866,0)
          (-6.59,-0.889,0)
          (-6.687,-0.912,0)
          (-6.785,-0.935,0)
          (-6.883,-0.96,0)
          (-6.98,-0.984,0)
          (-7.078,-1.009,0)
          (-7.272,-1.061,0)
          (-7.37,-1.087,0)
          (-7.467,-1.114,0)
          (-7.564,-1.142,0)
          (-7.662,-1.169,0)
          (-7.856,-1.225,0)
          (-7.953,-1.254,0)
          (-8.051,-1.283,0)
          (-8.342,-1.37,0)
          (-8.44,-1.4,0)
          (-8.537,-1.429,0)
          (-8.634,-1.459,0)
          (-8.732,-1.489,0)
          (-8.926,-1.549,0)
          (-9.122,-1.609,0)
          (-9.219,-1.639,0)
          (-9.415,-1.699,0)
          (-9.513,-1.728,0)
          (-9.611,-1.758,0)
          (-9.709,-1.787,0)
          (-9.807,-1.817,0)
          (-9.905,-1.846,0)
          (-10.004,-1.875,0)
          (-10.102,-1.903,0)
          (-10.201,-1.932,0)
          (-10.3,-1.96,0)
          (-10.399,-1.987,0)
          (-10.498,-2.015,0)
          (-10.597,-2.042,0)
          (-10.697,-2.068,0)
          (-10.796,-2.095,0)
          (-11.096,-2.17,0)
          (-11.197,-2.195,0)
          (-11.297,-2.218,0)
          (-11.499,-2.264,0)
          (-11.6,-2.286,0)
          (-11.701,-2.307,0)
          (-11.803,-2.328,0)
          (-11.905,-2.348,0)
          (-12.007,-2.367,0)
          (-12.109,-2.385,0)
          (-12.212,-2.403,0)
          (-12.315,-2.42,0)
          (-12.418,-2.436,0)
          (-12.521,-2.451,0)
          (-12.729,-2.479,0)
          (-12.833,-2.491,0)
          (-12.938,-2.503,0)
          (-13.148,-2.523,0)
          (-13.253,-2.531,0)
          (-13.359,-2.539,0)
          (-13.465,-2.545,0)
          (-13.571,-2.55,0)
          (-13.678,-2.555,0)
          (-13.785,-2.558,0)
          (-13.892,-2.559,0)
          (-14,-2.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (9.09425,-1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (14,-2.56,0)
          (13.892,-2.559,0)
          (13.785,-2.558,0)
          (13.678,-2.555,0)
          (13.571,-2.55,0)
          (13.465,-2.545,0)
          (13.359,-2.539,0)
          (13.253,-2.531,0)
          (13.148,-2.523,0)
          (12.938,-2.503,0)
          (12.833,-2.491,0)
          (12.729,-2.479,0)
          (12.521,-2.451,0)
          (12.418,-2.436,0)
          (12.315,-2.42,0)
          (12.212,-2.403,0)
          (12.109,-2.385,0)
          (12.007,-2.367,0)
          (11.905,-2.348,0)
          (11.803,-2.328,0)
          (11.701,-2.307,0)
          (11.6,-2.286,0)
          (11.499,-2.264,0)
          (11.297,-2.218,0)
          (11.197,-2.195,0)
          (11.096,-2.17,0)
          (10.796,-2.095,0)
          (10.697,-2.068,0)
          (10.597,-2.042,0)
          (10.498,-2.015,0)
          (10.399,-1.987,0)
          (10.3,-1.96,0)
          (10.201,-1.932,0)
          (10.102,-1.903,0)
          (10.004,-1.875,0)
          (9.905,-1.846,0)
          (9.807,-1.817,0)
          (9.709,-1.787,0)
          (9.611,-1.758,0)
          (9.513,-1.728,0)
          (9.415,-1.699,0)
          (9.219,-1.639,0)
          (9.122,-1.609,0)
          (8.926,-1.549,0)
          (8.732,-1.489,0)
          (8.634,-1.459,0)
          (8.537,-1.429,0)
          (8.44,-1.4,0)
          (8.342,-1.37,0)
          (8.051,-1.283,0)
          (7.953,-1.254,0)
          (7.856,-1.225,0)
          (7.662,-1.169,0)
          (7.564,-1.142,0)
          (7.467,-1.114,0)
          (7.37,-1.087,0)
          (7.272,-1.061,0)
          (7.078,-1.009,0)
          (6.98,-0.984,0)
          (6.883,-0.96,0)
          (6.785,-0.935,0)
          (6.687,-0.912,0)
          (6.59,-0.889,0)
          (6.492,-0.866,0)
          (6.394,-0.844,0)
          (6.296,-0.823,0)
          (6.198,-0.803,0)
          (6.099,-0.783,0)
          (6.001,-0.764,0)
          (5.902,-0.745,0)
          (5.804,-0.727,0)
          (5.705,-0.71,0)
          (5.606,-0.694,0)
          (5.408,-0.664,0)
          (5.309,-0.65,0)
          (5.209,-0.638,0)
          (5.11,-0.626,0)
          (5.01,-0.615,0)
          (4.81,-0.595,0)
          (4.709,-0.587,0)
          (4.608,-0.58,0)
          (4.508,-0.574,0)
          (4.407,-0.569,0)
          (4.305,-0.565,0)
          (4.204,-0.562,0)
          (4,-0.56,0)
          (4,-0.06,0)
          (4.108,-0.061,0)
          (4.215,-0.062,0)
          (4.322,-0.065,0)
          (4.429,-0.07,0)
          (4.535,-0.075,0)
          (4.641,-0.081,0)
          (4.747,-0.089,0)
          (4.852,-0.097,0)
          (5.062,-0.117,0)
          (5.167,-0.129,0)
          (5.271,-0.141,0)
          (5.479,-0.169,0)
          (5.582,-0.184,0)
          (5.685,-0.2,0)
          (5.788,-0.217,0)
          (5.891,-0.235,0)
          (5.993,-0.253,0)
          (6.095,-0.272,0)
          (6.197,-0.292,0)
          (6.299,-0.313,0)
          (6.4,-0.334,0)
          (6.501,-0.356,0)
          (6.703,-0.402,0)
          (6.803,-0.425,0)
          (6.904,-0.45,0)
          (7.204,-0.525,0)
          (7.303,-0.552,0)
          (7.403,-0.578,0)
          (7.502,-0.605,0)
          (7.601,-0.633,0)
          (7.7,-0.66,0)
          (7.799,-0.688,0)
          (7.898,-0.717,0)
          (7.996,-0.745,0)
          (8.095,-0.774,0)
          (8.193,-0.803,0)
          (8.291,-0.833,0)
          (8.389,-0.862,0)
          (8.487,-0.892,0)
          (8.585,-0.921,0)
          (8.781,-0.981,0)
          (8.878,-1.011,0)
          (9.074,-1.071,0)
          (9.268,-1.131,0)
          (9.366,-1.161,0)
          (9.463,-1.191,0)
          (9.56,-1.22,0)
          (9.658,-1.25,0)
          (9.949,-1.337,0)
          (10.047,-1.366,0)
          (10.144,-1.395,0)
          (10.338,-1.451,0)
          (10.436,-1.478,0)
          (10.533,-1.506,0)
          (10.63,-1.533,0)
          (10.728,-1.559,0)
          (10.922,-1.611,0)
          (11.02,-1.636,0)
          (11.117,-1.66,0)
          (11.215,-1.685,0)
          (11.313,-1.708,0)
          (11.41,-1.731,0)
          (11.508,-1.754,0)
          (11.606,-1.776,0)
          (11.704,-1.797,0)
          (11.802,-1.817,0)
          (11.901,-1.837,0)
          (11.999,-1.856,0)
          (12.098,-1.875,0)
          (12.196,-1.893,0)
          (12.295,-1.91,0)
          (12.394,-1.926,0)
          (12.592,-1.956,0)
          (12.691,-1.97,0)
          (12.791,-1.982,0)
          (12.89,-1.994,0)
          (12.99,-2.005,0)
          (13.19,-2.025,0)
          (13.291,-2.033,0)
          (13.392,-2.04,0)
          (13.492,-2.046,0)
          (13.593,-2.051,0)
          (13.695,-2.055,0)
          (13.796,-2.058,0)
          (14,-2.06,0)
          (17.2,-2.06,0)
          (17.2,-2.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (0,-0.31,0)
          height 0, axis (0,0,1), 4 vertices:
          (-4,-0.56,0)
          (-4,-0.06,0)
          (4,-0.06,0)
          (4,-0.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
subpixel-averaging is 11.5011% done, 30.9631 s remaining
subpixel-averaging is 20.4466% done, 15.8135 s remaining
subpixel-averaging is 29.3921% done, 9.71826 s remaining
subpixel-averaging is 58.5715% done, 2.83111 s remaining
subpixel-averaging is 71.3508% done, 1.62492 s remaining
subpixel-averaging is 80.2963% done, 0.998215 s remaining
subpixel-averaging is 89.2418% done, 0.492406 s remaining
subpixel-averaging is 11.5011% done, 30.9076 s remaining
subpixel-averaging is 20.4466% done, 15.9068 s remaining
subpixel-averaging is 29.3921% done, 9.80747 s remaining
subpixel-averaging is 57.7195% done, 2.9313 s remaining
subpixel-averaging is 71.1378% done, 1.66162 s remaining
subpixel-averaging is 80.0833% done, 1.0166 s remaining
subpixel-averaging is 88.8158% done, 0.504616 s remaining
subpixel-averaging is 11.5011% done, 30.9943 s remaining
subpixel-averaging is 20.4466% done, 15.8803 s remaining
subpixel-averaging is 29.3921% done, 9.78632 s remaining
subpixel-averaging is 56.8676% done, 3.03894 s remaining
subpixel-averaging is 70.9248% done, 1.64887 s remaining
subpixel-averaging is 79.8703% done, 1.02929 s remaining
subpixel-averaging is 88.8158% done, 0.514541 s remaining
time for set_epsilon = 102.547 s
-----------
MPB solved for omega_1(2.2349,0,0) = 0.686107 after 12 iters
MPB solved for omega_1(2.08827,0,0) = 0.645201 after 7 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 4 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 1 iters
Meep progress: 5.5600000000000005/177.5 = 3.1% done in 4.0s, 123.7s to go
on time step 556 (time=5.56), 0.00719569 s/step
Meep progress: 10.59/177.5 = 6.0% done in 8.0s, 126.1s to go
on time step 1059 (time=10.59), 0.00795647 s/step
Meep progress: 15.25/177.5 = 8.6% done in 12.0s, 127.8s to go
on time step 1525 (time=15.25), 0.0086014 s/step
Meep progress: 19.76/177.5 = 11.1% done in 16.0s, 127.8s to go
on time step 1976 (time=19.76), 0.00887541 s/step
Meep progress: 24.02/177.5 = 13.5% done in 20.0s, 127.9s to go
on time step 2402 (time=24.02), 0.00940361 s/step
Meep progress: 29.82/177.5 = 16.8% done in 24.0s, 119.0s to go
on time step 2982 (time=29.82), 0.00690337 s/step
Meep progress: 35.64/177.5 = 20.1% done in 28.0s, 111.6s to go
on time step 3564 (time=35.64), 0.00688025 s/step
Meep progress: 41.43/177.5 = 23.3% done in 32.0s, 105.2s to go
on time step 4143 (time=41.43), 0.00691613 s/step
Meep progress: 47.25/177.5 = 26.6% done in 36.0s, 99.3s to go
on time step 4725 (time=47.25), 0.0068737 s/step
Meep progress: 52.99/177.5 = 29.9% done in 40.0s, 94.1s to go
on time step 5299 (time=52.99), 0.0069787 s/step
Meep progress: 58.68/177.5 = 33.1% done in 44.0s, 89.2s to go
on time step 5868 (time=58.68), 0.00703139 s/step
Meep progress: 64.46000000000001/177.5 = 36.3% done in 48.0s, 84.2s to go
on time step 6446 (time=64.46), 0.0069234 s/step
Meep progress: 70.27/177.5 = 39.6% done in 52.0s, 79.4s to go
on time step 7027 (time=70.27), 0.00689556 s/step
Meep progress: 76.01/177.5 = 42.8% done in 56.1s, 74.8s to go
on time step 7601 (time=76.01), 0.00698002 s/step
Meep progress: 81.79/177.5 = 46.1% done in 60.1s, 70.3s to go
on time step 8179 (time=81.79), 0.00692945 s/step
Meep progress: 87.48/177.5 = 49.3% done in 64.1s, 65.9s to go
on time step 8748 (time=87.48), 0.00703933 s/step
Meep progress: 93.25/177.5 = 52.5% done in 68.1s, 61.5s to go
on time step 9325 (time=93.25), 0.00693846 s/step
Meep progress: 99.02/177.5 = 55.8% done in 72.1s, 57.1s to go
on time step 9902 (time=99.02), 0.00693694 s/step
Meep progress: 104.81/177.5 = 59.0% done in 76.1s, 52.8s to go
on time step 10481 (time=104.81), 0.00691733 s/step
Meep progress: 110.57000000000001/177.5 = 62.3% done in 80.1s, 48.5s to go
on time step 11057 (time=110.57), 0.00695527 s/step
Meep progress: 116.32000000000001/177.5 = 65.5% done in 84.1s, 44.2s to go
on time step 11632 (time=116.32), 0.00696429 s/step
Meep progress: 122.05/177.5 = 68.8% done in 88.1s, 40.0s to go
on time step 12205 (time=122.05), 0.00698096 s/step
Meep progress: 127.81/177.5 = 72.0% done in 92.1s, 35.8s to go
on time step 12781 (time=127.81), 0.00694492 s/step
Meep progress: 133.59/177.5 = 75.3% done in 96.1s, 31.6s to go
on time step 13359 (time=133.59), 0.00692692 s/step
Meep progress: 139.34/177.5 = 78.5% done in 100.1s, 27.4s to go
on time step 13934 (time=139.34), 0.00695738 s/step
Meep progress: 145.11/177.5 = 81.8% done in 104.1s, 23.2s to go
on time step 14511 (time=145.11), 0.00694059 s/step
Meep progress: 150.94/177.5 = 85.0% done in 108.1s, 19.0s to go
on time step 15094 (time=150.94), 0.00686312 s/step
Meep progress: 156.67000000000002/177.5 = 88.3% done in 112.1s, 14.9s to go
on time step 15667 (time=156.67), 0.00698277 s/step
Meep progress: 162.42000000000002/177.5 = 91.5% done in 116.1s, 10.8s to go
on time step 16242 (time=162.42), 0.00696221 s/step
Meep progress: 168.18/177.5 = 94.7% done in 120.1s, 6.7s to go
on time step 16818 (time=168.18), 0.00695355 s/step
Meep progress: 173.85/177.5 = 97.9% done in 124.1s, 2.6s to go
on time step 17385 (time=173.85), 0.00706013 s/step
run 0 finished at t = 177.5 (17750 timesteps)
In [2]:
# S parameters
p1_coeff = sim.get_eigenmode_coefficients(mode1, [1], eig_parity=mp.NO_PARITY if three_d else mp.EVEN_Y+mp.ODD_Z).alpha[0,0,0]
p2_coeff = sim.get_eigenmode_coefficients(mode2, [1], eig_parity=mp.NO_PARITY if three_d else mp.EVEN_Y+mp.ODD_Z).alpha[0,0,1]
p3_coeff = sim.get_eigenmode_coefficients(mode3, [1], eig_parity=mp.NO_PARITY if three_d else mp.EVEN_Y+mp.ODD_Z).alpha[0,0,0]
p4_coeff = sim.get_eigenmode_coefficients(mode4, [1], eig_parity=mp.NO_PARITY if three_d else mp.EVEN_Y+mp.ODD_Z).alpha[0,0,0]

# transmittance
p2_trans = abs(p2_coeff)**2/abs(p1_coeff)**2
p3_trans = abs(p3_coeff)**2/abs(p1_coeff)**2
p4_trans = abs(p4_coeff)**2/abs(p1_coeff)**2

print("trans:, {:.2f}, {:.6f}, {:.6f}, {:.6f}".format(d,p2_trans,p3_trans,p4_trans))
MPB solved for omega_1(2.2349,0,0) = 0.686107 after 12 iters
MPB solved for omega_1(2.08827,0,0) = 0.645201 after 7 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 4 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 1 iters
Dominant planewave for band 1: (2.088124,-0.000000,0.000000)
MPB solved for omega_1(2.2349,0,0) = 0.686107 after 12 iters
MPB solved for omega_1(2.08827,0,0) = 0.645201 after 7 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 4 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 1 iters
Dominant planewave for band 1: (2.088124,-0.000000,0.000000)
MPB solved for omega_1(2.2349,0,0) = 0.686107 after 13 iters
MPB solved for omega_1(2.08827,0,0) = 0.645201 after 7 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 4 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 1 iters
Dominant planewave for band 1: (2.088124,-0.000000,0.000000)
MPB solved for omega_1(2.2349,0,0) = 0.686107 after 14 iters
MPB solved for omega_1(2.08827,0,0) = 0.645201 after 7 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 4 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 1 iters
Dominant planewave for band 1: (2.088124,-0.000000,0.000000)
trans:, 0.12, 0.000002, 0.557065, 0.426816
In [3]:
sim.reset_meep()

sources = [mp.EigenModeSource(src=mp.ContinuousSource(fcen,fwidth=df),
                              size=src_vol.size,
                              center=src_vol.center,
                              eig_band=1,
                              eig_parity=mp.EVEN_Y+mp.ODD_Z,
                              eig_match_freq=True)]

sim = mp.Simulation(resolution=res,
                    cell_size=cell.size,
                    boundary_layers=[mp.PML(dpml)],
                    sources=sources,
                    geometry=geometry)

sim.run(until=400)  # arbitrary long run time to ensure that fields have reached steady state
Field time usage:
        connecting chunks: 0.149937 s
            time stepping: 116.36 s
            communicating: 8.63537 s
     Fourier transforming: 0.747245 s
                      MPB: 0.0412967 s
          everything else: 0.820934 s

-----------
Initializing structure...
Working in 2D dimensions.
Computational cell is 34.4 x 7.82 x 0 with resolution 50
     prism, center = (-9.09425,1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (-4,0.06,0)
          (-4.108,0.061,0)
          (-4.215,0.062,0)
          (-4.322,0.065,0)
          (-4.429,0.07,0)
          (-4.535,0.075,0)
          (-4.641,0.081,0)
          (-4.747,0.089,0)
          (-4.852,0.097,0)
          (-5.062,0.117,0)
          (-5.167,0.129,0)
          (-5.271,0.141,0)
          (-5.479,0.169,0)
          (-5.582,0.184,0)
          (-5.685,0.2,0)
          (-5.788,0.217,0)
          (-5.891,0.235,0)
          (-5.993,0.253,0)
          (-6.095,0.272,0)
          (-6.197,0.292,0)
          (-6.299,0.313,0)
          (-6.4,0.334,0)
          (-6.501,0.356,0)
          (-6.703,0.402,0)
          (-6.803,0.425,0)
          (-6.904,0.45,0)
          (-7.204,0.525,0)
          (-7.303,0.552,0)
          (-7.403,0.578,0)
          (-7.502,0.605,0)
          (-7.601,0.633,0)
          (-7.7,0.66,0)
          (-7.799,0.688,0)
          (-7.898,0.717,0)
          (-7.996,0.745,0)
          (-8.095,0.774,0)
          (-8.193,0.803,0)
          (-8.291,0.833,0)
          (-8.389,0.862,0)
          (-8.487,0.892,0)
          (-8.585,0.921,0)
          (-8.781,0.981,0)
          (-8.878,1.011,0)
          (-9.074,1.071,0)
          (-9.268,1.131,0)
          (-9.366,1.161,0)
          (-9.463,1.191,0)
          (-9.56,1.22,0)
          (-9.658,1.25,0)
          (-9.949,1.337,0)
          (-10.047,1.366,0)
          (-10.144,1.395,0)
          (-10.338,1.451,0)
          (-10.436,1.478,0)
          (-10.533,1.506,0)
          (-10.63,1.533,0)
          (-10.728,1.559,0)
          (-10.922,1.611,0)
          (-11.02,1.636,0)
          (-11.117,1.66,0)
          (-11.215,1.685,0)
          (-11.313,1.708,0)
          (-11.41,1.731,0)
          (-11.508,1.754,0)
          (-11.606,1.776,0)
          (-11.704,1.797,0)
          (-11.802,1.817,0)
          (-11.901,1.837,0)
          (-11.999,1.856,0)
          (-12.098,1.875,0)
          (-12.196,1.893,0)
          (-12.295,1.91,0)
          (-12.394,1.926,0)
          (-12.592,1.956,0)
          (-12.691,1.97,0)
          (-12.791,1.982,0)
          (-12.89,1.994,0)
          (-12.99,2.005,0)
          (-13.19,2.025,0)
          (-13.291,2.033,0)
          (-13.392,2.04,0)
          (-13.492,2.046,0)
          (-13.593,2.051,0)
          (-13.695,2.055,0)
          (-13.796,2.058,0)
          (-14,2.06,0)
          (-17.2,2.06,0)
          (-17.2,2.56,0)
          (-14,2.56,0)
          (-13.892,2.559,0)
          (-13.785,2.558,0)
          (-13.678,2.555,0)
          (-13.571,2.55,0)
          (-13.465,2.545,0)
          (-13.359,2.539,0)
          (-13.253,2.531,0)
          (-13.148,2.523,0)
          (-12.938,2.503,0)
          (-12.833,2.491,0)
          (-12.729,2.479,0)
          (-12.521,2.451,0)
          (-12.418,2.436,0)
          (-12.315,2.42,0)
          (-12.212,2.403,0)
          (-12.109,2.385,0)
          (-12.007,2.367,0)
          (-11.905,2.348,0)
          (-11.803,2.328,0)
          (-11.701,2.307,0)
          (-11.6,2.286,0)
          (-11.499,2.264,0)
          (-11.297,2.218,0)
          (-11.197,2.195,0)
          (-11.096,2.17,0)
          (-10.796,2.095,0)
          (-10.697,2.068,0)
          (-10.597,2.042,0)
          (-10.498,2.015,0)
          (-10.399,1.987,0)
          (-10.3,1.96,0)
          (-10.201,1.932,0)
          (-10.102,1.903,0)
          (-10.004,1.875,0)
          (-9.905,1.846,0)
          (-9.807,1.817,0)
          (-9.709,1.787,0)
          (-9.611,1.758,0)
          (-9.513,1.728,0)
          (-9.415,1.699,0)
          (-9.219,1.639,0)
          (-9.122,1.609,0)
          (-8.926,1.549,0)
          (-8.732,1.489,0)
          (-8.634,1.459,0)
          (-8.537,1.429,0)
          (-8.44,1.4,0)
          (-8.342,1.37,0)
          (-8.051,1.283,0)
          (-7.953,1.254,0)
          (-7.856,1.225,0)
          (-7.662,1.169,0)
          (-7.564,1.142,0)
          (-7.467,1.114,0)
          (-7.37,1.087,0)
          (-7.272,1.061,0)
          (-7.078,1.009,0)
          (-6.98,0.984,0)
          (-6.883,0.96,0)
          (-6.785,0.935,0)
          (-6.687,0.912,0)
          (-6.59,0.889,0)
          (-6.492,0.866,0)
          (-6.394,0.844,0)
          (-6.296,0.823,0)
          (-6.198,0.803,0)
          (-6.099,0.783,0)
          (-6.001,0.764,0)
          (-5.902,0.745,0)
          (-5.804,0.727,0)
          (-5.705,0.71,0)
          (-5.606,0.694,0)
          (-5.408,0.664,0)
          (-5.309,0.65,0)
          (-5.209,0.638,0)
          (-5.11,0.626,0)
          (-5.01,0.615,0)
          (-4.81,0.595,0)
          (-4.709,0.587,0)
          (-4.608,0.58,0)
          (-4.508,0.574,0)
          (-4.407,0.569,0)
          (-4.305,0.565,0)
          (-4.204,0.562,0)
          (-4,0.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (9.09425,1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (4,0.06,0)
          (4,0.56,0)
          (4.204,0.562,0)
          (4.305,0.565,0)
          (4.407,0.569,0)
          (4.508,0.574,0)
          (4.608,0.58,0)
          (4.709,0.587,0)
          (4.81,0.595,0)
          (5.01,0.615,0)
          (5.11,0.626,0)
          (5.209,0.638,0)
          (5.309,0.65,0)
          (5.408,0.664,0)
          (5.606,0.694,0)
          (5.705,0.71,0)
          (5.804,0.727,0)
          (5.902,0.745,0)
          (6.001,0.764,0)
          (6.099,0.783,0)
          (6.198,0.803,0)
          (6.296,0.823,0)
          (6.394,0.844,0)
          (6.492,0.866,0)
          (6.59,0.889,0)
          (6.687,0.912,0)
          (6.785,0.935,0)
          (6.883,0.96,0)
          (6.98,0.984,0)
          (7.078,1.009,0)
          (7.272,1.061,0)
          (7.37,1.087,0)
          (7.467,1.114,0)
          (7.564,1.142,0)
          (7.662,1.169,0)
          (7.856,1.225,0)
          (7.953,1.254,0)
          (8.051,1.283,0)
          (8.342,1.37,0)
          (8.44,1.4,0)
          (8.537,1.429,0)
          (8.634,1.459,0)
          (8.732,1.489,0)
          (8.926,1.549,0)
          (9.122,1.609,0)
          (9.219,1.639,0)
          (9.415,1.699,0)
          (9.513,1.728,0)
          (9.611,1.758,0)
          (9.709,1.787,0)
          (9.807,1.817,0)
          (9.905,1.846,0)
          (10.004,1.875,0)
          (10.102,1.903,0)
          (10.201,1.932,0)
          (10.3,1.96,0)
          (10.399,1.987,0)
          (10.498,2.015,0)
          (10.597,2.042,0)
          (10.697,2.068,0)
          (10.796,2.095,0)
          (11.096,2.17,0)
          (11.197,2.195,0)
          (11.297,2.218,0)
          (11.499,2.264,0)
          (11.6,2.286,0)
          (11.701,2.307,0)
          (11.803,2.328,0)
          (11.905,2.348,0)
          (12.007,2.367,0)
          (12.109,2.385,0)
          (12.212,2.403,0)
          (12.315,2.42,0)
          (12.418,2.436,0)
          (12.521,2.451,0)
          (12.729,2.479,0)
          (12.833,2.491,0)
          (12.938,2.503,0)
          (13.148,2.523,0)
          (13.253,2.531,0)
          (13.359,2.539,0)
          (13.465,2.545,0)
          (13.571,2.55,0)
          (13.678,2.555,0)
          (13.785,2.558,0)
          (13.892,2.559,0)
          (14,2.56,0)
          (17.2,2.56,0)
          (17.2,2.06,0)
          (14,2.06,0)
          (13.796,2.058,0)
          (13.695,2.055,0)
          (13.593,2.051,0)
          (13.492,2.046,0)
          (13.392,2.04,0)
          (13.291,2.033,0)
          (13.19,2.025,0)
          (12.99,2.005,0)
          (12.89,1.994,0)
          (12.791,1.982,0)
          (12.691,1.97,0)
          (12.592,1.956,0)
          (12.394,1.926,0)
          (12.295,1.91,0)
          (12.196,1.893,0)
          (12.098,1.875,0)
          (11.999,1.856,0)
          (11.901,1.837,0)
          (11.802,1.817,0)
          (11.704,1.797,0)
          (11.606,1.776,0)
          (11.508,1.754,0)
          (11.41,1.731,0)
          (11.313,1.708,0)
          (11.215,1.685,0)
          (11.117,1.66,0)
          (11.02,1.636,0)
          (10.922,1.611,0)
          (10.728,1.559,0)
          (10.63,1.533,0)
          (10.533,1.506,0)
          (10.436,1.478,0)
          (10.338,1.451,0)
          (10.144,1.395,0)
          (10.047,1.366,0)
          (9.949,1.337,0)
          (9.658,1.25,0)
          (9.56,1.22,0)
          (9.463,1.191,0)
          (9.366,1.161,0)
          (9.268,1.131,0)
          (9.074,1.071,0)
          (8.878,1.011,0)
          (8.781,0.981,0)
          (8.585,0.921,0)
          (8.487,0.892,0)
          (8.389,0.862,0)
          (8.291,0.833,0)
          (8.193,0.803,0)
          (8.095,0.774,0)
          (7.996,0.745,0)
          (7.898,0.717,0)
          (7.799,0.688,0)
          (7.7,0.66,0)
          (7.601,0.633,0)
          (7.502,0.605,0)
          (7.403,0.578,0)
          (7.303,0.552,0)
          (7.204,0.525,0)
          (6.904,0.45,0)
          (6.803,0.425,0)
          (6.703,0.402,0)
          (6.501,0.356,0)
          (6.4,0.334,0)
          (6.299,0.313,0)
          (6.197,0.292,0)
          (6.095,0.272,0)
          (5.993,0.253,0)
          (5.891,0.235,0)
          (5.788,0.217,0)
          (5.685,0.2,0)
          (5.582,0.184,0)
          (5.479,0.169,0)
          (5.271,0.141,0)
          (5.167,0.129,0)
          (5.062,0.117,0)
          (4.852,0.097,0)
          (4.747,0.089,0)
          (4.641,0.081,0)
          (4.535,0.075,0)
          (4.429,0.07,0)
          (4.322,0.065,0)
          (4.215,0.062,0)
          (4.108,0.061,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (0,0.31,0)
          height 0, axis (0,0,1), 4 vertices:
          (-4,0.06,0)
          (-4,0.56,0)
          (4,0.56,0)
          (4,0.06,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (-9.09425,-1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (-17.2,-2.56,0)
          (-17.2,-2.06,0)
          (-14,-2.06,0)
          (-13.796,-2.058,0)
          (-13.695,-2.055,0)
          (-13.593,-2.051,0)
          (-13.492,-2.046,0)
          (-13.392,-2.04,0)
          (-13.291,-2.033,0)
          (-13.19,-2.025,0)
          (-12.99,-2.005,0)
          (-12.89,-1.994,0)
          (-12.791,-1.982,0)
          (-12.691,-1.97,0)
          (-12.592,-1.956,0)
          (-12.394,-1.926,0)
          (-12.295,-1.91,0)
          (-12.196,-1.893,0)
          (-12.098,-1.875,0)
          (-11.999,-1.856,0)
          (-11.901,-1.837,0)
          (-11.802,-1.817,0)
          (-11.704,-1.797,0)
          (-11.606,-1.776,0)
          (-11.508,-1.754,0)
          (-11.41,-1.731,0)
          (-11.313,-1.708,0)
          (-11.215,-1.685,0)
          (-11.117,-1.66,0)
          (-11.02,-1.636,0)
          (-10.922,-1.611,0)
          (-10.728,-1.559,0)
          (-10.63,-1.533,0)
          (-10.533,-1.506,0)
          (-10.436,-1.478,0)
          (-10.338,-1.451,0)
          (-10.144,-1.395,0)
          (-10.047,-1.366,0)
          (-9.949,-1.337,0)
          (-9.658,-1.25,0)
          (-9.56,-1.22,0)
          (-9.463,-1.191,0)
          (-9.366,-1.161,0)
          (-9.268,-1.131,0)
          (-9.074,-1.071,0)
          (-8.878,-1.011,0)
          (-8.781,-0.981,0)
          (-8.585,-0.921,0)
          (-8.487,-0.892,0)
          (-8.389,-0.862,0)
          (-8.291,-0.833,0)
          (-8.193,-0.803,0)
          (-8.095,-0.774,0)
          (-7.996,-0.745,0)
          (-7.898,-0.717,0)
          (-7.799,-0.688,0)
          (-7.7,-0.66,0)
          (-7.601,-0.633,0)
          (-7.502,-0.605,0)
          (-7.403,-0.578,0)
          (-7.303,-0.552,0)
          (-7.204,-0.525,0)
          (-6.904,-0.45,0)
          (-6.803,-0.425,0)
          (-6.703,-0.402,0)
          (-6.501,-0.356,0)
          (-6.4,-0.334,0)
          (-6.299,-0.313,0)
          (-6.197,-0.292,0)
          (-6.095,-0.272,0)
          (-5.993,-0.253,0)
          (-5.891,-0.235,0)
          (-5.788,-0.217,0)
          (-5.685,-0.2,0)
          (-5.582,-0.184,0)
          (-5.479,-0.169,0)
          (-5.271,-0.141,0)
          (-5.167,-0.129,0)
          (-5.062,-0.117,0)
          (-4.852,-0.097,0)
          (-4.747,-0.089,0)
          (-4.641,-0.081,0)
          (-4.535,-0.075,0)
          (-4.429,-0.07,0)
          (-4.322,-0.065,0)
          (-4.215,-0.062,0)
          (-4.108,-0.061,0)
          (-4,-0.06,0)
          (-4,-0.56,0)
          (-4.204,-0.562,0)
          (-4.305,-0.565,0)
          (-4.407,-0.569,0)
          (-4.508,-0.574,0)
          (-4.608,-0.58,0)
          (-4.709,-0.587,0)
          (-4.81,-0.595,0)
          (-5.01,-0.615,0)
          (-5.11,-0.626,0)
          (-5.209,-0.638,0)
          (-5.309,-0.65,0)
          (-5.408,-0.664,0)
          (-5.606,-0.694,0)
          (-5.705,-0.71,0)
          (-5.804,-0.727,0)
          (-5.902,-0.745,0)
          (-6.001,-0.764,0)
          (-6.099,-0.783,0)
          (-6.198,-0.803,0)
          (-6.296,-0.823,0)
          (-6.394,-0.844,0)
          (-6.492,-0.866,0)
          (-6.59,-0.889,0)
          (-6.687,-0.912,0)
          (-6.785,-0.935,0)
          (-6.883,-0.96,0)
          (-6.98,-0.984,0)
          (-7.078,-1.009,0)
          (-7.272,-1.061,0)
          (-7.37,-1.087,0)
          (-7.467,-1.114,0)
          (-7.564,-1.142,0)
          (-7.662,-1.169,0)
          (-7.856,-1.225,0)
          (-7.953,-1.254,0)
          (-8.051,-1.283,0)
          (-8.342,-1.37,0)
          (-8.44,-1.4,0)
          (-8.537,-1.429,0)
          (-8.634,-1.459,0)
          (-8.732,-1.489,0)
          (-8.926,-1.549,0)
          (-9.122,-1.609,0)
          (-9.219,-1.639,0)
          (-9.415,-1.699,0)
          (-9.513,-1.728,0)
          (-9.611,-1.758,0)
          (-9.709,-1.787,0)
          (-9.807,-1.817,0)
          (-9.905,-1.846,0)
          (-10.004,-1.875,0)
          (-10.102,-1.903,0)
          (-10.201,-1.932,0)
          (-10.3,-1.96,0)
          (-10.399,-1.987,0)
          (-10.498,-2.015,0)
          (-10.597,-2.042,0)
          (-10.697,-2.068,0)
          (-10.796,-2.095,0)
          (-11.096,-2.17,0)
          (-11.197,-2.195,0)
          (-11.297,-2.218,0)
          (-11.499,-2.264,0)
          (-11.6,-2.286,0)
          (-11.701,-2.307,0)
          (-11.803,-2.328,0)
          (-11.905,-2.348,0)
          (-12.007,-2.367,0)
          (-12.109,-2.385,0)
          (-12.212,-2.403,0)
          (-12.315,-2.42,0)
          (-12.418,-2.436,0)
          (-12.521,-2.451,0)
          (-12.729,-2.479,0)
          (-12.833,-2.491,0)
          (-12.938,-2.503,0)
          (-13.148,-2.523,0)
          (-13.253,-2.531,0)
          (-13.359,-2.539,0)
          (-13.465,-2.545,0)
          (-13.571,-2.55,0)
          (-13.678,-2.555,0)
          (-13.785,-2.558,0)
          (-13.892,-2.559,0)
          (-14,-2.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (9.09425,-1.32149,0)
          height 0, axis (0,0,1), 174 vertices:
          (14,-2.56,0)
          (13.892,-2.559,0)
          (13.785,-2.558,0)
          (13.678,-2.555,0)
          (13.571,-2.55,0)
          (13.465,-2.545,0)
          (13.359,-2.539,0)
          (13.253,-2.531,0)
          (13.148,-2.523,0)
          (12.938,-2.503,0)
          (12.833,-2.491,0)
          (12.729,-2.479,0)
          (12.521,-2.451,0)
          (12.418,-2.436,0)
          (12.315,-2.42,0)
          (12.212,-2.403,0)
          (12.109,-2.385,0)
          (12.007,-2.367,0)
          (11.905,-2.348,0)
          (11.803,-2.328,0)
          (11.701,-2.307,0)
          (11.6,-2.286,0)
          (11.499,-2.264,0)
          (11.297,-2.218,0)
          (11.197,-2.195,0)
          (11.096,-2.17,0)
          (10.796,-2.095,0)
          (10.697,-2.068,0)
          (10.597,-2.042,0)
          (10.498,-2.015,0)
          (10.399,-1.987,0)
          (10.3,-1.96,0)
          (10.201,-1.932,0)
          (10.102,-1.903,0)
          (10.004,-1.875,0)
          (9.905,-1.846,0)
          (9.807,-1.817,0)
          (9.709,-1.787,0)
          (9.611,-1.758,0)
          (9.513,-1.728,0)
          (9.415,-1.699,0)
          (9.219,-1.639,0)
          (9.122,-1.609,0)
          (8.926,-1.549,0)
          (8.732,-1.489,0)
          (8.634,-1.459,0)
          (8.537,-1.429,0)
          (8.44,-1.4,0)
          (8.342,-1.37,0)
          (8.051,-1.283,0)
          (7.953,-1.254,0)
          (7.856,-1.225,0)
          (7.662,-1.169,0)
          (7.564,-1.142,0)
          (7.467,-1.114,0)
          (7.37,-1.087,0)
          (7.272,-1.061,0)
          (7.078,-1.009,0)
          (6.98,-0.984,0)
          (6.883,-0.96,0)
          (6.785,-0.935,0)
          (6.687,-0.912,0)
          (6.59,-0.889,0)
          (6.492,-0.866,0)
          (6.394,-0.844,0)
          (6.296,-0.823,0)
          (6.198,-0.803,0)
          (6.099,-0.783,0)
          (6.001,-0.764,0)
          (5.902,-0.745,0)
          (5.804,-0.727,0)
          (5.705,-0.71,0)
          (5.606,-0.694,0)
          (5.408,-0.664,0)
          (5.309,-0.65,0)
          (5.209,-0.638,0)
          (5.11,-0.626,0)
          (5.01,-0.615,0)
          (4.81,-0.595,0)
          (4.709,-0.587,0)
          (4.608,-0.58,0)
          (4.508,-0.574,0)
          (4.407,-0.569,0)
          (4.305,-0.565,0)
          (4.204,-0.562,0)
          (4,-0.56,0)
          (4,-0.06,0)
          (4.108,-0.061,0)
          (4.215,-0.062,0)
          (4.322,-0.065,0)
          (4.429,-0.07,0)
          (4.535,-0.075,0)
          (4.641,-0.081,0)
          (4.747,-0.089,0)
          (4.852,-0.097,0)
          (5.062,-0.117,0)
          (5.167,-0.129,0)
          (5.271,-0.141,0)
          (5.479,-0.169,0)
          (5.582,-0.184,0)
          (5.685,-0.2,0)
          (5.788,-0.217,0)
          (5.891,-0.235,0)
          (5.993,-0.253,0)
          (6.095,-0.272,0)
          (6.197,-0.292,0)
          (6.299,-0.313,0)
          (6.4,-0.334,0)
          (6.501,-0.356,0)
          (6.703,-0.402,0)
          (6.803,-0.425,0)
          (6.904,-0.45,0)
          (7.204,-0.525,0)
          (7.303,-0.552,0)
          (7.403,-0.578,0)
          (7.502,-0.605,0)
          (7.601,-0.633,0)
          (7.7,-0.66,0)
          (7.799,-0.688,0)
          (7.898,-0.717,0)
          (7.996,-0.745,0)
          (8.095,-0.774,0)
          (8.193,-0.803,0)
          (8.291,-0.833,0)
          (8.389,-0.862,0)
          (8.487,-0.892,0)
          (8.585,-0.921,0)
          (8.781,-0.981,0)
          (8.878,-1.011,0)
          (9.074,-1.071,0)
          (9.268,-1.131,0)
          (9.366,-1.161,0)
          (9.463,-1.191,0)
          (9.56,-1.22,0)
          (9.658,-1.25,0)
          (9.949,-1.337,0)
          (10.047,-1.366,0)
          (10.144,-1.395,0)
          (10.338,-1.451,0)
          (10.436,-1.478,0)
          (10.533,-1.506,0)
          (10.63,-1.533,0)
          (10.728,-1.559,0)
          (10.922,-1.611,0)
          (11.02,-1.636,0)
          (11.117,-1.66,0)
          (11.215,-1.685,0)
          (11.313,-1.708,0)
          (11.41,-1.731,0)
          (11.508,-1.754,0)
          (11.606,-1.776,0)
          (11.704,-1.797,0)
          (11.802,-1.817,0)
          (11.901,-1.837,0)
          (11.999,-1.856,0)
          (12.098,-1.875,0)
          (12.196,-1.893,0)
          (12.295,-1.91,0)
          (12.394,-1.926,0)
          (12.592,-1.956,0)
          (12.691,-1.97,0)
          (12.791,-1.982,0)
          (12.89,-1.994,0)
          (12.99,-2.005,0)
          (13.19,-2.025,0)
          (13.291,-2.033,0)
          (13.392,-2.04,0)
          (13.492,-2.046,0)
          (13.593,-2.051,0)
          (13.695,-2.055,0)
          (13.796,-2.058,0)
          (14,-2.06,0)
          (17.2,-2.06,0)
          (17.2,-2.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
     prism, center = (0,-0.31,0)
          height 0, axis (0,0,1), 4 vertices:
          (-4,-0.56,0)
          (-4,-0.06,0)
          (4,-0.06,0)
          (4,-0.56,0)
          dielectric constant epsilon diagonal = (12,12,12)
subpixel-averaging is 11.5011% done, 30.8183 s remaining
subpixel-averaging is 20.4466% done, 15.7497 s remaining
subpixel-averaging is 29.6051% done, 9.5833 s remaining
subpixel-averaging is 61.1273% done, 2.54648 s remaining
subpixel-averaging is 71.3508% done, 1.63014 s remaining
subpixel-averaging is 80.2963% done, 0.999069 s remaining
subpixel-averaging is 89.2418% done, 0.489546 s remaining
subpixel-averaging is 11.5011% done, 30.8424 s remaining
subpixel-averaging is 20.4466% done, 15.9006 s remaining
subpixel-averaging is 29.3921% done, 9.75747 s remaining
subpixel-averaging is 57.9325% done, 2.90513 s remaining
subpixel-averaging is 71.1378% done, 1.65849 s remaining
subpixel-averaging is 80.0833% done, 1.01553 s remaining
subpixel-averaging is 88.8158% done, 0.504138 s remaining
subpixel-averaging is 11.5011% done, 30.9702 s remaining
subpixel-averaging is 20.4466% done, 15.7172 s remaining
subpixel-averaging is 29.3921% done, 9.76 s remaining
subpixel-averaging is 57.9325% done, 2.90604 s remaining
subpixel-averaging is 71.1378% done, 1.66284 s remaining
subpixel-averaging is 80.0833% done, 1.01205 s remaining
subpixel-averaging is 89.0288% done, 0.504221 s remaining
time for set_epsilon = 102.322 s
-----------
MPB solved for omega_1(2.2349,0,0) = 0.686107 after 12 iters
MPB solved for omega_1(2.08827,0,0) = 0.645201 after 7 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 4 iters
MPB solved for omega_1(2.08812,0,0) = 0.645161 after 1 iters
Meep progress: 5.41/400.0 = 1.4% done in 4.0s, 292.0s to go
on time step 541 (time=5.41), 0.00739947 s/step
Meep progress: 10.450000000000001/400.0 = 2.6% done in 8.0s, 298.4s to go
on time step 1045 (time=10.45), 0.0079413 s/step
Meep progress: 15.11/400.0 = 3.8% done in 12.0s, 305.9s to go
on time step 1511 (time=15.11), 0.0085874 s/step
Meep progress: 19.61/400.0 = 4.9% done in 16.0s, 310.6s to go
on time step 1961 (time=19.61), 0.00890556 s/step
Meep progress: 23.82/400.0 = 6.0% done in 20.0s, 316.2s to go
on time step 2382 (time=23.82), 0.00951234 s/step
Meep progress: 29.55/400.0 = 7.4% done in 24.0s, 301.1s to go
on time step 2955 (time=29.55), 0.00698203 s/step
Meep progress: 35.21/400.0 = 8.8% done in 28.0s, 290.4s to go
on time step 3521 (time=35.21), 0.0070767 s/step
Meep progress: 40.86/400.0 = 10.2% done in 32.0s, 281.5s to go
on time step 4086 (time=40.86), 0.00709053 s/step
Meep progress: 46.53/400.0 = 11.6% done in 36.0s, 273.8s to go
on time step 4653 (time=46.53), 0.00706554 s/step
Meep progress: 52.230000000000004/400.0 = 13.1% done in 40.0s, 266.6s to go
on time step 5223 (time=52.23), 0.00702252 s/step
Meep progress: 57.980000000000004/400.0 = 14.5% done in 44.0s, 259.8s to go
on time step 5798 (time=57.98), 0.00695708 s/step
Meep progress: 63.74/400.0 = 15.9% done in 48.0s, 253.5s to go
on time step 6374 (time=63.74), 0.00695095 s/step
Meep progress: 69.53/400.0 = 17.4% done in 52.0s, 247.4s to go
on time step 6953 (time=69.53), 0.00690956 s/step
Meep progress: 75.17/400.0 = 18.8% done in 56.0s, 242.2s to go
on time step 7517 (time=75.17), 0.00709654 s/step
Meep progress: 80.95/400.0 = 20.2% done in 60.0s, 236.7s to go
on time step 8095 (time=80.95), 0.00692188 s/step
Meep progress: 86.69/400.0 = 21.7% done in 64.1s, 231.5s to go
on time step 8669 (time=86.69), 0.00697913 s/step
Meep progress: 92.39/400.0 = 23.1% done in 68.1s, 226.6s to go
on time step 9239 (time=92.39), 0.00702692 s/step
Meep progress: 98.15/400.0 = 24.5% done in 72.1s, 221.6s to go
on time step 9815 (time=98.15), 0.00695458 s/step
Meep progress: 104.01/400.0 = 26.0% done in 76.1s, 216.5s to go
on time step 10401 (time=104.01), 0.00682702 s/step
Meep progress: 109.67/400.0 = 27.4% done in 80.1s, 212.0s to go
on time step 10967 (time=109.67), 0.00707033 s/step
Meep progress: 115.27/400.0 = 28.8% done in 84.1s, 207.7s to go
on time step 11527 (time=115.27), 0.0071473 s/step
Meep progress: 120.97/400.0 = 30.2% done in 88.1s, 203.2s to go
on time step 12097 (time=120.97), 0.00702199 s/step
Meep progress: 126.67/400.0 = 31.7% done in 92.1s, 198.7s to go
on time step 12667 (time=126.67), 0.00702586 s/step
Meep progress: 132.41/400.0 = 33.1% done in 96.1s, 194.2s to go
on time step 13241 (time=132.41), 0.00697363 s/step
Meep progress: 138.11/400.0 = 34.5% done in 100.1s, 189.8s to go
on time step 13811 (time=138.11), 0.0070254 s/step
Meep progress: 143.69/400.0 = 35.9% done in 104.1s, 185.7s to go
on time step 14369 (time=143.69), 0.0071739 s/step
Meep progress: 149.27/400.0 = 37.3% done in 108.1s, 181.6s to go
on time step 14927 (time=149.27), 0.00717841 s/step
Meep progress: 154.48/400.0 = 38.6% done in 112.1s, 178.2s to go
on time step 15448 (time=154.48), 0.0076782 s/step
Meep progress: 160.01/400.0 = 40.0% done in 116.1s, 174.1s to go
on time step 16001 (time=160.01), 0.00724479 s/step
Meep progress: 165.47/400.0 = 41.4% done in 120.1s, 170.2s to go
on time step 16547 (time=165.47), 0.00733126 s/step
Meep progress: 171.12/400.0 = 42.8% done in 124.1s, 166.0s to go
on time step 17112 (time=171.12), 0.00708435 s/step
Meep progress: 176.81/400.0 = 44.2% done in 128.1s, 161.7s to go
on time step 17681 (time=176.81), 0.00703244 s/step
Meep progress: 182.48/400.0 = 45.6% done in 132.1s, 157.5s to go
on time step 18248 (time=182.48), 0.0070563 s/step
Meep progress: 188.13/400.0 = 47.0% done in 136.1s, 153.3s to go
on time step 18813 (time=188.13), 0.00708801 s/step
Meep progress: 193.89000000000001/400.0 = 48.5% done in 140.1s, 149.0s to go
on time step 19389 (time=193.89), 0.00695529 s/step
Meep progress: 199.69/400.0 = 49.9% done in 144.1s, 144.6s to go
on time step 19969 (time=199.69), 0.00690079 s/step
Meep progress: 205.42000000000002/400.0 = 51.4% done in 148.1s, 140.3s to go
on time step 20542 (time=205.42), 0.00698182 s/step
Meep progress: 211.15/400.0 = 52.8% done in 152.1s, 136.1s to go
on time step 21115 (time=211.15), 0.00698866 s/step
Meep progress: 216.79/400.0 = 54.2% done in 156.1s, 131.9s to go
on time step 21679 (time=216.79), 0.00709759 s/step
Meep progress: 222.52/400.0 = 55.6% done in 160.1s, 127.7s to go
on time step 22252 (time=222.52), 0.00699233 s/step
Meep progress: 228.21/400.0 = 57.1% done in 164.1s, 123.6s to go
on time step 22821 (time=228.21), 0.00703425 s/step
Meep progress: 233.92000000000002/400.0 = 58.5% done in 168.1s, 119.4s to go
on time step 23392 (time=233.92), 0.00701093 s/step
Meep progress: 239.55/400.0 = 59.9% done in 172.2s, 115.3s to go
on time step 23955 (time=239.55), 0.00711595 s/step
Meep progress: 245.11/400.0 = 61.3% done in 176.2s, 111.3s to go
on time step 24511 (time=245.11), 0.00720156 s/step
Meep progress: 250.84/400.0 = 62.7% done in 180.2s, 107.1s to go
on time step 25084 (time=250.84), 0.00699008 s/step
Meep progress: 256.51/400.0 = 64.1% done in 184.2s, 103.0s to go
on time step 25651 (time=256.51), 0.00706033 s/step
Meep progress: 262.24/400.0 = 65.6% done in 188.2s, 98.8s to go
on time step 26224 (time=262.24), 0.00699052 s/step
Meep progress: 267.97/400.0 = 67.0% done in 192.2s, 94.7s to go
on time step 26797 (time=267.97), 0.00699247 s/step
Meep progress: 273.61/400.0 = 68.4% done in 196.2s, 90.6s to go
on time step 27361 (time=273.61), 0.00710412 s/step
Meep progress: 279.32/400.0 = 69.8% done in 200.2s, 86.5s to go
on time step 27932 (time=279.32), 0.00700535 s/step
Meep progress: 285.02/400.0 = 71.3% done in 204.2s, 82.4s to go
on time step 28502 (time=285.02), 0.00702477 s/step
Meep progress: 290.72/400.0 = 72.7% done in 208.2s, 78.3s to go
on time step 29072 (time=290.72), 0.0070208 s/step
Meep progress: 296.42/400.0 = 74.1% done in 212.2s, 74.1s to go
on time step 29642 (time=296.42), 0.00702695 s/step
Meep progress: 302.17/400.0 = 75.5% done in 216.2s, 70.0s to go
on time step 30217 (time=302.17), 0.00696356 s/step
Meep progress: 307.86/400.0 = 77.0% done in 220.2s, 65.9s to go
on time step 30786 (time=307.86), 0.00704203 s/step
Meep progress: 313.53000000000003/400.0 = 78.4% done in 224.2s, 61.8s to go
on time step 31353 (time=313.53), 0.00706128 s/step
Meep progress: 319.3/400.0 = 79.8% done in 228.2s, 57.7s to go
on time step 31930 (time=319.3), 0.00694399 s/step
Meep progress: 325.0/400.0 = 81.2% done in 232.2s, 53.6s to go
on time step 32500 (time=325), 0.00702027 s/step
Meep progress: 330.76/400.0 = 82.7% done in 236.2s, 49.4s to go
on time step 33076 (time=330.76), 0.00694491 s/step
Meep progress: 336.46/400.0 = 84.1% done in 240.2s, 45.4s to go
on time step 33646 (time=336.46), 0.00702158 s/step
Meep progress: 342.17/400.0 = 85.5% done in 244.2s, 41.3s to go
on time step 34217 (time=342.17), 0.0070114 s/step
Meep progress: 347.92/400.0 = 87.0% done in 248.2s, 37.2s to go
on time step 34792 (time=347.92), 0.00696299 s/step
Meep progress: 353.64/400.0 = 88.4% done in 252.2s, 33.1s to go
on time step 35364 (time=353.64), 0.00699623 s/step
Meep progress: 359.28000000000003/400.0 = 89.8% done in 256.2s, 29.0s to go
on time step 35928 (time=359.28), 0.00710347 s/step
Meep progress: 365.03000000000003/400.0 = 91.3% done in 260.2s, 24.9s to go
on time step 36503 (time=365.03), 0.00696683 s/step
Meep progress: 370.73/400.0 = 92.7% done in 264.2s, 20.9s to go
on time step 37073 (time=370.73), 0.00701992 s/step
Meep progress: 376.49/400.0 = 94.1% done in 268.2s, 16.8s to go
on time step 37649 (time=376.49), 0.0069514 s/step
Meep progress: 382.23/400.0 = 95.6% done in 272.2s, 12.7s to go
on time step 38223 (time=382.23), 0.00697308 s/step
Meep progress: 387.86/400.0 = 97.0% done in 276.2s, 8.6s to go
on time step 38786 (time=387.86), 0.00710584 s/step
Meep progress: 393.52/400.0 = 98.4% done in 280.3s, 4.6s to go
on time step 39352 (time=393.52), 0.00706898 s/step
Meep progress: 399.28000000000003/400.0 = 99.8% done in 284.3s, 0.5s to go
on time step 39928 (time=399.28), 0.00694658 s/step
run 0 finished at t = 400.0 (40000 timesteps)
In [4]:
eps_data = sim.get_epsilon()
ez_data = numpy.real(sim.get_efield_z())

plt.figure(dpi=200)
plt.imshow(numpy.transpose(eps_data), interpolation='spline36', cmap='binary')
plt.imshow(numpy.flipud(numpy.transpose(ez_data)), interpolation='spline36', cmap='RdBu', alpha=0.9)
plt.axis('off')
plt.show()