Problem with MatMatMultTranspose (con'd)

zhifeng sheng z.sheng at ewi.tudelft.nl
Thu Oct 23 09:36:58 CDT 2008


Hi

I have implemented the conjugate transpose, and it totally works for 
complex matrices.

thanks for your help. but I think if you could just overload the 
transpose function of complex matrices as conjugate transpose then
every solver should work on complex matrices automatically. Plus, I 
don't think it is meaningful to compute the transpose of a complex matrix

thanks
Best regards
Zhifeng

Barry Smith wrote:
>
> On Oct 22, 2008, at 9:15 AM, zhifeng sheng wrote:
>
>> Dear all
>>
>> suppose I have a complex matrix (Hermitian positive definite) to 
>> solve, which KSP solver(s) can support solving it?
>> PS: for this moment, I don't need to take into account that the 
>> matrix is hermitian.
>>
>
> KSPCG and use KSPCGSetType(ksp,KSP_CG_HERMITIAN )
>
>> By the way, if I really need conjugate transpose function for complex 
>> matrices, must I implement it myself?
> yes
>
>>
>> (I mean, is there any function that I can make use of?)
>>
>> Thanks
>> Best regards
>> Zhifeng
>>
>> Barry Smith wrote:
>>>
>>>   There is only support for CG with Hermitian transpose, ksp_cg_type 
>>> symmetric or hermitian, KSPCGSetType()
>>> the others only support complex, no Hermitian transpose.
>>>
>>>   Barry
>>>
>>> On Oct 22, 2008, at 2:40 AM, zhifeng sheng wrote:
>>>
>>>> Hi,
>>>>
>>>> you mean the conjugate transpose for complex matrix is not supported?
>>>>
>>>> then how can you implement the iterative solvers for complex 
>>>> matrices? because, some iterative solvers need it.
>>>>
>>>> Thanks
>>>> Best regards
>>>>
>>>>
>>>>
>>>> Hong Zhang wrote:
>>>>>
>>>>> Zhifeng,
>>>>>
>>>>> We do not have support for matrix operations on Hermitian matrix yet.
>>>>> Hong
>>>>>
>>>>> On Mon, 20 Oct 2008, zhifeng sheng wrote:
>>>>>
>>>>>> Dear all
>>>>>>
>>>>>> I am using this MatMatMultTranspose function for complex 
>>>>>> matrices, but it seems to be doing something weird.
>>>>>>
>>>>>> for instance, if I have complex matrix A, and I compute A^T*A 
>>>>>> with this function, it does not generate a Hermitian 
>>>>>> <http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatIsHermitian.html> 
>>>>>> matrix.
>>>>>>
>>>>>> I am thinking that maybe the function take the transpose of A 
>>>>>> instead of the conjugate transpose ....
>>>>>>
>>>>>> Do you know how I can get an A^H*A instead of A^T*A for complex 
>>>>>> matrices?
>>>>>>
>>>>>> Thanks a lot
>>>>>> Best regards
>>>>>> Zhifeng
>>>>>> <http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatIsHermitian.html> 
>>>>>>
>>>>>
>>>>
>>>
>>
>




More information about the petsc-users mailing list