# MatSetNearNullSpace#

attaches a null space to a matrix, which is often the null space (rigid body modes) of the operator without boundary conditions This null space will be used to provide near null space vectors to a multigrid preconditioner built from this matrix.

## Synopsis#

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


Logically Collective on mat

## Input Parameters#

• mat - the matrix

• nullsp - the null space object

## Notes#

Overwrites any previous near null space that may have been attached

You can remove the null space by calling this routine with an nullsp of NULL

## See Also#

MatNullSpace, MatCreate(), MatNullSpaceCreate(), MatSetNullSpace(), MatNullSpaceCreateRigidBody(), MatGetNearNullSpace()

advanced

## Location#

src/mat/interface/matrix.c

Edit on GitLab