Usually it is best just to look at the code.

#define KSP_MatMult(ksp,A,x,y)          (!ksp->transpose_solve) ? 
MatMult(A,x,y)                                                            : 
MatMultTranspose(A,x,y) 

  It is only there to allow the same code work to solve with A or the transpose 
system with A'.  Of course with CG it doesn't even need to be used since the 
matrix is symmetric.

   Barry

On Apr 3, 2011, at 7:26 PM, Gaurish Telang wrote:

> Hi 
> 
> What is the difference between KSP_MatMult and MatMult? I am trying to 
> implement a new KSP method and see that all Matrix vector multiplies are done 
> with 
> KSP_MatMult in cg.c which implements the conjugate gradient. 
> 
> Regards,
> 
> Gaurish

Reply via email to