As described in #2538 (comment), there seems to be a bug in the interpolation of the DFT fields to the center of the voxel at $r = 0$ in cylindrical coordinates. This bug appears in cases involving $E_\phi$ and $H_r$ at $r = 0$ for $|m| = 1$ simulation (which have special boundary conditions), e.g get_dft_array and Poynting-flux calculations (via add_flux) in the $z$ direction. It also affects the time-domain fields obtained via get_array since this routine also interpolates fields to the center of the voxel.
For flux calculations involving $r = 0$, a workaround is to compute the flux manually in post processing using a near-to-far field transformation (via add_near2far) since this routine does not involve any interpolation. See #2538 (comment) and the modified function ext_eff_cyl in test_ldos.py of #2538 for an example.
As described in #2538 (comment), there seems to be a bug in the interpolation of the DFT fields to the center of the voxel at $r = 0$ in cylindrical coordinates. This bug appears in cases involving $E_\phi$ and $H_r$ at $r = 0$ for $|m| = 1$ simulation (which have special boundary conditions), e.g
get_dft_array
and Poynting-flux calculations (viaadd_flux
) in the $z$ direction. It also affects the time-domain fields obtained viaget_array
since this routine also interpolates fields to the center of the voxel.For flux calculations involving $r = 0$, a workaround is to compute the flux manually in post processing using a near-to-far field transformation (via
add_near2far
) since this routine does not involve any interpolation. See #2538 (comment) and the modified functionext_eff_cyl
intest_ldos.py
of #2538 for an example.cc @mochen4