PCMGGetSmoother#
Gets the KSP
context to be used as smoother for both pre- and post-smoothing. Call both PCMGGetSmootherUp()
and PCMGGetSmootherDown()
to use different functions for pre- and post-smoothing.
Synopsis#
#include "petscksp.h"
PetscErrorCode PCMGGetSmoother(PC pc, PetscInt l, KSP *ksp)
Not Collective, ksp returned is parallel if pc is
Input Parameters#
pc - the multigrid context
l - the level (0 is coarsest) to supply
Output Parameter#
ksp - the smoother
Note#
Once you have called this routine, you can call KSPSetOperators()
on the resulting ksp to provide the operators for the smoother for this level.
You can also modify smoother options by calling the various KSPSetXXX() options on this ksp. In addition you can call KSPGetPC
(ksp,&pc)
and modify PC options for the smoother; for example PCSetType
(pc,PCSOR
); to use SOR smoothing.
See Also#
PCMG, ``PCMGGetSmootherUp()
, PCMGGetSmootherDown()
, PCMGGetCoarseSolve()
Level#
advanced
Location#
Examples#
src/dm/impls/stag/tutorials/ex4.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages