On Sun, 11 Mar 2007, Mischa Megens wrote:
I thought we might try figuring out the units by making the integrand a constant.
Suppose our system is two dimensional, 3 furlong wide and 4 furlong high:
(set! geometry-lattice (make lattice (size 3 4)))
(set! resolution 20)
(init-fields)
(integrate-field-function '() (lambda (x) 1))
This gives 11.6094140625, or almost 3 furlong*4 furlong=12 furlong squared.
It suggests that the units of the integral are the product of the units specified for the cell volume.

Surprisingly, the result for the integral is not quite the same as what one gets by specifying the volume directly: (integrate-field-function '() (lambda (x) 1) (volume (center 0 0) (size 3 4)))
This gives 11.91265625 for me.
And
(integrate-field-function '() (lambda (x) 1) (volume (center 0 0) (size 100 100)))
gives 12.
Ummm.... ?

Yes, there is some funkiness in how it treats the boundary pixels. The default integration volume is something like the computational cell minus one pixel (although that would give 11.653?). When you specify an integration volume larger than the cell, the behavior depends upon whether the cell is periodic (in which case it should integrate over the whole volume you requested, with the fields periodically extended as needed) or not (in which case the volume is truncated).

I would have to look in the code to remember exactly how the volume gets truncated in the non-periodic case. Obviously, it is a little funky. However, in practice I don't think this should matter -- if you have a non-periodic cell, then normally you will have absorbing boundaries and the fields should go to zero at the edges anyway. It certainly shouldn't affect modal-volume calculations.

Steven

_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to