[petsc-users] KSP Solver Initial Non Zero Guess
    Barry Smith 
    bsmith at mcs.anl.gov
       
    Mon Jun 17 13:06:39 CDT 2013
    
    
  
   Yes.
   Barry
Normally KSPSolve() zeros the solution vector on entry. If you have called KSPSetInitialGuessNonzero(ksp,PETSC_TRUE) then it skips that zeroing step.
On Jun 17, 2013, at 11:37 AM, Anthony Vergottis <a.vergottis at gmail.com> wrote:
> Dear All,
> 
> If I am solving a linear system uses the KSP solver context i.e. ierr = KSPSolve(ksp,RHS,Solution); and I require an non zero initial guess for the system is it sufficient to call ierr = KSPSetInitialGuessNonzero(ksp,nonzeroguess); and supply the vector 
> Solution with the values I require? will the initial non zero guess be taken as the values I specified in the vector Solution? or is there something else that must be done to achieve this?
> 
> Just need to make sure of this. Thanks in advance for any help.
> 
> Regards,
> Anthony
    
    
More information about the petsc-users
mailing list