<div dir="ltr">I was wondering if you can use <a href="https://petsc.org/release/manualpages/Sys/PetscObjectCompose/">https://petsc.org/release/manualpages/Sys/PetscObjectCompose/</a> to attach the DM to the Vec.<div><font color="#000000" face="Menlo, Monaco, Courier New, monospace"><span style="font-size:14px;white-space:pre"><br></span></font><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--Junchao Zhang</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 16, 2023 at 8:06 AM Carl-Johan Thore <<a href="mailto:carljohanthore@gmail.com">carljohanthore@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>Given a Vec (or Mat) created at some point with DMCreate...,</div><div>is it possible to retrieve from this Vec a pointer to the DM used</div><div>to create it? </div><div><br></div><div>(I could perhaps build my own Vec-type on top of PETSc's</div><div>which carried with it such a pointer but that doesn't seem like</div><div>a good idea)<br></div><div><br></div><div>Kind regards,</div><div>Carl-Johan<br></div></div>
</blockquote></div>