[petsc-users] PCMG Interpolation/Restriction Defaults

Paul Grosse-Bley paul.grosse-bley at ziti.uni-heidelberg.de
Thu Feb 2 10:09:55 CST 2023


That is great to know! When I read that part of the docs, I thought it would be a big hassle to use geometric multigrid, having to manually define all those matrices.
Thanks again!



On Thursday, February 02, 2023 16:38 CET, Barry Smith <bsmith at petsc.dev> wrote:
     Yes, it pulls the information from the DM. See src/ksp/pc/impls/mg/mg.c the function PCSetUp_MG.  Note this function has become horribly complex with people adding all kinds of crazy ways to set things up, and the code should be refactored to remove the complexity but anyways you'll see things like DMCoarsen(), DMCreateInterpolation() etc used to create what the MG algorithm needs.   Barry  On Feb 2, 2023, at 9:26 AM, Grosse-Bley, Paul <paul.grosse-bley at ziti.uni-heidelberg.de> wrote: The documentation says that

> The multigrid routines, which determine the solvers and interpolation/restriction operators that are used, are mandatory.

But using code that doesn't contain any multigrid-specific routines e.g. ex45 and running it with

-da_grid_x 129 -da_grid_y 129 -da_grid_z 129
-pc_type mg
-pc_mg_type multiplicative
-pc_mg_cycle_type v
-pc_mg_levels 5
...

seems to work fine and also not fall-back to algebraic multigrid/PCGAMG from what I see with -log_view.

What interpolation/restriction operators are used by default with PCMG?
Is it cleverly using the geometric information from DA?

Thanks,
Paul
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230202/19d6fb77/attachment.html>


More information about the petsc-users mailing list