a question about tolerance
Barry Smith
bsmith at mcs.anl.gov
Tue Sep 15 19:32:07 CDT 2009
On Sep 15, 2009, at 6:04 PM, Ryan Yan wrote:
> Thanks Jed.
>
> And in the term ||Ae||/||Ax||, PETSc impilictly assume that we use
> zero as initial guess and here the x really means exact solution,
> right?
If you call KSPSetInitialGuessNonzero() then PETSc will use the
initial value in x as the initial guess. The default convergence tests
use the ratio of || r_current||/ || b ||. Thus if you start with a
great initial guess it may not iterate much at all. You can use also -
ksp_converged_use_initial_residual_norm
or KSPDefaultConvergedSetUIRNorm() to have it use the ratio of ||
r_current||/|| r_initial|| for the relative convergence test.
You can also provide your own convergence test with
KSPSetConvergenceTest().
Barry
>
> Yan
>
>
>
>
> On Tue, Sep 15, 2009 at 6:41 PM, Jed Brown <jed at 59a2.org> wrote:
> Ryan Yan wrote:
> > But can you say a little more about what happened in the first
> scenario, I
> > did not quite fellow you. Let's say, If I set -ksp_rtol 1e-2, what
> does this
> > mean in the left PC case. More specifically, which term will be
> considered
> > as a stop creteria for the KSP solve.
>
> Look at the first column (preconditioned residual norm). Notice that
> this is decreasing by 1e-2 and 1e-3 respectively in your examples.
>
> Jed
>
>
More information about the petsc-users
mailing list