1: #include <../src/ksp/ksp/impls/gmres/gmresimpl.h>
3: /*@
4: KSPGMRESSetPreAllocateVectors - Causes `KSPGMRES` and `KSPFGMRES` to preallocate all its
5: needed work vectors at initial setup rather than the default, which
6: is to allocate them in chunks when needed.
8: Logically Collective
10: Input Parameter:
11: . ksp - iterative context obtained from `KSPCreate()`
13: Options Database Key:
14: . -ksp_gmres_preallocate - Activates `KSPGmresSetPreAllocateVectors()`
16: Level: intermediate
18: .seealso: [](ch_ksp), `KSPGMRESSetRestart()`, `KSPGMRESSetOrthogonalization()`, `KSPGMRESGetOrthogonalization()`
19: @*/
20: PetscErrorCode KSPGMRESSetPreAllocateVectors(KSP ksp)
21: {
22: PetscFunctionBegin;
23: PetscTryMethod(ksp, "KSPGMRESSetPreAllocateVectors_C", (KSP), (ksp));
24: PetscFunctionReturn(PETSC_SUCCESS);
25: }