[petsc-dev] Multigrid is confusing

Jed Brown jedbrown at mcs.anl.gov
Thu May 24 17:33:03 CDT 2012


Okay, I pushed Cheby(2)+SOR as the default smoother, with Cheby targeting
the interval [0.1*emax, 1.1*emax].

http://petsc.cs.iit.edu/petsc/petsc-dev/rev/234274ab894d
http://petsc.cs.iit.edu/petsc/petsc-dev/rev/3212aa40b0ef  (updating tests)

Its effect on convergence is varied. For smooth elliptic problems, it tends
to be better to target [emax/coarsening_ratio,1.1*emax]. For hyperbolic
problems, it's also often better to target a smaller range because then the
damping region extends further from the real axis.

The default configuration of Chebyshev now does eigenvalue estimation. You
have to (programmatically or via command line) manually set eigenvalues to
avoid estimation. I think that's okay because the old [0.01, 100] wasn't
much use anyway. We'll make the eigenvalue estimation faster/more parallel
later.

I have disabled norms and convergence tests for the smoother by default
because those are extra reductions that are best avoided. If you want to
monitor norms, you have to explicitly turn them on (e.g.
-mg_levels_ksp_norm_type unpreconditioned).

On Wed, May 23, 2012 at 2:52 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Wed, May 23, 2012 at 2:26 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>>  This looks good:
>>
>> $ $base -mg_levels_ksp_type chebyshev
>> -mg_levels_ksp_chebyshev_estimate_eigenvalues 0.1,1.1 -mg_levels_ksp_max_it
>> 2 -mg_levels_pc_type sor
>> lid velocity = 100, prandtl # = 1, grashof # = 10000
>>  Linear solve converged due to CONVERGED_RTOL iterations 10
>>  Linear solve converged due to CONVERGED_RTOL iterations 7
>>  Linear solve converged due to CONVERGED_RTOL iterations 8
>>  Linear solve converged due to CONVERGED_RTOL iterations 8
>>  Linear solve converged due to CONVERGED_RTOL iterations 9
>>  Linear solve converged due to CONVERGED_RTOL iterations 9
>>  Linear solve converged due to CONVERGED_RTOL iterations 8
>>  Linear solve converged due to CONVERGED_RTOL iterations 8
>>  Linear solve converged due to CONVERGED_RTOL iterations 7
>> Number of SNES iterations = 9
>>
>>    I assume it is independent of the number of levels of refinement?
>>
>
> $ $base -da_refine 0 -snes_grid_sequence 5 -mg_levels_ksp_type chebyshev
> -mg_levels_ksp_chebyshev_estimate_eigenvalues 0.1,1.1 -mg_levels_ksp_max_it
> 2 -mg_levels_pc_type sor
> lid velocity = 100, prandtl # = 1, grashof # = 10000
>             Linear solve converged due to CONVERGED_RTOL iterations 13
>             Linear solve converged due to CONVERGED_RTOL iterations 7
>             Linear solve converged due to CONVERGED_RTOL iterations 8
>             Linear solve converged due to CONVERGED_RTOL iterations 9
>             Linear solve converged due to CONVERGED_RTOL iterations 7
>             Linear solve converged due to CONVERGED_RTOL iterations 8
>             Linear solve converged due to CONVERGED_RTOL iterations 10
>             Linear solve converged due to CONVERGED_RTOL iterations 7
>             Linear solve converged due to CONVERGED_RTOL iterations 12
>             Linear solve converged due to CONVERGED_RTOL iterations 8
>             Linear solve converged due to CONVERGED_RTOL iterations 11
>           Linear solve converged due to CONVERGED_RTOL iterations 11
>           Linear solve converged due to CONVERGED_RTOL iterations 11
>           Linear solve converged due to CONVERGED_RTOL iterations 11
>           Linear solve converged due to CONVERGED_RTOL iterations 11
>           Linear solve converged due to CONVERGED_RTOL iterations 11
>         Linear solve converged due to CONVERGED_RTOL iterations 14
>         Linear solve converged due to CONVERGED_RTOL iterations 11
>         Linear solve converged due to CONVERGED_RTOL iterations 11
>         Linear solve converged due to CONVERGED_RTOL iterations 10
>       Linear solve converged due to CONVERGED_RTOL iterations 9
>       Linear solve converged due to CONVERGED_RTOL iterations 8
>       Linear solve converged due to CONVERGED_RTOL iterations 8
>       Linear solve converged due to CONVERGED_RTOL iterations 7
>       Linear solve converged due to CONVERGED_RTOL iterations 8
>     Linear solve converged due to CONVERGED_RTOL iterations 8
>     Linear solve converged due to CONVERGED_RTOL iterations 6
>     Linear solve converged due to CONVERGED_RTOL iterations 7
>     Linear solve converged due to CONVERGED_RTOL iterations 6
>   Linear solve converged due to CONVERGED_RTOL iterations 11
>   Linear solve converged due to CONVERGED_RTOL iterations 7
>   Linear solve converged due to CONVERGED_RTOL iterations 5
>   Linear solve converged due to CONVERGED_RTOL iterations 5
> Number of SNES iterations = 4
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120524/b2a6461e/attachment.html>


More information about the petsc-dev mailing list