[petsc-users] [petsc4py] DMPlexCreateFromDAG and other missing functions

Matthew Knepley knepley at gmail.com
Fri Mar 8 12:38:01 CST 2019


On Fri, Mar 8, 2019 at 11:02 AM Chris Finn via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Dear petsc4py experts,
> I'd like to ask why several PETSc functions are not wrapped in petsc4py.
> I'd need to use DMPlexCreateFromDAG from python. Could you explain with
> this function as an example why there is no python wrapper available? Do I
> have to expect severe difficulties when I try this myself - impossible data
> structures, memory management or something else?
>

Lisandro is the expert, but I will try answering. The main problem is just
time. There is no documentation for contributing, but what I do
is copy a function that is pretty much like the one I want. So I think
DMPlexCreateFromCellList() is wrapped, and it looks almost the same.

  Thanks,

    Matt


> Then, if it was just lack of time that prevented these functions from
> being available in petsc4py but if it could be done easily:
> Is the wrapping process of petsc4py documented somewhere? Or do I have to
> browse the sources to get an understanding? Do you use swig, clif,
> boost.python or something else?
>
> Is it possible to write another (small) python extension for the missing
> functions independent from petsc4py that allows me to pass PETSc structures
> back and forth between the two? Or is it necessary to have /one/ complete
> wrapper, because interoperability is not possible otherwise?
>
> regards
> Chris
>
> --
> Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
> https://tutanota.com
>


-- 
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-users/attachments/20190308/bb0bf29a/attachment.html>


More information about the petsc-users mailing list