On May 9, 2008, at 7:58 AM, Simon J. Bale wrote:
> I would like meep to monitor the field in a specific cell and output
> the
> value of the field and current time step at each iteration. I can
> see it's
> possible to output the field in all cells using the output-Xfield-x
> function, is there a way to modify this function to just monitor a
> single
> cell? Is it possible to output the data into a simple text file
> rather than
> the HDF5 format?
Yes. Just write a step function that gets the value of the field and
prints it to standard output, and then grep for this after the run.
For example:
(define ((print-field-pt c pt))
(print "field-at-pt:, " (meep-time) ", " (get-field-pt c pt) "\n"))
And then do e.g.
(run-until 100 (print-field-pt Ez (vector3 0 0 0))
to print the Ez field at the origin at each time step.
Steven
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss