Thanks. I now figured out what the bug is. It is due to some subtle difference in the storage of Fourier components between MPB and Matlab. In MPB, the sequence is from -N/2+1 to N/2 (assume N is an even number). But in Matlab, the original sequence is from 0 to N-1. After using the command "fftshift", the sequence is then from -N/2 to N/2-1. So in order to correctly reproducing curl operation in Matlab, a one-step circular shift is needed.
-Minghui Han On 10/13/06 7:27 PM, "Steven G. Johnson" <[EMAIL PROTECTED]> wrote: > On Fri, 13 Oct 2006, Minghui Han wrote: >> H field by doing the curl operation in the FFT manner. The discrepancy >> occurs at the media interfaces. So what does MPB really do with the epsilon >> tensor epsilon_inverse? Isn't it right to first multiply each Fourier >> coefficient of H with (k+G) and then do the inverse FFT to transform curl H >> to the spatial domain, and then multiply it with tensor epsilon_inverse to >> get the E field? > > That's correct. If you're trying to do this manually, probably you have a > bug. e.g. you could be using G vectors with all one sign instead of equal > amounts of positive and negative, which would cause high-frequency errors. > Or some other problem. > > (Unless I'm forgetting something tricky about MPB's data output.) > > Steven > > _______________________________________________ > mpb-discuss mailing list > [email protected] > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss _______________________________________________ mpb-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
