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

KSPCreateVecs

Gets a number of work vectors.

Synopsis

#include "petscksp.h" 
PetscErrorCode KSPCreateVecs(KSP ksp,PetscInt rightn, Vec **right,PetscInt leftn,Vec **left)

Input Parameters

ksp - iterative context Many br
rightn - number of right work vectors Many br
leftn - number of left work vectors to allocate Many br

Output Parameter

right - the array of vectors created Many br
left - the array of left vectors Many br

Note: The right vector has as many elements as the matrix has columns. The left Many brvector has as many elements as the matrix has rows. Many br

The vectors are new vectors that are not owned by the KSP, they should be destroyed with calls to VecDestroyVecs() when no longer needed. Many br

Developers Note: First tries to duplicate the rhs and solution vectors of the KSP, if they do not exist tries to get them from the matrix, if Many brthat does not exist tries to get them from the DM (if it is provided). Many br

Many br

See Also

MatCreateVecs(), VecDestroyVecs()

Level:advanced
Location:
src/ksp/ksp/interface/iterativ.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages