#include "petscmat.h" PetscErrorCode MatNullSpaceCreate(MPI_Comm comm,PetscBool has_cnst,PetscInt n,const Vec vecs[],MatNullSpace *SP)Collective on MPI_Comm
comm | - the MPI communicator associated with the object | |
has_cnst | - PETSC_TRUE if the null space contains the constant vector; otherwise PETSC_FALSE | |
n | - number of vectors (excluding constant vector) in null space | |
vecs | - the vectors that span the null space (excluding the constant vector); these vectors must be orthonormal. These vectors are NOT copied, so do not change them after this call. You should free the array that you pass in and destroy the vectors (this will reduce the reference count for them by one). |
If has_cnst is PETSC_TRUE you do not need to pass a constant vector in as a fourth argument to this routine, nor do you need to pass in a function that eliminates the constant function into MatNullSpaceSetFunction().