[petsc-dev] On remaining libMesh-PETsc fieldsplit interface cleanup
Matthew Knepley
knepley at gmail.com
Mon Apr 1 20:19:34 CDT 2019
On Mon, Apr 1, 2019 at 9:12 PM Boris Boutkov via petsc-dev <
petsc-dev at mcs.anl.gov> wrote:
> Hello all,
>
> I've been working on the libMesh - PETSc interface for utilizing
> gmg/fieldsplit on the command line by creating DMShells; things are
> seemingly in pretty good shape at this point, so thanks much for the
> support along the way!
>
> The last lingering issue of the implementation is that I still have a
> little bit of dependency on PETSc private/dmimpl.h. In short, during our
> implementation of DMCreateSubDM I try and get some of the parent DMs
> function pointers, specifically dm->ops->{coarsen, refine, createinterpolation,
> createrestriction, and createsubdm}, which then I set for the subDM using
> DMShellSet* by passing in the parent DM pointer directly.
>
> I'd like to remove this private dmimpl.h dependency but removing the
> header gives me compilation errors - "invalid use of incomplete type"
> pointing to PETsc DM struct for the above calls. As far as I understand it,
> this means that I would need public API similar to the DMShellSet* methods
> but now instead DMShellGet*.
>
> If the above's the case, any reason this doesn't exist yet outside of lack
> of prior need? And how much work would introducing this require? Or of
> course please let me know if there's some simple way around this that I may
> be missing.
>
No, we just needed someone to ask. We will do this exactly like we do
MATSHELL. We have to create an Enum that indexes
the DM methods. Then you can pass the Enum value when you Set/Get the
methods. Its not hard, just some coding. Want to try :)
Thanks,
Matt
> Thanks as always for your time,
>
> - Boris
>
>
>
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190401/4c141635/attachment-0001.html>
More information about the petsc-dev
mailing list