DMMGSetSLES

Sets the linear solver object that will use the grid hierarchy

Synopsis

#include "petscda.h"     
#include "petscsles.h"    
#include "petscmg.h"    
int DMMGSetSLES(DMMG *dmmg,int (*rhs)(DMMG,Vec),int (*func)(DMMG,Mat))
Collective on DMMG

Input Parameter

dmmg - the context
func - function to compute linear system matrix on each grid level
rhs - function to compute right hand side on each level (need only work on the finest grid if you do not use grid sequencing

Notes: For linear problems my be called more than once, reevaluates the matrices if it is called more than once. Call DMMGSolve() directly several times to solve with the same matrix but different right hand sides.

See Also

DMMGCreate(), DMMGDestroy, DMMGSetDM(), DMMGSolve()

Level:advanced
Location:
src/sles/utils/damg.c
Index of all SLES routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/sles/examples/tutorials/ex22.c.html
src/sles/examples/tutorials/ex25.c.html