Hi Nizamov,

This is how I defined the source in scheme:

(set! sources (list
          (make source
          (src (make gaussian-src (frequency fcen) (fwidth df)))
          (component Ey) (center -1.4 -1.7))))

I already shifted the coordinates. And regardless of the source location, I am 
getting the field at the source point anyway. So I still don't get why the 
amplitude is different.. Please take another look. I think I can definitely get 
some answers from you. :) Thanks a lot.

--
Bin Huang (Bryan)
MIT Graduate Student '10
Computation for Design and Optimization
(+65)98947649
________________________________________
From: Nizamov Shawkat [nizamov.shaw...@gmail.com]
Sent: Friday, October 22, 2010 2:17 AM
To: Bin Huang
Cc: meep-discuss@ab-initio.mit.edu
Subject: Re: [Meep-discuss] gaussian src in scheme and C++

A quick glance at your examples reveals several differences in your examples.

1) In C++ case, the source is very close to the PML area (remember
that origin is in the corner, that's why source at 1.1 is very close
to the PML, which ends at 1.0). In Scheme example source is alsmost in
the center of the cell, far from adsorbing layer.
2) Look's like that you are aware that C++ uses complex fields by
default. But Scheme by default uses real valued fields.

with best regards,
Shawkat Nizamov

2010/10/22, Bin Huang <b...@mit.edu>:
> Hi guys,
>
> I have been trying to implement some example problems from
> http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial/Band_diagram%2C_resonant_modes%2C_and_transmission_in_a_holey_waveguide
> in C++. Most of it works out, however, the amplitude of harminv result in
> the Resonant Mode example is different from what is on the website.
> Therefore, I started to doubt that the initialization of gaussian src is
> different in Scheme and C++. I tried out the simplest problem on C++
> tutorial, which just constructs a gaussian src and run. I simply output the
> field at the source coordinate.
>
> A simple display of the sources constructed in C++ and scheme is here, with
> both programs attached as well.
> https://docs.google.com/fileview?id=0B7K7CoKpx-RcMmU0OGIxNTgtNjE1MC00ZTNjLThhMzEtMDVlYTdmZWVhNWQx&hl=en
>
> The amplitude is the problem here. Anyone has any idea on why the source is
> different in C++ vs Scheme?
>
> Many thanks!
> Bin Huang (Bryan)
> MIT Graduate Student '10
> Computation for Design and Optimization
> (+65)98947649
> _______________________________________________
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>

_______________________________________________
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