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 $\beta$ (the wavevector component in the direction perpendicular to the source plane).
$\beta$ is always chosen to be positive on line 660 of fields::get_eigenmode:
|
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 $-\beta$ mode is simply a matter of choosing the second of two elements of the third dimension of the alpha array returned by get_eigenmode_coefficient.)
Based on the current setup of the$\beta$ (the wavevector component in the direction perpendicular to the source plane).
DiffractedPlanewaveandEigenModeSourceobjects, it is not possible to launch planewave sources (by passing aDiffractedPlanewaveobject as theeig_bandproperty of anEigenModeSource) with a negative propagation constantfields::get_eigenmode:meep/src/mpb.cpp
Lines 649 to 661 in b065eae
This missing property of
DiffractedPlanewavesources is necessary for the adjoint solver (#2054).(Note: for mode decomposition, obtaining the mode coefficient for the$-\beta$ mode is simply a matter of choosing the second of two elements of the third dimension of the
alphaarray returned byget_eigenmode_coefficient.)