<div dir="ltr"><div dir="ltr">On Mon, Jun 16, 2025 at 7:38 AM Nicolas Barral <<a href="mailto:nicolas.barral@math.u-bordeaux.fr">nicolas.barral@math.u-bordeaux.fr</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 14/06/2025 18:45, Steven Dargaville wrote:<br>
> Hi, I'm just wondering if it is possible to generate a simple <br>
> unstructured mesh in 2D with DMPlex and one of the external generators, <br>
> like triangle?<br>
> <br>
> I'm running snes/tutorials/ex20 which uses triangle and I can only seem <br>
> to generate structured triangular meshes. It is a simple 2D box so it <br>
> makes sense a Delaunay might output a structured mesh in that case. I <br>
> know I could get the DM to read in an unstructured mesh from a file that <br>
> I have previously generated, but for ease I'm wondering if this can be <br>
> done directly.<br>
> <br>
> I've tried a few different things to try and force an unstructured mesh <br>
> being generated, like changing the number of faces to 1 (- <br>
> dm_plex_box_faces 1,1) so it only sees the corners of the box domain.<br>
> <br>
> I've also tried to set some of the options to triangle with <br>
> DMPlexTriangleSetOptions but that doesn't seem to have any effect, so <br>
> I'm guessing I'm potentially not using it correctly (and I can't seem to <br>
> find any examples that use this function to help).<br>
> <br>
> Anyone have any suggestions? Thanks for your help<br>
<br>
I don't know how the mesh is generated, but a workaround would be to <br>
generate a coarse mesh then use the adaptive remeshing functions (e.g. <br>
with MMG) - with a uniform metric if you want a uniform mesh. <br>
plex/tests/ex19 should show how it works.<br></blockquote><div><br></div><div>Is the idea just to get something that "looks unstructured"? You can usually do that by making the boundary</div><div>more complicated. For example, here is NY.</div><div><br></div><div>If instead you have some sort of criterion, then you might use AMR as Nicolas suggests.</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">
Thanks<br>
<br>
-- <br>
Nicolas<br>
> Steven<br>
<br>
</blockquote></div><div><br clear="all"></div><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!fUgJTt40Ns7Go6ZSrWZ5h3-IUfGrvM4n144mw_tHWwYpNSbsfcGerK4VdEYw7MbkA2qL_6Z35zIY3rMmYvHA$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>