<div dir="ltr"><div dir="ltr">On Fri, Oct 10, 2025 at 9:48 AM Matteo Semplice via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</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">Dear all,<br>
<br>
I am wondering if there is a way to extract a subset of a DMDA and <br>
use it as a mesh. The use case is to program a finite-difference method <br>
in which the domain is defined by a levelset function: if I could <br>
completely ignore the parts of the background DMDA that are "far away" <br>
from the object, I guess I would avoid some cores having almost no <br>
workload. I figure that I could setup a DMDA, load/compute the levelset <br>
on the entire box, then mark the nodes to be retained, extract the <br>
submesh and repartition it. I would also need a mean to transfer some <br>
Vec data from the DMDA to the new mesh.<br>
<br>
I guess that the extracted mesh would then become a DMPlex and it would <br>
not retain any DMDA flavour (like notions of which are the grid nodes <br>
sitting on top/bottom, left/right of a given node), right?<br></blockquote><div><br></div><div>If you are planning on extracting a Plex anyway, I think it would be easier to just</div><div>start with a Cartesian Plex, instead of a DA, and use DMPlexCreateSubmesh().</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>
Matteo<br>
<br>
-- <br>
Prof. Matteo Semplice<br>
Università degli Studi dell’Insubria<br>
Dipartimento di Scienza e Alta Tecnologia – DiSAT<br>
Professore Associato<br>
Via Valleggio, 11 – 22100 Como (CO) – Italia<br>
tel.: +39 031 2386316<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!aTBS1B2YLKRIG_VAvtEwS0a40kgk7MzMmM_K5S1XBiDFyLWFu4yXTeH6Rhx4N3TyI18v_Z0k4cSxEnXFXELM$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>