xref: /petsc/src/ksp/ksp/impls/gmres/gmpre.c (revision feff33ee0b5b037fa8f9f294dede656a2f85cc47)
1 
2 #include <../src/ksp/ksp/impls/gmres/gmresimpl.h>       /*I  "petscksp.h"  I*/
3 
4 /*@
5     KSPGMRESSetPreAllocateVectors - Causes GMRES and FGMRES to preallocate all its
6     needed work vectors at initial setup rather than the default, which
7     is to allocate them in chunks when needed.
8 
9     Logically Collective on KSP
10 
11     Input Parameter:
12 .   ksp   - iterative context obtained from KSPCreate
13 
14     Options Database Key:
15 .   -ksp_gmres_preallocate - Activates KSPGmresSetPreAllocateVectors()
16 
17     Level: intermediate
18 
19 .keywords: GMRES, preallocate, vectors
20 
21 .seealso: KSPGMRESSetRestart(), KSPGMRESSetOrthogonalization(), KSPGMRESGetOrthogonalization()
22 @*/
23 PetscErrorCode  KSPGMRESSetPreAllocateVectors(KSP ksp)
24 {
25   PetscErrorCode ierr;
26 
27   PetscFunctionBegin;
28   ierr = PetscTryMethod(ksp,"KSPGMRESSetPreAllocateVectors_C",(KSP),(ksp));CHKERRQ(ierr);
29   PetscFunctionReturn(0);
30 }
31 
32