On Wed, Jun 10, 2009 at 1:14 PM, Barry Smith<bsmith at mcs.anl.gov> wrote: > > ? Go ahead. This has been on the todo list for a decade. > > ? Remember to update dev.html with the change and change any examples that > use PCShell. > > ? Note you have to update the Fortran stubs for these beasts (some of the > uglier stuff in PETSc.) >
I've asked for this long, long, long ago... What Barry said is pasted below (as my original post was sent to petsc-maint)... I agree that the Fortran issues are a pain, but asking users to follow to the whole beast of implementing a full PC subtype is also a pain (despite I ended up doing that for petsc4py, and decided not to support PCShell). from Barry Smith <petsc-maint at mcs.anl.gov> reply-to petsc-maint <petsc-maint at mcs.anl.gov> to dalcinl at intec.unl.edu.ar cc petsc-maint <petsc-maint at mcs.anl.gov> date Tue, Dec 20, 2005 at 6:47 PM subject Re: [PETSC #14166] SetUp phase with PCShell hide details 12/20/05 The current model for PCShell is that the PC is replaced with the user context for all the methods, apply(), setup() etc. We could change it everywhere to PC? One reason we have the current model is for Fortran users where it is hard to pull something out of a PETSc datastructure. We actually expect people developing their own "serious" PC to implement it directly and use PCRegisterDynamic() to register it, instead of using PCSHELL. Is there a reason you don't want to do it directly (using PCSHELL really isn't any easier, just copy jacobi.c and change it for your new PC). > > ? ?Barry > > On Jun 10, 2009, at 11:09 AM, Jed Brown wrote: > >> Matthew Knepley wrote: >>> >>> If I understand correctly, the objection is that apply for MatShell is >>> >>> ?apply(Mat, Vec, Vec) >>> >>> and for PCShell is >>> >>> ?apply(ctx, Vec, Vec) >> >> Exactly. >> >>> 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. >> >> Great, I can do it. >> >> Jed >> > > -- Lisandro Dalc?n --------------- Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC) Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC) Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET) PTLC - G?emes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594