<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Matteo,<div><br></div><div>Take a look at these posts from a few years ago and see if they will help you:<div><br></div><div><a href="https://lists.mcs.anl.gov/pipermail/petsc-users/2021-January/043037.html">https://lists.mcs.anl.gov/pipermail/petsc-users/2021-January/043037.html</a></div><div><br></div><div><a href="https://lists.mcs.anl.gov/pipermail/petsc-users/2021-January/043043.html">https://lists.mcs.anl.gov/pipermail/petsc-users/2021-January/043043.html</a></div><div><br></div><div>We were able to use this approach to extract a sub-region of a DMDA, and it should be possible for you to do so as well.</div><div><br></div><div><br></div><div>Good luck,</div><div><br></div><div>Randy M.</div><br class="Apple-interchange-newline"></div><div><div><br><blockquote type="cite"><div>On Oct 10, 2025, at 6:48 AM, Matteo Semplice via petsc-users <petsc-users@mcs.anl.gov> wrote:</div><br class="Apple-interchange-newline"><div><div>Dear all,<br><br> I am wondering if there is a way to extract a subset of a DMDA and use it as a mesh. The use case is to program a finite-difference method in which the domain is defined by a levelset function: if I could completely ignore the parts of the background DMDA that are "far away" from the object, I guess I would avoid some cores having almost no workload. I figure that I could setup a DMDA, load/compute the levelset on the entire box, then mark the nodes to be retained, extract the submesh and repartition it. I would also need a mean to transfer some 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 not retain any DMDA flavour (like notions of which are the grid nodes sitting on top/bottom, left/right of a given node), right?<br><br>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></div></div></blockquote></div><br></div></body></html>