[petsc-users] PCMG Interpolation/Restriction Defaults

Barry Smith bsmith at petsc.dev
Thu Feb 2 09:38:40 CST 2023


  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 <https://petsc.org/release/docs/manual/ksp/#multigrid-preconditioners> 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/54d5af46/attachment.html>


More information about the petsc-users mailing list