Hello all,

I am trying to write a ctl file that will allow me to change the 
filename prefix using a command line parameter.  I want to do a series 
of simulations that compute the reflected flux from a variety of 
material systems, but all using the same reference run.  My plan is to 
write the ctl file such that all of the material parameters are 
(define-param var value), then write a bash script that will run through 
all of the different cases by calling meep from the command line and 
piping the data out.  I need two things to accomplish this that are 
giving me trouble.  The first is, I would like the output files for each 
run to go to their own directory, so I need to either change 
filename-prefix or pass some string that can be evaluated in 
(use-output-directory).  As of now, I can't get a string to be passed in 
via the command line.  I have tried the following

In the .ctl file
(define-param output_dir "")
(set! filename-prefix dir)


On the command line
meep output_dir=reference ......

This returns an Unbound Variable: reference

On the command line
meep output_dir="reference"

This also returns an Unbound variable: reference

I also tried in the .ctl
(define-param output_dir (get-filename-prefix))
(set! filename-prefix dir)

On the command line I repeated the above commands with the same 
results.  Does anyone know how to do this?

My second issue is I need to have each each instance of the simulation 
call the same reference file, and I want to store that reference file in 
the above mentioned reference directory.  When I use the command 
(load-minus-flux "refl-flux" refl) can I use (load-minus-flux 
"/reference/refl-flux" refl) ?  Right now I have a soft link pointing 
from the standard output directory to the reference directory, but I 
feel uncomfortable with this as it's still possible to overwrite the 
reference flux.  I want to ensure that I can't overwrite it by accident. 

Thanks for you help,
Nathan Huntoon

_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to