[petsc-users] DMShellSetCreateRestriction

Boris Kaus kaus at uni-mainz.de
Sat Mar 12 03:51:40 CST 2016


> Other suggestions on how to best integrate staggered finite differences within the current PETSc framework are ofcourse also highly welcome. 
> Our current thinking was to pack it into a DMSHELL (which has the problem of not having a restriction interface). 
> 
> 
> Using DMShell is the cleanest approach.
> 
> An alternative is to have you user code simply take control of all of the configuration of the PCMG object. E.g. you call your user code which creates the restriction operator, you pull out the PC and call PCMGSetRestriction() on etc. This can be done easily performed in the context of linear problems. For non-linear problems, you could jam this setup code inside your ComputeJacobian function.
> 
> This is all possible, albeit clunky and kinda ugly. It works though if you need something before Barry adds the required support in PCMG.
> 
that is indeed what we currently do, which does work. 
Yet, as you say, it is clunky and does not allow setting up things like FAS in an easy manner, or add new physics to the code in a straightforward manner.
Having a cleaner interface would be really nice.

Boris

> Cheers
>   Dave
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160312/bd8578bf/attachment.html>


More information about the petsc-users mailing list