#include "petscksp.h" PetscErrorCode KSPSetComputeInitialGuess(KSP ksp,PetscErrorCode (*func)(KSP,Vec,void*),void *ctx)Logically Collective
| ksp | - the KSP context | |
| func | - function to compute the initial guess | |
| ctx | - optional context |
func(KSP ksp,Vec x,void *ctx)
| ksp | - the KSP context | |
| x | - solution vector | |
| ctx | - optional user-provided context |
Notes: This should only be used in conjunction with KSPSetComputeRHS(), KSPSetComputeOperators(), otherwise call KSPSetInitialGuessNonzero() and set the initial guess values in the solution vector passed to KSPSolve().