Barry,
Thank you very much. 
As long as a complex number (PetscScalar) is simply a double [2],  I can  use 
the operator "reinterpret_cast" to caste them. And it seems to be working fine 
now.

Regards,
Mason

Barry Smith <bsmith at mcs.anl.gov> ??? 
   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  ???
>  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???

                
---------------------------------
 Mp3???-???????   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20060803/741eb2ec/attachment.htm>

Reply via email to