Hong,<br>Thank you for your help.<br>I have successfully <font size="-1">converted</font> PetscScalar* into fftw_complex* by using opertator "reinterpret_cast".<br><br>Regards,<br>Mason<br><br><b><i>Hong Zhang <hzhang@mcs.anl.gov></i></b> дµÀ£º<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> You can retrieve real and imaginary part of a petsc scalar from<br>PetscRealPart()/PetscImaginaryPart()<br><br>See an example at<br>~petsc/src/ksp/ksp/examples/tutorials/ex11.c<br><br>Hong<br><br>On Wed, 2 Aug 2006, jiaxun hou wrote:<br><br>> Hong Zhang,<br>> Thanks for your respones.<br>><br>> In FFTW3, complex type is set by double[2], and it is very easy to handle.<br>> But in Petsc, I don't konw exactly how the complex type be set. And when I want to do the fast fourier transform on a Petsc's complex vector by using FFTW3, I get the trouble of the translation between Petsc and
FFTW3.<br>><br>> Regards,<br>> Mason<br>><br>> Hong Zhang <hzhang@mcs.anl.gov> дµÀ£º<br>><br>> Manson,<br>><br>> We don't have support for FFTW3 yet(we are currently developing<br>> an interface between petsc and FFTW3). How do you use FFTW3 in PETSC?<br>><br>> To build petsc with complex, you need configure petsc with<br>> '--with-scalar-type=complex'<br>><br>> Hong<br>><br>> On Wed, 2 Aug 2006, jiaxun hou wrote:<br>><br>> > Hi all,<br>> > I am trying to using the package FFTW3 in PETSC.<br>> > How can I change type from PetscScalar to complex or double[2]?<br>> > The documentation seems a bit sketchy.<br>> ><br>> > Regards<br>> > Mason<br>> ><br>> ><br>> ><br>> > ---------------------------------<br>> > ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ£¡<br>><br>><br>><br>><br>> ---------------------------------<br>>
ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ<br><br></hzhang@mcs.anl.gov></blockquote><br><p> __________________________________________________<br>¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?<br>http://cn.mail.yahoo.com