On Wed, Oct 30, 2013 at 10:49 AM, Jed Brown <[email protected]> wrote:

> Matthew Knepley <[email protected]> writes:
> > So the rationale for this is when we change backend types?
>
> Yes, when we changed implementations, we shouldn't be contaminated by
> whatever came before, but if the user does
>
> PCSetType(pc,PCASM);
> PetscObjectComposeFunction(pc,"TheirFunction",TheirFunction);
> PCSetType(pc,PCGAMG);
>
> Their function should not be removed.  Thus the thought of clearing
> based on a prefix.
>
> > Is it worth anything more than a convention? If so, what about just
> having
> > a count in PetscObject that gets checked in the teardown process.
>
> 1. How do we check the convention?  It's very error-prone at present.
>
> 2. See above for why a simple count is not good enough.
>

You can mask it so that it only increments inside Create().

   Matt

-- 
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

Reply via email to