KSPSetOperators

Matthew Knepley knepley at gmail.com
Wed Feb 11 14:02:51 CST 2009


On Wed, Feb 11, 2009 at 1:46 PM, Yixun Liu <enjoywm at cs.wm.edu> wrote:

> Hi,
> In ksp/ex2.c
>
> /*
>     Set operators. Here the matrix that defines the linear system
>     also serves as the preconditioning matrix.
>  */
>  ierr = KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN);CHKERRQ(ierr);
>
> The matrix related with linear system is same with the preconditioning
> matrix, why set the flat to be DIFFERENT_NONZERO_PATTERN?


This flag has to do with whether the PC is reformed. There is a section in
the manual on this.

  Matt


>
> Thanks.
>
-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090211/c65af6ce/attachment.htm>


More information about the petsc-users mailing list