Matrix Dense for CG

Barry Smith bsmith at
Tue Jun 16 19:11:14 CDT 2009

   Are you asking for sample dense matrices that CG has difficulty  
with or are you asking for an example code that shows how to use CG on  
a dense matrix in PETSc. If the later, it is the same as the other  
examples, KSPCreate(), KSPSetType(ksp,KSPCG). KSPSetOperators() the  
only difference is using MatCreateSeqDense() or MatCreateMPIDense().


On Jun 13, 2009, at 12:31 PM, Santolo Felaco wrote:

> Hi,
> someone has some examples where the CG is used with a dense matrix?
> I need a system difficult to solve with the CG
> Thank you.
> S.F.

More information about the petsc-users mailing list