petsc-3.4.2 2013-07-02

# MatSetNullSpace

attaches a null space to a matrix. This null space will be removed from the resulting vector whenever MatMult() is called

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatSetNullSpace(Mat mat,MatNullSpace nullsp)

Logically Collective on Mat and MatNullSpace

### Input Parameters

| mat | - the matrix
| nullsp | - the null space object

### Notes

This null space is used by solvers. Overwrites any previous null space that may have been attached

### See Also

MatCreate(), MatNullSpaceCreate(), MatSetNearNullSpace()

Level:advanced
Location:src/mat/interface/matrix.c
Index of all Mat 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/ex34.c.html
src/ksp/ksp/examples/tutorials/ex50.c.html
src/snes/examples/tutorials/ex7.c.html
src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex62.c.html