<div dir="ltr"><div dir="ltr">On Fri, Aug 2, 2019 at 9:10 AM Daniel Mckinnell via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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 style="color:black;font:10pt arial">
<div> <font size="2">Thank you a lot, that works well for Simplex cells when running on one processor. Do you know anything that works for Tensor cells and/or when running in parallel?</font></div></div></blockquote><div><br></div><div>For simplex in parallel, we use Pragmatic, and for tensor cells in parallel we use p4est. Both of them operate through the</div><div>very new DMAdapt() interface. We have some initial experience, but that part of PETSc is still unstable.</div><div><br></div><div>Note that you can regularly refine simplices or hexes in parallel using just DMRefine().</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"><div style="color:black;font:10pt arial">

<div><font size="2">Thanks again for all of your help.</font></div>

<div><font size="2">Daniel</font><br>
</div>

<div> <br>
</div>

<div> <br>
</div>

<div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>
From: Lawrence Mitchell <<a href="mailto:wence@gmx.li" target="_blank">wence@gmx.li</a>><br>
To: Daniel Mckinnell <<a href="mailto:d_mckinnell@aol.co.uk" target="_blank">d_mckinnell@aol.co.uk</a>><br>
CC: petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>><br>
Sent: Thu, 1 Aug 2019 17:36<br>
Subject: Re: [petsc-users] Refine DMPlex with a Refinement Function<br>
<br>

<div id="gmail-m_-1166453498016604582yiv8776468194">
<div>
<div><br clear="none"></div>

<div><br clear="none">
<div class="gmail-m_-1166453498016604582yiv8776468194gmail_quote">
<div class="gmail-m_-1166453498016604582yiv8776468194yqt8233751181" id="gmail-m_-1166453498016604582yiv8776468194yqtfd74153">
<div class="gmail-m_-1166453498016604582yiv8776468194gmail_attr" dir="ltr">On Thu, 1 Aug 2019 at 16:59, Daniel Mckinnell via petsc-users <<a rel="noopener noreferrer" shape="rect" href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:<br clear="none"></div>
<blockquote class="gmail-m_-1166453498016604582yiv8776468194gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div style="color:black;font:10pt arial">Hi,
<br clear="none">

<br clear="none">
I have been having some trouble trying to refine a DMPlex object using a 
Refinement Function. I have been working with reference to the code 
discussed here: 
<a rel="noopener noreferrer" shape="rect" class="gmail-m_-1166453498016604582yiv8776468194m_4722883285617819754moz-txt-link-freetext" href="https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2019-April/038341.html" target="_blank">https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2019-April/038341.html</a> 
including the code from the GitHub directory mentioned. The error I have 
been getting is as follows:
<br clear="none">

<br clear="none">
[0]PETSC ERROR: Argument out of range
<br clear="none">
[0]PETSC ERROR: No grid refiner of dimension 2 registered
<br clear="none">
[0]PETSC ERROR: See <a rel="noopener noreferrer" shape="rect" class="gmail-m_-1166453498016604582yiv8776468194m_4722883285617819754moz-txt-link-freetext" href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> 
for trouble shooting.
<br clear="none">
[0]PETSC ERROR: Petsc Release Version 3.11.2, unknown
<br clear="none">
[0]PETSC ERROR: ./fpf on a arch-linux2-c-debug named cromars by daniel 
Thu Aug  1 15:40:18 2019
<br clear="none">
[0]PETSC ERROR: Configure options −−download−f2cblaslapack=yes 
−−with−debugging=1 −−download−metis=yes −−download−parmetis=yes 
−−with−fortran−bindings=0 −−with−python=0 -download-openmpi=1 
−−with−c−support −−with−clanguage=cxx
<br clear="none">
[0]PETSC ERROR: #1 DMPlexRefine_Internal() line 215 in 
/home/daniel/petsc/src/dm/impls/plex/plexadapt.c
<br clear="none">
[0]PETSC ERROR: #2 DMRefine_Plex() line 10381 in 
/home/daniel/petsc/src/dm/impls/plex/plexrefine.c
<br clear="none">
[0]PETSC ERROR: #3 DMRefine() line 1881 in 
/home/daniel/petsc/src/dm/interface/dm</div>
</blockquote></div>

<div><br clear="none"></div>

<div>I suspect you need to configure with --download-triangle? When you mark cells for refinement like this, petsc uses and external package to do the adaptation. </div>

<div><br clear="none"></div>

<div>I'm not sure what options are available as packages, but triangle I think is one. </div>

<div><br clear="none"></div>

<div>Cheers,</div>

<div><br clear="none"></div>

<div>Lawrence</div>

<div class="gmail-m_-1166453498016604582yiv8776468194yqt8233751181" id="gmail-m_-1166453498016604582yiv8776468194yqtfd03468"><blockquote class="gmail-m_-1166453498016604582yiv8776468194gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="color:black;font:10pt arial"><br clear="none"></div>

</blockquote></div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <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>