On Sat, 4 Nov 2006, Loic Le Guyader wrote:
I found, it should be:
(define (mystop)
(let ((decayed (stop-when-fields-decayed 20 Ey endpoint 1e-3)))
(lambda ()
(if (> (meep-time) tt) (decayed) false))))
You probably want to change this to:
(lambda ()
(and (decayed) (> (meep-time) tt)))
You want to ensure that (decayed) is called on every time step, as this is
necessary in order for it to keep track of the maximum field value. (With
your version, it would only keep track of the maximum field value for
times > tt.)
Steven
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss