What you are seeing is not what you think.  With the code modified as  
you have done, Meep evaluates the dielectric function on the Yee  
lattice without any averaging, just as you want, and the dielectric  
constants will only be 1 and 9.

However, when Meep outputs an HDF5 file, it linearly interpolates from  
the Yee lattice onto a single grid centered at the middle of each  
pixel.  This interpolation is what is creating the intermediate  
epsilon values you are seeing.  So, the only averaging is in the  
output, not internally.

Meep doesn't contain any facility for outputting the internal Yee grid  
directly; in general, to do that it would have to output three  
epsilon .h5 files (or a single .h5 file with three datasets), since  
the Yee grid is really multiple interleaved grids.

Steven

On May 3, 2008, at 1:25 AM, sq wrote:
>
> I have found the anistroptic_averaging.cpp and set “#if 1 // legacy  
> method:
> very simplistic averaging” to “#if 0”. Then, I reinstall the Meep.  
> However,
> there is still an epsilon averaging. Although I set dielectric/  
> dielectric
> material, there is an epsilon averaging, too. Certainly, the result  
> of epsilon
> averaging is different between the “#if 1” and “#if 0”. You can  
> compare it
> with the result in my former email. Are there any methods to fix it?  
> Thanks a
> lot.
>    9.0000
>    9.0000
>    9.0000
>    9.0000
>    9.0000
>    1.4211
>    1.0000
>    1.0000
>    1.0000
>    1.0000

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to