How to set the ksp true residual tolerance on command line

Ryan Yan vyan2000 at gmail.com
Tue Jul 28 21:18:22 CDT 2009


Barry, thank you very much for the suggestion and the clarification.

Yan


PS: It should be -ksp_right_pc, instead of -ksp_pc_right:

-ksp_monitor_draw_true_residual: Monitor graphically true residual norm
(KSPMonitorSet)
  -ksp_monitor_range_draw: Monitor graphically preconditioned residual norm
(KSPMonitorSet)
  Pick at most one of -------------
    -ksp_left_pc: Use left preconditioning (KSPSetPreconditionerSide)
    -ksp_right_pc: Use right preconditioning (KSPSetPreconditionerSide)
    -ksp_symmetric_pc: Use symmetric (factorized) preconditioning
(KSPSetPreconditionerSide)
  -ksp_compute_singularvalues: Compute singular values of preconditioned
operator (KSPSetComputeSingularValues)
  -ksp_compute_eigenvalues: Compute eigenvalues of preconditioned operator
(KSPSetComputeSingularValues)




On Tue, Jul 28, 2009 at 9:28 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090728/558c6eac/attachment.htm>


More information about the petsc-users mailing list