Hi, Im solving a linear system with different methods for comparison goals. And I want to make Krylov iterative methods work until they reach the predefined value of the *TRUE* residual norm. So Im setting up tolerances (in fact only *atol*) with KSPSetTolerances(KSP, 1.e-50, 1.e-10, PETSC_DEFAULT, PETSC_DEFAULT) and watching for -ksp_monitor (or -ksp_monitor_true_residual). By default most of methods monitor their preconditioned residual norm and stop working then the preconditioned residual norm reaches the predefined value. That of course doesn't mean true residual norm also reached the value.
So I need to change this behavior and use KSPSetNormType(KSP, KSP_NORM_UNPRECONDITIONED) to use unpreconditioned residual or KSPSetPreconditionerSide(KSP, PC_RIGHT) to make preconditioned residual be the same as unpreconditioned and achieve my goal anyway. So what I have: 1) KSPSetNormType(KSP, KSP_NORM_UNPRECONDITIONED) is only supported by CG, RICHARDSON AND CHEBYCHEV (a said in user manual). So as it is expected, CG, RICHARDSON AND CHEBYCHEV print error message: "No right preconditioning for KSPCG, KSPRICHARDSON, KSPCHEBYCHEV!" and work great with KSPSetNormType(KSP, KSP_NORM_UNPRECONDITIONED) Great! 2) Practically the same behavior does KSPLSQR (except the great work, actually it doesn't work at all with my linear system, but I don't care about lsqr) So it's ok. 3) KSPBCGS and KSPBICG don't support right preconditioning, so their true residual norm values cant be set as the finish point for iterating. Am I right? 4) KSPGMRES print error message: "Use right preconditioning -ksp_right_pc if want unpreconditioned norm", when I use it with KSPSetNormType(KSP, KSP_NORM_UNPRECONDITIONED). And works great with KSPSetPreconditionerSide(KSP, PC_RIGHT). As expected. 5) KSPCGS prints no error, when I use it with KSPSetNormType(KSP, KSP_NORM_UNPRECONDITIONED) and works with preconditioned norm. And works great with KSPSetPreconditionerSide(KSP, PC_RIGHT). So it's ok. 6) KSPTFQMR and KSPTCQMR print no errors with any settings and works with preconditioned norm. Is there any methods to make KSPTFQMR use unpreconditioned norm or right preconditioning? Please help me to understand situations 3) and 6) Thank in advance! -- Best regards, Alexey Ryazanov ______________________________________ Nuclear Safety Institute of Russian Academy of Sciences -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110716/9aa1dda9/attachment.htm>
