KSPSetWorkVecs — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# KSPSetWorkVecs

Sets a number of work vectors into a `KSP` object

## Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPSetWorkVecs(KSP ksp, PetscInt nw)

Collective

## Input Parameters

- ksp - iterative context

- nw - number of work vectors to allocate

## Developer Note

This is `PETSC_EXTERN` because it may be used by user written plugin `KSPType` implementations

## See Also

KSP: Linear System Solvers, `KSP`, `KSPCreateVecs()`

## Level

developer

## Location

src/ksp/ksp/interface/iterativ.c

Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages