Re: output field

"Mindy Lee" <[email protected]>
Newsgroups gmane.comp.science.photonic-bands
Message-ID <[email protected]>
Thanks Dr. Johnson!
I tried to run the code but it says ERROR: Unbound variable:
get-filename-prefix

And I can't find this function "output-field-to-file" in the manual...

Can I (set! filename-prefix "emag.")?

Thanks,
Mindy

On Thu, Apr 17, 2008 at 9:22 PM, Steven G. Johnson <[email protected]>
wrote:

> On Apr 17, 2008, at 8:54 PM, Mindy Lee wrote:
> > Dear All,
> >
> > How can MPB output |E| ?
>
> You have to use the lower-level field manipulation functions like
> field-map! that allow you to compute arbitrary functions of the
> fields, and which are (mostly) documented in the manual.
>
> In particular, if you define the functions below, then you can just
> do: (run output-emag)
>
> Regards,
> Steven G. Johnson
>
> (define (get-emag which-band)
>   (get-efield which-band)
>   (let ((emag (rscalar-field-make cur-field)))
>     (field-map! emag
>                 (lambda (f g) (sqrt (real-part (vector3-cdot f g))))
>                 cur-field cur-field)
>     (field-load emag)))
> (define (output-emag which-band)
>   (get-emag which-band)
>   (output-field-to-file -1 (string-append (get-filename-prefix)
> "emag.")))
>
>
>
>
> _______________________________________________
> mpb-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
>

_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.