回复: Re: 回复: Re: some problems in using PETSC with FFTW3 package

jiaxun hou jiaxun_hou at yahoo.com.cn
Thu Aug 3 05:20:54 CDT 2006


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>


More information about the petsc-users mailing list