#include "petscmat.h" PetscErrorCode MatNullSpaceCreateRigidBody(Vec coords,MatNullSpace *sp)Collective on Vec
Notes: If you are solving an elasticity problems you should likely use this, in conjunction with ee MatSetNearNullspace(), to provide information that the PCGAMG preconditioner can use to construct a much more efficient preconditioner.
If you are solving an elasticity problem with pure Neumann boundary conditions you can use this in conjunction with MatSetNullspace() to provide this information to the linear solver so it can handle the null space appropriately in the linear solution.