On Nov 20, 2009, at 11:00 PM, Linran Fan wrote:
Thanks the help from someone about the calculation about the reflection. But the sample on the homepage is in ctl and there is a key function, load-minus-flux. But in C there's only load_hdf5. I wonder whether they do the same thing. If not what should I do to make load_hdf5 in C behaves as the load-minus-flux in ctl?


If you look in the meep.scm file, you'll see:

(define (load-flux fname flux)
  (if (null? fields) (init-fields))
  (meep-dft-flux-load-hdf5 flux fields fname "" (get-filename-prefix)))

(define (load-minus-flux fname flux)
  (load-flux fname flux)
  (meep-dft-flux-scale-dfts flux -1.0))

So, load-minus-flux in Scheme is the same as calling dft_flux::load_hdf5 and then calling dft_flux::scale_dfts in C++, where for the latter call you scale by -1.

Steven

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

Reply via email to