Hi all,

I'm trying to do something pretty simple--at every few time increments, I want to store the max intensity value in a given volume to a variable.  I'm able to *print* the max intensity in the volume in a step function, but when I try to do anything like define or define-param in such a function, I get an ERROR: Bad define placement.  Any ideas?  Some code is below:

(define (maxfields)
    (max-abs-field-function (list Ex Ey Ez) intens (volume (center 0 0 -21) (size lx ly 1))))

That works fine, but

(define (storefields)
    (define-param fieldvalue maxfields))

produces the bad define error.

I can run maxfields every 1 time increment, for example, and even add a "print" command to it so that I can see the intensity output every 1 time unit.  I'm stuck on how to define a variable as the result of the max-abs-field-function call.

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

Reply via email to