[petsc-dev] PCGAMG: set default type (AGG); PCSetUp_GAMG crashes if not set
    Matthew Knepley 
    knepley at gmail.com
       
    Wed Oct 30 11:02:01 CDT 2013
    
    
  
On Wed, Oct 30, 2013 at 10:49 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Matthew Knepley <knepley at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131030/c53cd929/attachment.html>
    
    
More information about the petsc-dev
mailing list