Dear meep users:
In my posting of June 2, 2008, "Averaging E2 over time period ", the ctl file
had a strange dimension. But even after correcting it, the code does not write
the averaged h5 output correctly. Problem seems to be (output-field function).
Below I wrote a test ctl file, the (output-field-function) part of the code is
copied from discussion archives of Jan 15 2007 (by Prof. Johnson). This run
produces ex-******.h5 and ey-******.h5 O.K. But its sum files esum-******.h5
have only zeros. I cannot figure out what is wrong.
Could someone help me. I am desperate.
Seong Kyu Kim, professor
Departement of Chemistry
Sungkyunkwan Univ.
Suwon, 440-746
Korea
; -----------------------------------------------------------------------------
; Lattice and Boundaries ------------------------------------------------------
(define-param sx 0.1) ; the length of x of the lattice
(define-param sy 0.1) ; the length of y of the lattice
(define-param sz 0.1) ; the length of z of the lattice
(set! geometry-lattice (make lattice (size sx sy sz)))
(set-param! resolution 300)
; -------------------------------------------------------------------------
; Target
(define omega_d 7.05) ; plasma frequency of Au in Drude model
(define Au ; definition of material dispersion
(make dielectric (epsilon 5.967)
(polarizations
(make polarizability
(omega 1e-20) (gamma 5.310E-02)
(delta-epsilon (* (* omega_d omega_d) 1e+40)))
(make polarizability
(omega 2.168) (gamma 3.498E-01)
(delta-epsilon 1.09)))))
; -----------------------------------------------------------------------------
(set! geometry
(list
(make sphere (center -0.008 0 0) (radius 0.006) (material Au))
(make sphere (center 0.008 0 0) (radius 0.006) (material Au))))
(set! sources (list
(make source (src (make continuous-src (frequency 1.8)(fwidth 0.5)))
(component Ex) (center 0 0 (* -0.49 sz)) (size sx sy 0))))
; -----------------------------------------------------------------------------
; Run and outputs -------------------------------------------------------------
(set! filename-prefix false)
(set! output-single-precision? true)
(define-param T 10) ; run until
(define (my-field) (output-field-function "esum" (list Ex Ey ) (lambda (r ex
ey) (+ ex ey))))
(run-until T (at-every 0.5 my-field output-efield-x output-efield-y) )_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss