On Wed, 11 Oct 2006, Andreas von Rhein wrote:
After calling the run function I would like to integrate over a plane. For
testing I've chosen the whole computation area (defined by default).

e.g. I like to integrate the Ey-component:

(define (get-field-point2 where what) (get-field-point what where))
(integrate-field-function Ey  get-field-point2 )

No, you don't need to get the field. Integrate-field-function gets the field for you (and much faster, and in parallel).

The first argument should be a *list* of field components that your integrand depends on. The second argument is a function of position and these field components that gives your integrand.

In your case, this would be:

(define (my-integrand p ey) ey) ; the position vector, p, is not used here
(integrate-field-function (list Ey) my-integrand)

As a more complicated example, if you wanted to integrate the function sin(x) * Ey * Ex, you would do:

(define (another-integrand p ex ey) (* (vector3-x p) ex ey))
(integrate-field-function (list Ex Ey) another-integrand)

Steven

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

Reply via email to