<div dir="ltr"><div dir="ltr">On Mon, Mar 27, 2023 at 6:57 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">
<div>
<p>hi Matt,<br>
</p>
<div>On 28/03/23 00:14, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">Yes, it is a new check. I do not expect
cells that are shared until we create an overlap. We
<div>can just put in a flag to shut it off, since otherwise it
is a great check for finding bugs. Can</div>
<div>you show me how you add cells, so we can make a small
example that tests this to go in</div>
<div>PETSc?</div>
</div>
</div>
</blockquote>
<p>Essentially I'm adding (one or more) cells nested "inside" some
of the original DM cells to simulate dual porosity. As well as new
cells I also create a new face between the original cell and the
new one, and a new edge and point for the face (so the DAG is the
same depth everywhere - otherwise it causes trouble).<br>
</p>
<p>In the code, I create a new DMPlex, figure out the chart
including the new cells etc., set the cone sizes and the cones. I
symmetrize it, copy labels over from the original DM, set cell
types (using DM_POLYTOPE_INTERIOR_GHOST for the new points) and
set up the point SF for the new DM. If something is wrong with
that point SF, would it cause the error I'm seeing when I
redistribute?</p>
<p></p></div></blockquote><div>Yes, that would cause this. Your routine looks right to me, but it should be easy to find a problem. Put a check</div><div>in at 3460 that h != dim, and also check that the height of minc_leaves(i) is not 0.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p>The code for setting up the new point SF is here (hope this link
works):<br>
</p>
<p><a href="https://github.com/waiwera/waiwera/blob/55d26483b3392b70985fb25f998fbda3297c6154/src/mesh.F90#L3408" target="_blank">https://github.com/waiwera/waiwera/blob/55d26483b3392b70985fb25f998fbda3297c6154/src/mesh.F90#L3408</a></p>
<p>- Adrian<br>
</p>
<pre cols="72">--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: <a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a>
tel: +64 (0)9 923 4611
</pre>
</div>
</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="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>