Hi Prof Steven and other Meep users,
I am trying to position multiple source points within a waveguide using a
loop. I have
used the 'let' command, but had no success with it. Can someone please help
me to figure out how to do this? (my ctl code is given below)
Your help is greatly appreciated
Thanks
Geeth
; this code is to test how to set multiple number of source points
; in a waveguide across the width of the waveguide
(define fcen 0.15)
(define df 0.2)
(set! geometry-lattice (make lattice (size 20 10 no-size)))
;(set! geometry (list
; (make block (center 0 0) (size infinity 2 infinity)
; (material (make dielectric (index 3.5))))))
;%% setting source parameters %%
;------------------------------------------------------------------
(set! sources (list
(let loop ((n 1))
(if (<= n 5)
(begin
(make source
(src (make gaussian-src (frequency fcen) (fwidth df) ))
(component Ez) (center 0 n)))
(loop (+ n 1))))))
(set! pml-layers (list (make pml (thickness 1))))
(set! resolution 10)
(use-output-directory)
(run-until 50
(at-beginning output-epsilon)
(to-appended "ez-src" (at-every 1 output-efield-z)))
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss