Hi Kevin,
I dont know about the meep reset function, but when I tried to use it
I had some problems.

What I did instead was to create a sm variable that creates different
geometries if set to some values I decide (just use a if statement).
Then, from a bash script a run a loop that every time run meep with
different sm variable and hence different geometries, like this one:

[quote]
#!/bin/bash
for sm in 0 1 2
do
    meep sm=$sm sim_wb.ctl;
done
[/quote]

then, inside the script, I have another variable that append a
different name to the file in the different simulations:

[quote]
(if (= sm 0)
    (define sim_mode "src"))
(if (= sm 1)
    (define sim_mode "skin"))
(if (= sm 2)
    (define sim_mode "tgt"))
...

(to-appended sim_mode (at-every fs (in-point (vector3 -3.5 0 0)
                                                       output-efield-z))
[/quote]

hope it helps :)
ciao!

On Thu, Feb 11, 2010 at 10:55 PM, Kevin Huang <[email protected]> wrote:
> Hi:
>
> I'm running a simulation with a collection of random sources.
> However, I'd like to use the same set of sources with and without the
> structures of interest for normalization.
>
> After I create the source list with:
>
> (define gauss (make gaussian-src (frequency fcen) (fwidth
> fcen)))                                       ; Gaussian source
> (do ((SourceX (/ StripSizeX -2) (+ SourceX 4))) ((<= SourceX (/ StripSizeX
> 2)))                  ; Create source every 4nm
>         (set! sources (append sources
>                                 (list
>                                         (make source
>                                                 (src gauss) (component Ey)
> (center SourceX SourceY)
>                                                 (amplitude (exp (* 0+2i pi
> (random:uniform))))                      ; Random source phase
>                                         )
>                                 )
>                         )
>         )
> )
>
> I run the simulation without the structures and calculate the flux spectra.
> If I want to run a simulation with the structures using the same set of
> random phase sources, can I simply do
>
> (reset-meep)
> then modify the structure and run the simulation again?
>
> Or does (reset-meep) also resets the source list?
>
> Thank you.
>
> Regards,
> Kevin CY Huang
>
>
>
> _______________________________________________
> meep-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>



-- 
Matteo Bassi, PhD Student
Department of Information Engineering
University of Padova

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

Reply via email to