Hallo Robert,

This is how I do it:

(define defaultport (current-output-port))
(define port1 (open-output-file "filename.txt"))
(set-current-output-port port1)

(display-fluxes fluxInside ScatOutside AbsInside)

(set-current-output-port defaultport)
(close-output-port port1)

This procedure opens a file, set the output port to this file and prints 
the fluxes with display-fluxes. Then it sets the output port back to 
default and closes the file. It works also well with meep-mpi. It can be 
used also to print other stuff to a file.

Best Regards,
Andreas





Robert Rehammar schrieb:
> Dear Meep users,
> 
> I am running meep-mpi and now I would like to output the result from a
> flux-plane computation to a file. How do I do this? I would like not to
> use display-fluxes since I use this already for some other fluxplanes
> and I have a set of scripts that are matched to do post processing of
> this which will be confused if more data is added there. So idealy I
> would like to do something like the scheme construct
> (define p (open-input-file "out.txt"))
> and then print to this. But first I do not know how to handle the
> fluxplanes datastructure (that is, how to output it w.o. display-
> fluxes), and further I do not know how to get only one process to print.
> Can I use the (meep-my-rank)? Are all processes aware of the content of
> a particular fluxplane?
> 
> Regards,
> Robert Rehammar
> 


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

Reply via email to