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