If it is just a problem with the precise grid, then it should go away as you increase the resolution. If the problem doesn't disappear with increasing resolution, then you have a bug somewhere else.
(However, I'm curious about what you hope to learn from the far field. In a periodic structure, there's not usually anything interesting happening in the far field that you can't easily see/compute directly in the near field as well, since the scattered wave is just a superposition of a set of planewaves at a finite number of diffraction orders.) > On Nov 8, 2020, at 7:47 PM, Mandy Xia <m...@cornell.edu> wrote: > > In my problem, I have a periodic cylinder structure along z-direction and I > would like to compute the scattered field in the far field. Using the > spectral representation of PGF, I'm able to compute, for a particular point > in the simulated period, what the total contribution summing over all the > period is, without an expensive spatial sum. In order to collect all the > contributions from the cylinder, the last step I need is to integrate over > the simulated period and I was trying to rely on the numerical integration > over near-field box in MEEP to handle that. However, I found that the > computed results are off. I suspected this was due to the staggered grid we > are using. I examined the coordinates of the discrete points on the near > field box. For some (x, y) combinations, we have z coordinates going from > -period/2 to period/2 in z and in total an odd number of points. In some > other (x, y) combinations, we have z coordinates going from > -period/2+half_cell to period/2-half_cell and in total an even number of > points. So it seems that in the above two scenarios we are integrating over > different lengths in z. However, in order to get the correct contribution, I > need to integrate over exactly one period of the structure. I'm wondering if > you have any suggestions on this. Or maybe there is something wrong with my > understanding of the staggered grid, and it would be great if you could point > it out.
_______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss