[petsc-users] number of pre- and post- smoothing in multigrid as a preconditioner

coco at dmi.unict.it coco at dmi.unict.it
Wed May 23 18:04:56 CDT 2012


Dear all,

I am using multigrid as a preconditioner and I noticed that if I try  
to perform 2 or more pre (or post) smoothing I obtain the same results  
as I perform just 1 smoothing. The ksp_view output is the following:

[...]

Down solver (pre-smoother) on level 1 -------------------------------
     KSP Object:    (mg_levels_1_)     1 MPI processes
       type: richardson
         Richardson: damping factor=1
       maximum iterations=2, initial guess is zero
       tolerances:  relative=0, absolute=0, divergence=inf
       left preconditioning
       using PRECONDITIONED norm type for convergence test
     PC Object:    (mg_levels_1_)     1 MPI processes
       type: sor
         SOR: type = local_symmetric, iterations = 1, local iterations  
= 1, omega = 1
       linear system matrix = precond matrix:
       Matrix Object:       1 MPI processes
         type: shell
         rows=18522, cols=18522

[...]

Even if maximum iterations=2 and the tolerances are zeros, it performs  
just one iteration. Anyway, the converged reason for the down smoother  
is 4, then it seems it converges with the maximum iterations, but the  
results I obtain are the same as in the case I set 1 pre smoothing.
I implemented the relaxation in a routine UserSOR and I registered it  
as MATOP_SOR for the matrix of the kspSmootherDown context (together  
with a MATOP_MULT).

Finally, the output of the KSPMonitorTrueResidualNorm() for the first  
iteration is:
1 KSP preconditioned resid norm 0.000000000000e+00 true resid norm  
5.094557710929e+02 ||r(i)||/||b|| 2.001351267432e+00

Thank you.
Armando



More information about the petsc-users mailing list