回复: Re: 回复: Re: some problems in using PETSC with FFTW3 package
jiaxun hou
jiaxun_hou at yahoo.com.cn
Thu Aug 3 05:13:52 CDT 2006
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>
More information about the petsc-users
mailing list