PCShell interface

Matthew Knepley knepley at gmail.com
Wed Jun 10 10:54:41 CDT 2009


If I understand correctly, the objection is that apply for MatShell is

  apply(Mat, Vec, Vec)

and for PCShell is

  apply(ctx, Vec, Vec)

I agree that this is crap. Its an easy fix to jsut pass the PC instead of
the ctx and let the user pull out the ctx manually if he wants. I am for
this.

  Matt

On Wed, Jun 10, 2009 at 9:57 AM, Jed Brown <jed at 59a2.org> wrote:

> With MatShell and the SNES/TS interfaces, the user's callback gets the
> PETSc object, but this is not so in PCShell.  I find this pretty clumsy,
> for example, since there is no PC, the user preconditioner can't call
> PCGetOperators.  This means that in contrast to MatShell, the user
> really can't write first-class PC implementations using PCShell.  It
> also appears that it is not possible to implement PCApplyBAorAB without
> obtaining the operator through some other channel.
>
> Perhaps it's better in the long run to always write a full-blown
> implementation (i.e. copy jacobi.c and modify), but I think it would
> still be more consistent if PCShell passed the PC to the user's
> callbacks.  What do you think?
>
> Jed
>
>


-- 
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-dev/attachments/20090610/a3a30d0a/attachment.html>


More information about the petsc-dev mailing list