How to set the ksp true residual tolerance on command line

Barry Smith bsmith at mcs.anl.gov
Tue Jul 28 20:28:25 CDT 2009


    This depends on the Krylov solver and if you are using left or  
right preconditioning.  With right preconditioning it always uses the  
true residual norm.
So you can do -ksp_type gmres -ksp_pc_right
Some methods we do not have implemented for right preconditioning,  
like CG, in that case you can use -ksp_type cg -ksp_norm_type  
unpreconditioned
For CG many people prefer the energy norm which you can access with - 
ksp_norm_type natural

-ksp_view should always show which it is using

    Barry

On Jul 28, 2009, at 8:15 PM, Ryan Yan wrote:

> Hi all,
> Is there any way to set a true residual tolerance on command line. - 
> ksp_atol is for preconditioned residual norm only.
>
> Thanks,
>
> Yan



More information about the petsc-users mailing list