2: #include src/ksp/ksp/impls/gmres/gmresp.h 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. 11: Collective on KSP 13: Input Parameter: 14: . ksp - iterative context obtained from KSPCreate 16: Options Database Key: 17: . -ksp_gmres_preallocate - Activates KSPGmresSetPreAllocateVectors() 19: Level: intermediate 21: .keywords: GMRES, preallocate, vectors 23: .seealso: KSPGMRESSetRestart(), KSPGMRESSetOrthogonalization() 24: @*/ 25: PetscErrorCode KSPGMRESSetPreAllocateVectors(KSP ksp) 26: { 27: PetscErrorCode ierr,(*f)(KSP); 30: PetscObjectQueryFunction((PetscObject)ksp,"KSPGMRESSetPreAllocateVectors_C",(void (**)(void))&f); 31: if (f) { 32: (*f)(ksp); 33: } 34: return(0); 35: }