On Fri, 04 Dec 2009 12:51:27 +0100, jarunan at ascomp.ch wrote: > > Hi Jed, > > Thanks for the advice. I took a look in PCShellSetApplyRicharson() and > its apply function. > > PetscErrorCode apply (PC pc,Vec b,Vec x,Vec r,PetscReal rtol,PetscReal > abstol,PetscReal dtol,PetscInt maxits) > > b - right-hand-side > x - current iterate > r - work space > > 1. Can I use PCShellSetApplyRicharson() with KSPGMRES? or it is > restrict only for Richardson solver.
Richardson only. > 2. Is x equivalent to xin in PCShellSetApply(pc,apply(PC pc,Vec > xin,Vec xout))? No, preconditioning Richardson is a different beast entirely. > 3. Are b vector is the right hand side specified by user and r the > work vector in the iterations? Yes, r is just work space, you are not required to use it. It's unlikely that you actually want to use Richardson, you should write apply(PC,Vec,Vec). Jed
