[petsc-users] ml precondioner

Jed Brown jedbrown at mcs.anl.gov
Thu Jun 14 14:16:29 CDT 2012


On Thu, Jun 14, 2012 at 1:09 PM, Nakib Haider Protik <nprot048 at uottawa.ca>wrote:

> I have a 2 dimensional Poisson problem and the Laplacian is defined on a
> mesh that has both uniform and non-uniform regimes. I am using the
> following command:
>
> -pc_type ml -mg_levels_ksp_type gmres -mg_levels_pc_type lu
>

This does a direct solve on every level, of course it's going to be slow.


>
> This gives a good result. (However, if I don't specify the
> -mg_level_ksp_type and -mg_levels_pc_type to gmres and lu respectively,
> the default are used (richardson and sor respectively). These lead to
> wrong results and the solver is extremely slow.)
>

Are you using petsc-3.3?

Run with -mg_levels_ksp_type chebyshev (and only that). Does that converge
better?


>
> Now, the following method:
>
> -ksp_type gmres -pc_type lu
>
> gives a slightly better result and is faster. The speed difference is
> quite conspicuous for a 501 x 1001 grid size.
>
> According to my limited knowledge, asymmetric matrices are better dealt
> with by gmres and lu. However, multigrid methods are supposed to have O(n)
> complexity. Why is the non-multigrid method doing better in both speed and
> accuracy?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120614/a8361e78/attachment.html>


More information about the petsc-users mailing list