PCNN preconditioner

Barry Smith bsmith at mcs.anl.gov
Thu Feb 26 12:04:24 CST 2009


     I'm sorry there is no example of the use of PCNN. Here is what  
you need to do.
Use MatCreateIS() to create the matrix. Use MatSetValuesLocal() to put  
the values in the matrix
then use PCSetType(pc,PCNN); to set the preconditioner to NN.

    Barry

Note: You cannot just use MatCreateMPIAIJ() to create the matrix  
because it needs the unassembled per processor parts to build the  
preconditioner.
You cannot use MatSetValues() because then it could not have the  
unassembled matrix.


On Feb 26, 2009, at 10:12 AM, Andreas Grassl wrote:

> Hello,
>
> I'm working with a FE-Software where I get out the element stiffness
> matrices and the element-node correspondency to setup the stiffness
> matrix for solving with PETSc.
>
> Currently this is working fine for the seqaij matrix type and  
> connected
> solvers. Now I want to Implement the PCNN preconditioner.
>
> Does anybody have any simple examples with this preconditioner?
>
> Thank you in advance
>
> ando
>
> -- 
> /"\                               Grassl Andreas
> \ /    ASCII Ribbon Campaign      Uni Innsbruck Institut f. Mathematik
>  X      against HTML email        Technikerstr. 13 Zi 709
> / \                               +43 (0)512 507 6091



More information about the petsc-users mailing list