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