On Nov 5, 2008, at 8:32 AM, M Katzeimasack wrote:
> Earlier I define the function 'one' that should create the phase  
> modulation:
>    complex<double> one (const vec &p) {
>       return ((cos(p.x()*p.x())),sin(p.x()*p.x()));// make parabolic  
> profile according to (e^(i*x^2))   !!!!!!!!!THIS IS THE LINE
>
>    }
>
> however, this function only modulates the real part of the amplitude.

That's not the syntax for complex numbers in C++.  Your function is  
just returning sin(...).

Use complex<double>(a, b)   to return a complex number a+ib.

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

Reply via email to