<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanner2a5yyyb { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton2a5yyyb:hover, .pfptPrimaryButton2a5yyyb:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButton2a5yyyb:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
On Tue, Mar 5, 2024 at 10: 43 PM Adrian Croucher <a. croucher@ 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
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBanner2a5yyyb" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBanner2a5yyyb" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBanner2a5yyyb" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBanner2a5yyyb" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="ltr"><div dir="ltr">On Tue, Mar 5, 2024 at 10:43 PM Adrian Croucher <<a href="mailto:a.croucher@auckland.ac.nz">a.croucher@auckland.ac.nz</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">hi Matt,<br>
<br>
I've made a bit of progress with this, using a debugger.<br>
<br>
I wasn't setting the overlap for my dual-porosity DM, so it was <br>
defaulting to zero, and when it got to the DMPlexCheckPointSF() call it <br>
was doing the check for cells in the overlap when it shouldn't have been <br>
(this is only triggered "if (!overlap)").<br>
<br>
Now I do a DMPlexSetOverlap() to make sure the dual-porosity DM has the <br>
same overlap as the original DM. That gets rid of the error raised in <br>
DMPlexCheckPointSF(), as the overlap is now 1.<br>
<br>
However it is still falling over further on, when it tries to stratify <br>
the redistributed DM:<br>
<br>
[0]PETSC ERROR: Petsc has generated inconsistent data<br>
[0]PETSC ERROR: New depth 2 range [0,141) overlaps with depth 1 range <br>
[0,141)<br>
<br>
[0]PETSC ERROR: #1 DMPlexCreateDepthStratum() at <br>
/home/acro018/software/PETSc/code/src/dm/impls/plex/plex.c:4087<br>
[0]PETSC ERROR: #2 DMPlexStratify() at <br>
/home/acro018/software/PETSc/code/src/dm/impls/plex/plex.c:4211<br>
[0]PETSC ERROR: #3 DMPlexDistributeCones() at <br>
/home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c:1164<br>
[0]PETSC ERROR: #4 DMPlexMigrate() at <br>
/home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c:1659<br>
[0]PETSC ERROR: #5 DMPlexDistribute() at <br>
/home/acro018/software/PETSc/code/src/dm/impls/plex/plexdistribute.c:1778<br>
<br>
I have checked the depth label on my dual-porosity DM for a simple <br>
example in which this error is raised, and the label looks correct to me.<br>
<br>
However I have a memory of trying DMPlexStratify() on my dual-porosity <br>
DMs in the past and it not liking them. I create the depth label by <br>
copying its values from the original DM and then explicitly assigning <br>
depth values for the new dual-porosity cells, vertices, faces & edges.<br>
<br>
When the DM is redistributed I'd have thought it shouldn't be necessary <br>
(at least in my case) to stratify as the depth label is already there <br>
and just needs to be redistributed as well? But I guess that might not <br>
always be the case.<br>
<br>
Has anything changed in this part of the PETSc code recently that might <br>
make this stop working?<br></blockquote><div><br></div><div>The strange part is that I have not changed anything in the depth algorithm. It is very old.</div><div><br></div><div>Let's do this. Can you send me a dual porosity mesh, and I will figure out why the stratification</div><div>algorithm does not work? I think you can just output the Plex as binary or HDF5, but you could</div><div>also give me code that makes one.</div><div><br></div><div> Thanks!</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
- Adrian<br>
<br>
-- <br>
Dr Adrian Croucher<br>
Senior Research Fellow<br>
Department of Engineering Science<br>
Waipapa Taumata Rau / University of Auckland, New Zealand<br>
email: <a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a><br>
tel: +64 (0)9 923 4611<br>
<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!foavmxCV-MGSYM4r_v-nLq6CwCQa179y7pSTSYY8YORf6SJ8Djlj6C8Kmw-pzdn5t3BFgNYEg1NGGO4mBoQ0$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>