Repository navigation
Getting an error while solving modes of a waveguide #2446
|
I am trying to solve for the modes of a channel waveguide, but I am encountering an error that I don't understand. Please find the code below. position and size of source planesrc_plane = td.Box(center=[0, 0, sou_pos], size=[sz_plane, sz_plane, 0]) number of modes to computenum_modes = 2 setup and solve for modesmode_spec = td.ModeSpec(num_modes=num_modes) print("Effective index of computed modes: ", np.array(modes.n_eff)) the error I am getting is, NameError Traceback (most recent call last) NameError: name 'ModeSolver' is not defined |
Replies: 1 comment
|
It sounds like you just haven't imported the mode solver? |
It sounds like you just haven't imported the mode solver?