There's an easier way to do what you want; there exists a special run function called run-k-points that does just that.

There's also a tutorial on how to use run-k-points:
http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial/Band_diagram%2C_resonant_modes%2C_and_transmission_in_a_holey_waveguide#Band_diagram

Kind Regards,
Matt




On Mon, 2 Apr 2007, #YIP CHAN HOE# wrote:

Dear Meep users,

I am rather weak in Scheme programming and couldn't figure out after working a 
few days on this.

I wanted to run Harminv on several k-points in my structure. So I wrote a loop 
to automate the task.

However, I am not successful and Meep reports :
"ERROR: In procedure procedure-property:
ERROR: Wrong type argument in position 1: (#<procedure #f (to-do)> #<procedure #f 
(to-do)>)
"

Earlier, there is no problem without the 'map' loop (it was okay for just one 
k-points).

Can anyone kindly help me on the harminv loop ? Thank you.

.........................

(define k-points (list (vector3 1 0 0)
                      (vector3 0 1 0)
))

(set! k-points (interpolate 10 k-points))

(run-until 500 (at-beginning output-epsilon)
      (after-sources (map (lambda (k1) (harminv Hz k1 fcen df)) k-points))
))

........


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

Reply via email to