linear solver for complex matrix

zhifeng sheng z.sheng at
Mon Oct 27 10:11:37 CDT 2008

Dear all

It looks like something strange is going on for my Petsc (which was 
built with '--with-scalar-type=complex'.):

1) I got a complex system of equation, with I can solve with CG+SOR . 
But when I try to use BICGS+SOR to solve it, it never converges.

2) I noticed that the transpose function for complex matrices was not  
what I was looking for. It really computes the transpose instead of the 
conjugate transpose which is the "right transpose" for complex matrix.

For some linear solvers, e.g. BICG, BCGS, need to compute the transpose 
of real system matrix (to multiply it with a vector),  while they need 
to compute the conjugate transpose for complex system matrices.

So I am wondering whether BICGS+SOR did not converge for my complex 
matrix because of a bad A^Tx used internally in these linear solvers. 
Such problem does not exist for CG+SOR, therefore, CG+SOR converged.

PS: I sent some emails about this problem before, but I guess I did not 
make myself clear :o

Thanks a lot
Best regards
Zhifeng Sheng

Hong Zhang wrote:
> Zhifeng,
> Petsc's linear solvers, including
> the external packages (e.g., superlu, mumps, and spooles)
> all support complex precision,
> simply configure petsc library with
> '--with-scalar-type=complex'.
>> How can I make the other linear solvers work for complex system? I 
>> think if only I can make the transpose function a little different 
>> then they should work. but I don't know where I should start.
>> Did anyone have similar problem with the linear solvers for complex 
>> system before (the linear solver for complex system needs conjugate 
>> transpose)? and how could you solve it?
> Why do you need conjugate transpose for using petsc solver?
> Do you develop your onw solver for Hermitian matrix?
> We do not have some basic matrix operations for Hermitian matrix yet,
> e.g., MatMult_Hermitian() when only half of the matrix entries
> are stored. You need implement this operation for your onw
> solver.
> If you use petsc AIJ matrix format, all complex linear solvers
> should work. Storing half of entries is not as efficient
> as entire matrix when you have sufficient memory space.
> Hong
>> Thanks a lot
>> Best regards
>> Zhifeng Sheng

More information about the petsc-users mailing list