[petsc-dev] DMPlex Deep Copy?

Matthew Knepley knepley at gmail.com
Thu Jun 25 16:28:32 CDT 2020

On Thu, Jun 25, 2020 at 4:00 PM Jacob Faibussowitsch <jacob.fai at gmail.com>

> Hello All,
> Is there a way to deep copy a plex locally without having to resort to
> DMPlexGetGatherDM and by extension DMPlexGetRedundantDM? I would as much as
> possible like to avoid copying all-to-one -> one-to-all. Originally I was
> using DMClone but have now discovered that this is a shallow copy. I am
> trying to add distinct sections to an existing mesh (not refine) and would
> like the new DM to:
> a. Be distinct from the old one (i.e. not a super or sub dm).
> b. Not “know” about any additions. i.e. the new DM should act as if it was
> brand new.
> c. Carry over any other appended objects such as petscds’es, fe’s, fvm’s,
> labels etc.
> If I had to do it by hand, exactly what can I copy directly and what needs
> to be recomputed, especially in parallel? Getting and setting mesh coords,
> dimension, cones are somewhat straightforward, but what about the SF's,
> PetscSections, and others?

You want




> Best regards,
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> Cell: (312) 694-3391

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/20200625/b5e644bb/attachment.html>

More information about the petsc-dev mailing list