Dear Dr. Yiling and Meep users,
Thank you for your comments. About the first question, I think we can write a 
loop in 
the ctl file or the Unix command-line to update the frequency. Otherwise, the 
working
efficiency is too low by running the ctl file separately. 
I test the Unix command-line,which does not work well. The Unix command-line is
as follows
for x in 'seq a dx b'; do meep x=$x  myfile.ctl; done
what is wrong with this command?
Hope steven can give us some comments about how to write a loop in the ctl file 
and 
Unix command-line to uqdate the frequency. 
Sincerely,
Chen



----- Original Message ----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, August 18, 2008 11:11:49 AM
Subject: meep-discuss Digest, Vol 30, Issue 20

Send meep-discuss mailing list submissions to
    [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
    http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
or, via email, send a message with subject or body 'help' to
    [EMAIL PROTECTED]

You can reach the person managing the list at
    [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of meep-discuss digest..."


Today's Topics:

  1. Re: meep-discuss Digest, Vol 30, Issue 19 (Yiling Qi)
  2. Meep:no match (asadollahbaik a. (aa306))
  3. Re: Meep:no match (matt)
  4. Re: Meep:no match-solved (asadollahbaik a. (aa306))


----------------------------------------------------------------------

Message: 1
Date: Mon, 18 Aug 2008 17:18:23 +0100
From: "Yiling Qi" <[EMAIL PROTECTED]>
Subject: Re: [Meep-discuss] meep-discuss Digest, Vol 30, Issue 19
To: <[email protected]>
Message-ID:
    <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"


Dear Chen,

I think you have to run the program with different frequencies separately. And 
about writing the flux into a file, when you run the program, you could 'tee' 
all results displayed on the screen into a file, then 'grep'.

best wishes
Yiling



-----Original Message-----
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Mon 18/08/2008 17:00
To: [email protected]
Subject: meep-discuss Digest, Vol 30, Issue 19

Send meep-discuss mailing list submissions to
    [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
    http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
or, via email, send a message with subject or body 'help' to
    [EMAIL PROTECTED]

You can reach the person managing the list at
    [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of meep-discuss digest..."


Today's Topics:

  1. how to write a loop to update the frequency and    write the
      flux into a file? (Chen)


----------------------------------------------------------------------

Message: 1
Date: Mon, 18 Aug 2008 05:37:15 +0000 (UTC)
From: Chen <[EMAIL PROTECTED]>
Subject: [Meep-discuss] how to write a loop to update the frequency
    and    write the flux into a file?
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

Dear Steven and Meep users,

I wanna obtain a normalized transmission curves of a periodic geometry. 
Therefore, I have to do multiple simulations for each frequency. My question 
is how to write a loop to update the frequency and write the flux into a file. 
I wrote the loop according to the meep wiki, but it did not work. Would you 
like give me some comments? Thanks a lot.

... ...
(define-param    a    (/ unit 7.0e-007))
(define-param    b    (/ unit 8.0e-007))
(define-param    dx    (/ unit 0.1e-007))
(define-param    fcen    0)
(define    trans    0)

(do ((fcen a (+ fcen dx))) ((> fcen b)) 
(set! sources
  (list
      (make source
        (src (make continuous-src (frequency fcen)))
        (component Ex)
        (center 0 0 (+ (/ sz -2) dpml pad)) (size sx sy 0)
        (amplitude amp)
      )))

(set! symmetries (list (make mirror-sym (direction Y) (phase 1)) ))

(Set! trans
  (add-flux fcen 0 1
      (make flux-region
        (center 0.1 0.2 (- (/ sz 2) dpml pad)) (size 0 0 0) (direction Z))
  ))
(run-until 100)
(print "flux:, "amp", "(first (get-fluxes trans))"\n")
)


Best,
Chen





------------------------------

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

End of meep-discuss Digest, Vol 30, Issue 19
********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://ab-initio.mit.edu/pipermail/meep-discuss/attachments/20080818/4bbf0629/attachment-0001.htm
 

------------------------------

Message: 2
Date: Mon, 18 Aug 2008 17:33:15 +0100
From: "asadollahbaik a. (aa306)" <[EMAIL PROTECTED]>
Subject: [Meep-discuss] Meep:no match
To: "[email protected]" <[email protected]>
Message-ID:
    <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Dear Meep users.

I am doing the transmission and reflection simulation for a pattern consisting 
of randomly oriented hexagonal lattices of dielectric rods in air.

Following the example of transmission and reflection calculation in Meep 
homepage, the simulation has to be performed twice: once when there is no 
structure in between the source and monitors and the other when the structure 
is at the right place between the trans and refl monitors.

My problem is with making this "if" bit to work.
The command I am using is based on the structure below:

(if a?
            (b=1)
            (b=0)
)

"a?" would be the condition confiming the existence of the structure (when set 
to true) or the absence of the structure (when set to false),
B=1 is the commands of making the structure ( set! Geometry ...)
And b=0 sets the empty geometry (set! Geometry '() )

Unfortunately this does not work. It just works when I do not specify "a?" 
which would consider the default condition (a?=false).
When I say for example "a?=true" I get the error :
ERROR: Wrong type to apply: #<unspecified>
Or
            Meep:no match              when I use the university cluster.

I need to use the if-command in this way because I have a very complicated 
geometry definition file.

I guess my problem is more a scheme problem rather than a meep problem. (I am 
not a computer programmer).

I really appreciate your help,
Regards,
Asa,

Asa Asadollahbaik
PhD Research Student

Room 2045, Building 25
University of Southampton
Highfield Avenue
Southampton
SO17 1BJ

Phone Number : 023 8059 8365

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://ab-initio.mit.edu/pipermail/meep-discuss/attachments/20080818/bdfaa781/attachment-0001.htm
 

------------------------------

Message: 3
Date: Mon, 18 Aug 2008 18:59:13 +0200 (CEST)
From: matt <[EMAIL PROTECTED]>
Subject: Re: [Meep-discuss] Meep:no match
To: "asadollahbaik a. (aa306)" <[EMAIL PROTECTED]>
Cc: "[email protected]" <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII






you need to put a "\" in front of "?" in the shell command line,
like this:

~> meep a\?=true file.ctl

That will get rid of the second error.



On Mon, 18 Aug 2008, asadollahbaik a. (aa306) wrote:

> Dear Meep users.
>
> I am doing the transmission and reflection simulation for a pattern 
> consisting of randomly oriented hexagonal lattices of dielectric rods in air.
>
> Following the example of transmission and reflection calculation in Meep 
> homepage, the simulation has to be performed twice: once when there is no 
> structure in between the source and monitors and the other when the structure 
> is at the right place between the trans and refl monitors.
>
> My problem is with making this "if" bit to work.
> The command I am using is based on the structure below:
>
> (if a?
>            (b=1)
>            (b=0)
> )
>
> "a?" would be the condition confiming the existence of the structure (when 
> set to true) or the absence of the structure (when set to false),
> B=1 is the commands of making the structure ( set! Geometry ...)
> And b=0 sets the empty geometry (set! Geometry '() )
>
> Unfortunately this does not work. It just works when I do not specify "a?" 
> which would consider the default condition (a?=false).
> When I say for example "a?=true" I get the error :
> ERROR: Wrong type to apply: #<unspecified>
> Or
>            Meep:no match              when I use the university cluster.
>
> I need to use the if-command in this way because I have a very complicated 
> geometry definition file.
>
> I guess my problem is more a scheme problem rather than a meep problem. (I am 
> not a computer programmer).
>
> I really appreciate your help,
> Regards,
> Asa,
>
> Asa Asadollahbaik
> PhD Research Student
>
> Room 2045, Building 25
> University of Southampton
> Highfield Avenue
> Southampton
> SO17 1BJ
>
> Phone Number : 023 8059 8365
>
>



------------------------------

Message: 4
Date: Mon, 18 Aug 2008 19:13:56 +0100
From: "asadollahbaik a. (aa306)" <[EMAIL PROTECTED]>
Subject: Re: [Meep-discuss] Meep:no match-solved
To: matt <[EMAIL PROTECTED]>
Cc: "[email protected]" <[email protected]>
Message-ID:
    <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Thanks,

I sorted out the other problem as well.

Thanks,
Asa


-----Original Message-----
From: matt [mailto:[EMAIL PROTECTED]
Sent: 18 August 2008 17:59
To: asadollahbaik a. (aa306)
Cc: [email protected]
Subject: Re: [Meep-discuss] Meep:no match






you need to put a "\" in front of "?" in the shell command line,
like this:

~> meep a\?=true file.ctl

That will get rid of the second error.



On Mon, 18 Aug 2008, asadollahbaik a. (aa306) wrote:

> Dear Meep users.
>
> I am doing the transmission and reflection simulation for a pattern 
> consisting of randomly oriented hexagonal lattices of dielectric rods in air.
>
> Following the example of transmission and reflection calculation in Meep 
> homepage, the simulation has to be performed twice: once when there is no 
> structure in between the source and monitors and the other when the structure 
> is at the right place between the trans and refl monitors.
>
> My problem is with making this "if" bit to work.
> The command I am using is based on the structure below:
>
> (if a?
>            (b=1)
>            (b=0)
> )
>
> "a?" would be the condition confiming the existence of the structure (when 
> set to true) or the absence of the structure (when set to false),
> B=1 is the commands of making the structure ( set! Geometry ...)
> And b=0 sets the empty geometry (set! Geometry '() )
>
> Unfortunately this does not work. It just works when I do not specify "a?" 
> which would consider the default condition (a?=false).
> When I say for example "a?=true" I get the error :
> ERROR: Wrong type to apply: #<unspecified>
> Or
>            Meep:no match              when I use the university cluster.
>
> I need to use the if-command in this way because I have a very complicated 
> geometry definition file.
>
> I guess my problem is more a scheme problem rather than a meep problem. (I am 
> not a computer programmer).
>
> I really appreciate your help,
> Regards,
> Asa,
>
> Asa Asadollahbaik
> PhD Research Student
>
> Room 2045, Building 25
> University of Southampton
> Highfield Avenue
> Southampton
> SO17 1BJ
>
> Phone Number : 023 8059 8365
>
>





------------------------------

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

End of meep-discuss Digest, Vol 30, Issue 20
********************************************



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

Reply via email to