Currently, the computation of the far fields in cylindrical coordinates involves an integration in $\phi$ (azimuthal angle) which is based on repeatedly doubling a grid of $\phi$ points using a hard-coded initial value:
The value of 4 turns out to be too small in some cases which produces discretization artifacts in the output as demonstrated in #2726 (comment). As such, it would be useful to make the initial number of $\phi$ grid points a user parameter in the routines get_farfield and get_farfields.
Currently, the computation of the far fields in cylindrical coordinates involves an integration in $\phi$ (azimuthal angle) which is based on repeatedly doubling a grid of $\phi$ points using a hard-coded initial value:
https://github.com/NanoComp/meep/blob/04fa3053650d936114b70331e971031c6ae3eb87/src/near2far.cpp#L288-L291
The value of 4 turns out to be too small in some cases which produces discretization artifacts in the output as demonstrated in #2726 (comment). As such, it would be useful to make the initial number of $\phi$ grid points a user parameter in the routines
get_farfield
andget_farfields
.