On Tue, Mar 5, 2024 at 10:43 PM Adrian Croucher <a.crouc...@auckland.ac.nz> wrote:
> hi Matt, > > I've made a bit of progress with this, using a debugger. > > I wasn't setting the overlap for my dual-porosity DM, so it was > defaulting to zero, and when it got to the DMPlexCheckPointSF() call it > was doing the check for cells in the overlap when it shouldn't have been > (this is only triggered "if (!overlap)"). > > Now I do a DMPlexSetOverlap() to make sure the dual-porosity DM has the > same overlap as the original DM. That gets rid of the error raised in > DMPlexCheckPointSF(), as the overlap is now 1. > > However it is still falling over further on, when it tries to stratify > the redistributed DM: > > [0]PETSC ERROR: Petsc has generated inconsistent data > [0]PETSC ERROR: New depth 2 range [0,141) overlaps with depth 1 range > [0,141) > > [0]PETSC ERROR: #1 DMPlexCreateDepthStratum() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plex.c:4087 > [0]PETSC ERROR: #2 DMPlexStratify() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plex.c:4211 > [0]PETSC ERROR: #3 DMPlexDistributeCones() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c:1164 > [0]PETSC ERROR: #4 DMPlexMigrate() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c:1659 > [0]PETSC ERROR: #5 DMPlexDistribute() at > /home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c:1778 > > I have checked the depth label on my dual-porosity DM for a simple > example in which this error is raised, and the label looks correct to me. > > However I have a memory of trying DMPlexStratify() on my dual-porosity > DMs in the past and it not liking them. I create the depth label by > copying its values from the original DM and then explicitly assigning > depth values for the new dual-porosity cells, vertices, faces & edges. > > When the DM is redistributed I'd have thought it shouldn't be necessary > (at least in my case) to stratify as the depth label is already there > and just needs to be redistributed as well? But I guess that might not > always be the case. > > Has anything changed in this part of the PETSc code recently that might > make this stop working? > The strange part is that I have not changed anything in the depth algorithm. It is very old. Let's do this. Can you send me a dual porosity mesh, and I will figure out why the stratification algorithm does not work? I think you can just output the Plex as binary or HDF5, but you could also give me code that makes one. Thanks! Matt > - Adrian > > -- > Dr Adrian Croucher > Senior Research Fellow > Department of Engineering Science > Waipapa Taumata Rau / University of Auckland, New Zealand > email: a.crouc...@auckland.ac.nz > tel: +64 (0)9 923 4611 > > -- 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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!foavmxCV-MGSYM4r_v-nLq6CwCQa179y7pSTSYY8YORf6SJ8Djlj6C8Kmw-pzdn5t3BFgNYEg1NGGP5yWJ9T$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!foavmxCV-MGSYM4r_v-nLq6CwCQa179y7pSTSYY8YORf6SJ8Djlj6C8Kmw-pzdn5t3BFgNYEg1NGGO4mBoQ0$ >