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