Thanks Steven, that works.

Just a hint I got. The "amplitude()" seems need to be in the exact format in your example.
I have tried amplitude (a +bi) does not work.

regards

On 4/14/06, Steven G. Johnson <[EMAIL PROTECTED]> wrote:
On Fri, 14 Apr 2006, Qi Wu wrote:
>   I would like to create several sources with related phase relationship.
> I want the first source to be a "gaussian-src", and the second one
> is related to the first one by a phase factor exp(i * phi) where phi is
> a phase I know.

Just use the amplitude property of the source, which is a complex number
and can therefore set the phase:

(define gauss (make gaussian-src (frequency f) (fwidth df)))
(set! sources (list (make source (src gauss) (center 0))
                     (make source (src gauss) (center 0)
                                  (amplitude (exp (* 0+1i phi))))))


Steven

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



--
********************************************************************************
wuqi

Department of Electrical & Computer Engineer
University of Colorado -Boulder

Add:    1350 20th St. Apt G-25
           Boulder, CO 80302
Tel:     (303) 786-1580
Cell:    (720) 352-7916
Email:  [EMAIL PROTECTED]  ; [EMAIL PROTECTED]
Msn:    [EMAIL PROTECTED]
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to