KSPGMRESSetPreAllocateVectors — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# KSPGMRESSetPreAllocateVectors

Causes `KSPGMRES` and `KSPFGMRES` to preallocate all its needed work vectors at initial setup rather than the default, which is to allocate them in chunks when needed.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPGMRESSetPreAllocateVectors(KSP ksp)

Logically Collective

## Input Parameter

- ksp - iterative context obtained from `KSPCreate()`

## Options Database Key

- -ksp_gmres_preallocate - Activates `KSPGmresSetPreAllocateVectors()`

## See Also

KSP: Linear System Solvers, `KSPGMRESSetRestart()`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESGetOrthogonalization()`

## Level

intermediate

## Location

src/ksp/ksp/impls/gmres/gmpre.c

## Implementations

KSPGMRESSetPreAllocateVectors_GMRES() in src/ksp/ksp/impls/gmres/gmres.c

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