-
Notifications
You must be signed in to change notification settings - Fork 723
Description
Based on the current setup of the DiffractedPlanewave
and EigenModeSource
objects, it is not possible to launch planewave sources (by passing a DiffractedPlanewave
object as the eig_band
property of an EigenModeSource
) with a negative propagation constant
fields::get_eigenmode
:
Lines 649 to 661 in b065eae
if (match_frequency) { | |
vec cen = eig_vol.center(); | |
double nn = sqrt(real(get_eps(cen, frequency)) * real(get_mu(cen, frequency))); | |
double k2 = frequency * frequency * nn * nn - k2sum; | |
if (k2 < 0) { | |
master_printf("WARNING: diffraction order for g=(%d,%d,%d) is " | |
"evanescent!\n", | |
dp->get_g()[0], dp->get_g()[1], dp->get_g()[2]); | |
return NULL; | |
} | |
else if (k2 > 0) | |
k[dd - X] = sqrt(k2); | |
} |
This missing property of DiffractedPlanewave
sources is necessary for the adjoint solver (#2054).
(Note: for mode decomposition, obtaining the mode coefficient for the alpha
array returned by get_eigenmode_coefficient
.)