MGSetLevels

Sets the number of levels to use with MG. Must be called before any other MG routine.

Synopsis

#include "petscmg.h" 
int MGSetLevels(PC pc,int levels,MPI_Comm *comms)
Collective on PC

Input Parameters

pc - the preconditioner context
levels - the number of levels
comms - optional communicators for each level; this is to allow solving the coarser problems on smaller sets of processors

Notes

If the number of levels is one then the multigrid uses the -mg_fine prefix for setting the level options rather than the -mg_coarse prefix.

Keywords

MG, set, levels, multigrid

See Also

MGSetType(), MGGetLevels()

Level:intermediate
Location:
src/sles/pc/impls/mg/mg.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/sles/examples/tutorials/ex20.c
src/snes/examples/tutorials/ex16.c
src/snes/examples/tutorials/ex20.c