1 #include <../src/ksp/ksp/impls/gmres/gmresimpl.h> /*I "petscksp.h" I*/ 2 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. 7 8 Logically Collective 9 10 Input Parameter: 11 . ksp - iterative context obtained from `KSPCreate()` 12 13 Options Database Key: 14 . -ksp_gmres_preallocate - Activates `KSPGmresSetPreAllocateVectors()` 15 16 Level: intermediate 17 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 } 26