1: /*$Id: gmpre.c,v 1.29 2001/04/10 19:36:32 bsmith Exp $*/ 3: #include src/sles/ksp/impls/gmres/gmresp.h 5: /*@ 6: KSPGMRESSetPreAllocateVectors - Causes GMRES to preallocate all its 7: needed work vectors at initial setup rather than the default, which 8: is to allocate them in chunks when needed. 10: Collective on KSP 12: Input Parameter: 13: . ksp - iterative context obtained from KSPCreate 15: Options Database Key: 16: . -ksp_gmres_preallocate - Activates KSPGmresSetPreAllocateVectors() 18: Level: intermediate 20: .keywords: GMRES, preallocate, vectors 22: .seealso: KSPGMRESSetRestart(), KSPGMRESSetOrthogonalization() 23: @*/ 24: int KSPGMRESSetPreAllocateVectors(KSP ksp) 25: { 26: int ierr,(*f)(KSP); 29: PetscObjectQueryFunction((PetscObject)ksp,"KSPGMRESSetPreAllocateVectors_C",(void (**)(void))&f); 30: if (f) { 31: (*f)(ksp); 32: } 33: return(0); 34: }