[petsc-dev] Issues trying to DM-ificate PetIGA
Barry Smith
bsmith at mcs.anl.gov
Wed Aug 26 09:58:13 CDT 2015
> On Aug 26, 2015, at 9:19 AM, Jed Brown <jed at jedbrown.org> wrote:
>
> Barry Smith <bsmith at mcs.anl.gov> writes:
>> 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.
>
> Can't this same situation also arise for FAS or nonlinear preconditioning?
Possibly, not sure how it is avoided currently.
>
> Maybe we can't avoid dmActive in SNES as well.
Another alternative is to have inside the DMKSP a pointer to the "active" KSP (make it a void pointer so that there is no circular dependencies) and only use the DMKSP functions if the current KSP is the "active" KSP. Of course now we still need to set this pointer to the appropriate KSP (the first one set with KSPSetDM()? by default). Is there any advantage to this? (Same for snes also).
Barry
More information about the petsc-dev
mailing list