[petsc-dev] PETSc MG Solvers vs agmg
Mark F. Adams
mark.adams at columbia.edu
Tue May 1 09:36:30 CDT 2012
On May 1, 2012, at 9:40 AM, Barry Smith wrote:
>
> On May 1, 2012, at 8:34 AM, Dave Nystrom wrote:
>
>> I have a 2d resistive mhd code that has an interface to both agmg and various
>> multigrid solvers available from PETSc including gamg, hypre and ml. I'm not
>> that familiar with multigrid and so it is difficult for me to know how to
>> experiment with the various mg packages and tune them to my particular
>> problems. In my code, agmg is a stand alone solver. I have a couple of
>> questions.
>>
>> 1. Is it possible to use the PETSc mg solvers effectively without an
>> iterative method by choosing preonly as the iterative method - like I do for
>> the PETSc direct solves?
>
> Use -ksp_type richardson Note that using -ksp_type preonly would result in only 1 iteration of the multigrid method and hence not what you want.
>
> Note that algebraic multigrid methods are generally designed to be used with a Krylov accelerator and convergence may suffer (i.e. it will take longer or not even converge) without a Krylov accelerator. Though, of course, experimenting to find the fastest is a good idea.
I would disagree here, at least on philosophy if not in practice. All MG methods are really designed to _not_ use Krylov in the sense that you want "textbook" efficiency, in which case Krylov is not going to help. In practice its hard to get AMG working perfectly and Krylov is _very_ useful. Its been over a decade since I've looked at this but I've seen unstructured elasticity problems with my AMG solver converge almost as fast with Richardson as CG. But Krylov is often/usually a big win and has very little extra cost compared to an AMG preconditioner so we all just use it all the time and don't think about it.
So I would definitely start with using Krylov, but once/if you get AMG running well I'd be interested in seeing a comparison with Richardson.
Mark
>
>>
>> 2. Is anyone on this list sufficiently familiar with agmg and the other
>> PETSc mg solvers to know how to configure the PETSc mg solvers to work more
>> like agmg? It seems that agmg gives better performance than the PETSc mg
>> solvers but I also have issues with agmg including fragility.
>
> Please send a link for information on agmg; I've never heard of that.
>
> Barry
>
>>
>> Thanks,
>>
>> Dave
>
>
More information about the petsc-dev
mailing list