[petsc-users] direct solver question

Tabrez Ali stali at geology.wisc.edu
Tue Aug 7 12:48:18 CDT 2012


Barry

So which one of the two gives the correct solution? And yes the 
condition number is high.

Actually I am trying to solve a trivial quasi-static problem with the 
following flags

(1) -ksp_type gmres -pc_type asm
(2) -ksp_type gmres -pc_type lu -pc_factor_shift_type nonzero
(3) -ksp_type preonly -pc_type lu -pc_factor_shift_type nonzero

The results at t=0 for all three cases are equivalent.

For the time dependent part (linear system is solved again), results 
from (1) and (2) are the same. But (3) gives a very different answer.

I also solve the same quasi-static problem using a different code (does 
not use PETSc) and the results obtained are similar to (1) and (2).

So basically I am trying to understand why '-ksp_type preonly' gives me 
a (potentially) wrong solution.

Thanks
Tabrez


On 08/07/2012 12:01 PM, Barry Smith wrote:
> On Aug 7, 2012, at 12:06 PM, Tabrez Ali<stali at geology.wisc.edu>  wrote:
>
>> Hello list
>>
>> By any chance is using
>>
>> -ksp_type gmres -pc_type lu
>>
>> similar to
>>
>> -ksp_type preonly -pc_type lu?
>>
>> Should the results be equivalent?
>>
>> T
>     The should be similar but will not be identical necessarily, in particular when the matrix is ill conditioned they can be very different and in fact GMRES may iterate a few times.
>
>     Barry
>


-- 
No one trusts a model except the one who wrote it; Everyone trusts an observation except the one who made it- Harlow Shapley



More information about the petsc-users mailing list