[petsc-dev] Issues trying to DM-ificate PetIGA

Barry Smith bsmith at mcs.anl.gov
Sat Aug 22 19:58:38 CDT 2015


> On Aug 21, 2015, at 11:20 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at mcs.anl.gov> 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.




More information about the petsc-dev mailing list