<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 1 Aug 2019 at 16:59, Daniel Mckinnell via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="color:black;font:10pt arial">Hi,
<br>

<br>
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 class="m_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>

<br>
[0]PETSC ERROR: Argument out of range
<br>
[0]PETSC ERROR: No grid refiner of dimension 2 registered
<br>
[0]PETSC ERROR: See <a class="m_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>
[0]PETSC ERROR: Petsc Release Version 3.11.2, unknown
<br>
[0]PETSC ERROR: ./fpf on a arch-linux2-c-debug named cromars by daniel 
Thu Aug  1 15:40:18 2019
<br>
[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>
[0]PETSC ERROR: #1 DMPlexRefine_Internal() line 215 in 
/home/daniel/petsc/src/dm/impls/plex/plexadapt.c
<br>
[0]PETSC ERROR: #2 DMRefine_Plex() line 10381 in 
/home/daniel/petsc/src/dm/impls/plex/plexrefine.c
<br>
[0]PETSC ERROR: #3 DMRefine() line 1881 in 
/home/daniel/petsc/src/dm/interface/dm</div></blockquote><div dir="auto"><br></div><div dir="auto">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 dir="auto"><br></div><div dir="auto">I'm not sure what options are available as packages, but triangle I think is one. </div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto">Lawrence</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="color:black;font:10pt arial"><br></div>
</blockquote></div></div>