[petsc-dev] DMPlex Deep Copy?

Jacob Faibussowitsch jacob.fai at gmail.com
Thu Jun 25 14:58:47 CDT 2020

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? 

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
Cell: (312) 694-3391

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200625/57537bc5/attachment.html>

More information about the petsc-dev mailing list