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

Barry Smith bsmith at mcs.anl.gov
Wed Aug 2 12:12:07 CDT 2006


   Mason,

    A complex number (PetscScalar) is simply a double [2]. So you can either
1) use complex PETSc and caste the arrays when you pass to fftw or
2) user PETScScalar of simply double and pass those beasts to fftw.

   Unless YOUR code is using complex numbers then you should simply use
2 and all is easy.

    Barry


On Wed, 2 Aug 2006, jiaxun hou wrote:

> Satish,
>  Thanks for your response .
>  I am sorry for my confusing description. In fact , I did use the configure option
>  --with-scalar-type=complex when I configuated the system. So, I wonder if it is possible to change the type PetscScalar to some kinds like double[2] which can be handled in FFTW package? Or, is there any functions can get the real (imaginary) parts of a Petsc's Vector?
>
>  Regards,
>  Mason
>
> Satish Balay <balay at mcs.anl.gov> дµÀ£º
>  use the configure option
>
> --with-scalar-type=complex
>
> Satish
>
> 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¸½¼þ£¡


More information about the petsc-users mailing list