[petsc-users] amg from hypre

hxie at umn.edu hxie at umn.edu
Mon Mar 8 13:53:09 CST 2010


When I use  -ksp_monitor_true_residual, I get
-----
1 223 KSP preconditioned resid norm 7.587441767451e-05 true resid norm 
1.919239379677e-07 ||Ae||/||Ax|| 4.636852053066e-07

2 500 500 KSP preconditioned resid norm 2.984438235355e-06 true resid norm 
1.067989408349e-08 ||Ae||/||Ax|| 9.216680867037e-03

3 500 KSP preconditioned resid norm 4.928211668435e-07 true resid norm 
2.134107616561e-09 ||Ae||/||Ax|| 1.995810570512e-01

4 500 KSP preconditioned resid norm 1.251658900301e-07 true resid norm 
3.922169991045e-10 ||Ae||/||Ax|| 1.837856779354e-01

5 500 KSP preconditioned resid norm 4.086703850989e-08 true resid norm 
1.521775833365e-10 ||Ae||/||Ax|| 3.879931422346e-01
------

It is strange to me to get a different true residual by adding the 
following codes:

!--compute the norm of true residual-----
       call MatMult(ptMat,ptSol,ptRes,pterr)
       call VecAXPY(ptRes,-1.0,ptRHS,pterr)
       call VecNorm(ptRes,NORM_2,rmax,pterr)

>Linear solve converged due to CONVERGED_RTOL iterations 223
 >field      1       223   0.414E+00


>I printed the real residuals by computing ||b-Ax||_2  at the last column:

> equation  iter    gm_its    gmres
> --------------------------------------------------------------------------------
>Linear solve converged due to CONVERGED_RTOL iterations 223
 >field      1       223   0.414E+00
>Linear solve did not converge due to DIVERGED_ITS iterations 500
 >field      2      500   0.116E-05
>Linear solve did not converge due to DIVERGED_ITS iterations 500
> field      3       500   0.922E-08
>Linear solve did not converge due to DIVERGED_ITS iterations 500
 >field      4     500   0.182E-08
>Linear solve did not converge due to DIVERGED_ITS iterations 500
 >field      5      500   0.256E-09

Nothing wrong with the inner linear systems. I chose "gmres rtol" as 1.0d-6 
and "gmres atol" as 1.d-10 for the preconditioned system.

>This is the problem. The inner linear systems are just not really being
>solved. Have you looked at
>the convergence (-ksp_monitor)? You can get different nonlinear iteration
>counts this way.
>
>  Matt


More information about the petsc-users mailing list