# DMMGSetNullSpace

Indicates the null space in the linear operator (this is needed by the linear solver)

### Synopsis

    #include "petscda.h"
    #include "petscksp.h"
    #include "petscmg.h"
    #include "petscdmmg.h"
    #include "petscpc.h"
    PetscErrorCode PETSCSNES_DLLEXPORT DMMGSetNullSpace(DMMG *dmmg,PetscTruth has_cnst,PetscInt n,PetscErrorCode (*func)(DMMG,Vec[]))

Collective on DMMG

### Input Parameter

| dmmg | - the context
| has_cnst | - is the constant vector in the null space
| n | - number of null vectors (excluding the possible constant vector)
| func | - a function that fills an array of vectors with the null vectors (must be orthonormal), may be PETSC_NULL

### See Also

DMMGCreate(), DMMGDestroy, DMMGSetDM(), DMMGSolve(), MatNullSpaceCreate(), KSPSetNullSpace()

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

### Examples

src/ksp/ksp/examples/tutorials/ex29.c.html
src/ksp/ksp/examples/tutorials/ex32.c.html
src/ksp/ksp/examples/tutorials/ex33.c.html
src/ksp/ksp/examples/tutorials/ex34.c.html
src/snes/examples/tutorials/ex29.c.html