Barry,<br>Thank you very much. <br>As long as a complex number (PetscScalar) is simply a double [2], I can use the <font size="-1">operator</font> "reinterpret_cast" to caste them. And it seems to be working fine now.<br><br>Regards,<br>Mason<br><br><b><i>Barry Smith <bsmith@mcs.anl.gov></i></b> 写道:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br> Mason,<br><br> A complex number (PetscScalar) is simply a double [2]. So you can either<br>1) use complex PETSc and caste the arrays when you pass to fftw or<br>2) user PETScScalar of simply double and pass those beasts to fftw.<br><br> Unless YOUR code is using complex numbers then you should simply use<br>2 and all is easy.<br><br> Barry<br><br><br>On Wed, 2 Aug 2006, jiaxun hou wrote:<br><br>> Satish,<br>> Thanks for your response .<br>> I am sorry for my confusing description. In fact , I did use the configure
option<br>> --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?<br>><br>> Regards,<br>> Mason<br>><br>> Satish Balay <balay@mcs.anl.gov> 写道:<br>> use the configure option<br>><br>> --with-scalar-type=complex<br>><br>> Satish<br>><br>> On Wed, 2 Aug 2006, jiaxun hou wrote:<br>><br>>> Hi all,<br>>> I am trying to using the package FFTW3 in PETSC.<br>>> How can I change type from PetscScalar to complex or double[2]?<br>>> The documentation seems a bit sketchy.<br>>><br>>> Regards<br>>> Mason<br>>><br>>><br>>><br>>> ---------------------------------<br>>> 抢注雅虎免费邮箱-3.5G容量,20M附件!<br>><br>><br>>
---------------------------------<br>> 抢注雅虎免费邮箱-3.5G容量,20M附件!</balay@mcs.anl.gov></blockquote><br><p> 
                <hr size=1><a href="http://music.yahoo.com.cn/?source=mail_mailbox_footer" target=blank>
Mp3疯狂搜-新歌热歌高速下
</a>