17
$\begingroup$

I'm planning to use multigrid to calulate some eigenvalues and vectors, and I noticed PETSc has high-level support for multigrid. The PETSc documentation says that this part of PETSc should not be used, as it is being replaced soon.

Which other libraries have high-level support for multigrid, and roughly how soon will PETSc release the new multigrid support?

$\endgroup$
1
  • 2
    $\begingroup$ The new MG is there in petsc-dev and works, as does the new GAMG solver. We are waiting to release until we can change every example (and there are hundreds). I would just start to use petsc-dev now. $\endgroup$ Dec 15, 2011 at 23:31

2 Answers 2

7
$\begingroup$

Both PETSc and Trilinos have good algebraic multigrid methods.

deal.II implements geometric multigrid methods for finite element discretizations, see for example the step-16 tutorial program.

$\endgroup$
2
  • 2
    $\begingroup$ PETSc does geometric MG if you use a DMDA (Cartesian) grid since then we know how to construct interpolators and coarse problems. $\endgroup$ Dec 16, 2011 at 19:48
  • $\begingroup$ Update: PETSc does GMG for nested unstructured meshes. Non-nested is available, but the point location could be improved. $\endgroup$ Apr 17, 2020 at 13:38
11
$\begingroup$

PETSc multigrid (as a preconditioner) is quite mature and may be used with any of the KSP (iterative Krylov method) solvers in PETSc by typing:

-pc_type mg

However, this requires that you have some way of generating your coarse levels, such as having structured grids defined by PETSc DA objects, which will be coarsened automatically.

Or, if you want to use algebraic multigrid from the HYPRE package, you can use

-pc_type hypre

Or from the ML package with

-pc_type ml

These are downloaded during the configuration process by appending

--download-hypre=1 --download-ml=1

to your ./configure command line.

The part that is depreciated (for now) is the DMMG framework, which is being replaced by the SNES (nonlinear) FAS solver and better support for handling multilevel discretizations while using either MG or FAS as we speak. The other replacement (for linear problems) is

-pc_type gamg -pc_gamg_type sa

This is a newer code, native in PETSc, highly scalable smoothed-aggregation algebraic multigrid.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.