# [petsc-users] external solvers

Umut Tabak u.tabak at tudelft.nl
Thu Feb 25 07:53:33 CST 2010

```Jed Brown wrote:
> I misunderstood since you were trying direct solvers like MUMPS (which
> many people run under -ksp_type preonly).
>
>
Dear Jed,

Thanks first of all. I gave a try to direct solvers just to see how they
are performing...
> Normally this shift is only applied as needed within the preconditioner.
> So you have L*L' ~= A+D where D is diagonal (but not usually a multiple
> of the identity).  Since the iterative method still uses A, you should
> still converge to the correct answer, but it may be slow if D ended up
> being large.  One interesting idea that Barry suggested a while back is
> to do a first-order Taylor expansion of inv(A) in terms of inv(A+D),
> something like
>
>     A^{-1} = (A+D-D)^{-1} (A+D) (A+D)^{-1}
>            = [(A+D)^{-1} (A+D-D)]^{-1} (A+D)^{-1}
>            = [I - (A+D)^{-1} D]^{-1} (A+D)^{-1}
>           ~= [I + (A+D)^{-1} D] (A+D)^{-1}
>
> I haven't tried this, but I'd like to hear if it helps.
>
>
An interesting idea, worth trying, and let the list know about that.
That is clear now, the shift is used for the preconditioner.
>
> Is this producing negative eigenvalues?  CG and (incomplete) Cholesky
> assume that the system is positive definite, if your system is
> indefinite, then you will have to investigate other options.
>
Unfortunately, in some kind of iteration loop where I update the
operator matrix and rhs, sometimes eigenvalues might be negative the
first ones, which screws up things...

I am pretty happy that experts are around ;)

Best regards,
Umut
```