[petsc-users] Multigrid as a preconditioner

Jed Brown jedbrown at mcs.anl.gov
Wed May 30 14:13:34 CDT 2012


On Wed, May 30, 2012 at 1:55 PM, <coco at dmi.unict.it> wrote:

> Dear all,
>
> I have chosen the multigrid as a preconditioner of a Richardson kps solver
> and I have set all the multigrid stuff (smoother, interpolation,
> restriction, coarse solver). When I perform two iterations of the
> Richardson ksp solver (with the option -ksp_max_it 2), which means two
> cycles of the multigrid, I obtain the same result as in the case I perform
> only one iteraton.
>

What do you mean by this?


> I noticed that when the second iteration starts, the initial guess is
> zero, and then it provides the same solution as in the first iteration.
> Anyway, the norm residual printed by the -ksp_monitor option decreases.
>

Run with -ksp_monitor_true_residual


> How can I investigate the problem?
>

I'd start by checking that UserSOR is really SOR (as opposed to somehow
misusing the vectors). Check that it respects a zero initial guess if that
is part of the flag.


> One more detail: the smoother is implemented by a user-provided routine
> UserSOR() which is registered as MATOP_SOR of a shell matrix, which is
> assigned to the ksp smoother. Even if the UserSOR() takes in input a
> MatSORType flag, I do not take care about it inside the routine.
>

The best thing is to check that the option is whatever you expect it to be
and SETERRQ() if it is not. That will reduce confusion down the road.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120530/7c8de7e8/attachment-0001.html>


More information about the petsc-users mailing list