petsc-3.7.1 2016-05-15
Report Typos and Errors

MatNullSpaceCreate

Creates a data structure used to project vectors out of null spaces.

Synopsis

#include "petscmat.h" 
PetscErrorCode  MatNullSpaceCreate(MPI_Comm comm,PetscBool has_cnst,PetscInt n,const Vec vecs[],MatNullSpace *SP)
Collective on MPI_Comm Many br

Input Parameters

comm - the MPI communicator associated with the object Many br
has_cnst - PETSC_TRUE if the null space contains the constant vector; otherwise PETSC_FALSE Many br
n - number of vectors (excluding constant vector) in null space Many br
vecs - the vectors that span the null space (excluding the constant vector); Many brthese vectors must be orthonormal. These vectors are NOT copied, so do not change them Many brafter this call. You should free the array that you pass in and destroy the vectors (this will reduce the reference count Many brfor them by one). Many br

Output Parameter

SP -the null space context Many br

Many br

Notes: See MatNullSpaceSetFunction() as an alternative way of providing the null space information instead of setting vecs. Many br

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 Many brneed to pass in a function that eliminates the constant function into MatNullSpaceSetFunction(). Many br

Users manual sections

Section 4.19 Solving Singular Systems - Many br

Keywords

PC, null space, create

See Also

MatNullSpaceDestroy(), MatNullSpaceRemove(), MatSetNullSpace(), MatNullSpace, MatNullSpaceSetFunction()

Level:advanced
Location:
src/mat/interface/matnull.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ksp/ksp/examples/tutorials/ex4.c.html
src/ksp/ksp/examples/tutorials/ex10.c.html
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/ex49.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