Hong,
Thank you for your help.
I have successfully converted PetscScalar* into fftw_complex* by using 
opertator "reinterpret_cast".

Regards,
Mason

Hong Zhang <hzhang at mcs.anl.gov> ??? You can retrieve real and imaginary part 
of a petsc scalar from
PetscRealPart()/PetscImaginaryPart()

See an example at
~petsc/src/ksp/ksp/examples/tutorials/ex11.c

Hong

On Wed, 2 Aug 2006, jiaxun hou wrote:

> Hong Zhang,
>   Thanks for your respones.
>
>     In FFTW3, complex type is set by double[2], and it is very easy to handle.
>   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.
>
>   Regards,
>   Mason
>
> Hong Zhang  ???
>
> Manson,
>
> We don't have support for FFTW3 yet(we are currently developing
> an interface between petsc and FFTW3). How do you use FFTW3 in PETSC?
>
> To build petsc with complex, you need configure petsc with
> '--with-scalar-type=complex'
>
> Hong
>
> On Wed, 2 Aug 2006, jiaxun hou wrote:
>
> > Hi all,
> > I am trying to using the package FFTW3 in PETSC.
> > How can I change type from PetscScalar to complex or double[2]?
> > The documentation seems a bit sketchy.
> >
> > Regards
> > Mason
> >
> >
> >
> > ---------------------------------
> > ????????-3.5G???20M???
>
>
>
>
> ---------------------------------
>  ??????-3.5G???20M??



 __________________________________________________
???????????????
http://cn.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20060803/f5fd2736/attachment.htm>

Reply via email to