> On Aug 21, 2015, at 11:20 PM, Jed Brown <[email protected]> wrote:
> 
> Barry Smith <[email protected]> writes:
>>> Do you think it would make sense for DMTSSetIFunction/Jacobian to
>>> clean-out all the KSP/SNES functions?
>> 
>>   Yes
> 
> Is this a viable replacement for the dmActive flag?  

   This is a good idea. I've tried to implement it but run into a snag. With 
PCMG the outer KSP and the pre and post smoother on the finest level all share 
the same DM, but only the outer KSP should be using the computerhs() and 
computematrix() methods. The dmActive flag which is associated with a KSP is 
how the KSP knows if to utilize the DMKSP functions or not in this case.

   I've love to get rid of the added complexity of the dmActive flag but in 
this case it would be mean duplicating the DM for the finest level, which could 
be very heavy weight.  In other cases, since a new DM is created, for example 
coarser meshes or subdomains or selected fields the DMKSP function pointers for 
those new objects can be set to null; but this special case (PCMG finest level) 
breaks the model of the other ones.

   Barry



> If so, I'd rather
> have the higher level DM*Set*Function clean/set the lower level callbacks.

Reply via email to