my system is fedora17 ,guile2.0.6,libctl3.2 maybe meep1.2 have bug under guile2.0.6 在 2012-9-9 上午12:01, <meep-discuss-requ...@ab-initio.mit.edu>写道:
> Send meep-discuss mailing list submissions to > meep-discuss@ab-initio.mit.edu > > 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 > meep-discuss-requ...@ab-initio.mit.edu > > You can reach the person managing the list at > meep-discuss-ow...@ab-initio.mit.edu > > 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 1.2 can not run with oblique plane wave (Simon Huskier) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 8 Sep 2012 22:43:13 +0800 > From: Simon Huskier <husk...@gmail.com> > To: huang bo <abohu...@gmail.com> > Cc: meep-discuss@ab-initio.mit.edu > Subject: Re: [Meep-discuss] meep 1.2 can not run with oblique plane > wave > Message-ID: > <CAF=cZjT3Lzc=oGfNiP= > be4s3wjaxfjp61dpxfbtssyyj9no...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > FYI, the posted control file works fine with meep 1.2.1 on my Debian > Squeeze system. > > meep --version > Meep 1.2.1, Copyright (C) 2005-2012 Massachusetts Insitute of Technology. > Using libctl 3.2.1 and Guile 1.8.7. > > Hope that this will provide some help. > > Simon > > On Sat, Sep 8, 2012 at 1:57 PM, huang bo <abohu...@gmail.com> wrote: > > > the ctl file using the suggested implementations of > > oblique angles ( > > http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg00697.html > ), > > and can work with meep 1.1.1, but can't work under meep 1.2, the error > > message is below: > > > > > > $ meep 45-degree.ctl > > ice-9/psyntax.scm:974:26: In procedure scan: > > ice-9/psyntax.scm:974:26: Syntax error: > > 45-degree.ctl:19:0: source expression failed to match any pattern in form > > (define ((pw-amp k x0) x) (exp (* 0.0+1.0i (vector3-dot k (vector3+ x > > x0))))) > > > > > > the problem seem relate with the define of amp-func : > > > > (define ((pw-amp k x0) x) (exp (* 0+1i (vector3-dot k (vector3+ x x0))))) > > > > > > the ctl file is below: > > > > ; This example creates an approximate TM planewave in vacuum > > ; propagating at a 45-degree angle, by using a couple of current sources > > ; with amplitude exp(ikx) corresponding to the desired planewave. > > > > (define-param s 11) ; the size of the computational cell, not including > PML > > (define-param dpml 1) ; thickness of PML layers > > > > (define sxy (+ s (* 2 dpml))) ; cell size, including PML > > (set! geometry-lattice (make lattice (size sxy sxy no-size))) > > > > (set! pml-layers (list (make pml (thickness dpml)))) > > (set-param! resolution 10) > > > > ; pw-amp is a function that returns the amplitude exp(ik(x+x0)) at a > > ; given point x. (We need the x0 because current amplitude functions > > ; in Meep are defined relative to the center of the current source, > > ; whereas we want a fixed origin.) Actually, it is a function of k > > ; and x0 that returns a function of x ... > > (define ((pw-amp k x0) x) (exp (* 0+1i (vector3-dot k (vector3+ x x0))))) > > > > (define-param fcen 0.8) ; pulse center frequency > > (define-param df 0.02) ; turn-on bandwidth > > (define-param kdir (vector3 1 1)) ; direction of k (length is irrelevant) > > (define k (vector3-scale (* 2 pi fcen) > > (unit-vector3 kdir))) ; k with correct length > > (define kxcos (vector3-x (unit-vector3 k))) ; direction cosine of k in x > > (define kycos (vector3-y (unit-vector3 k))) ; direction cosine of k in x > > > > (set! sources > > (list > > > > ; left > > (make source > > (src (make continuous-src (frequency fcen) (fwidth df))) > > (component Hz) (center (* -0.5 s) (* -0.25 s)) (size 0 (/ s 2)) > > (amp-func (pw-amp k (vector3 (* -0.5 s) (* -0.25 s))))) > > > > ; bottom > > (make source > > (src (make continuous-src (frequency fcen) (fwidth df))) > > (component Hz) (center (* -0.25 s) (* -0.5 s)) (size (/ s 2) > 0) > > (amp-func (pw-amp k (vector3 (* -0.25 s) (* -0.5 s))))) > > > > )) > > > > (use-output-directory) > > > > (define-param T 100) ; run time > > ;(run-until T (at-end output-efield-z)) > > (run-until T > > (at-end (output-png Ex "-Zc dkbluered")) > > (at-end (output-png Ey "-Zc dkbluered"))) > > > > > > > > > > _______________________________________________ > > meep-discuss mailing list > > meep-discuss@ab-initio.mit.edu > > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://ab-initio.mit.edu/pipermail/meep-discuss/attachments/20120908/2edf924f/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss > > End of meep-discuss Digest, Vol 79, Issue 11 > ******************************************** >
_______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss