[petsc-users] Get DM used to create Vec

Junchao Zhang junchao.zhang at gmail.com
Thu Nov 16 09:24:10 CST 2023


I was wondering if you can use
https://petsc.org/release/manualpages/Sys/PetscObjectCompose/ to attach the
DM to the Vec.

--Junchao Zhang


On Thu, Nov 16, 2023 at 8:06 AM Carl-Johan Thore <carljohanthore at gmail.com>
wrote:

> Hi,
>
> Given a Vec (or Mat) created at some point with DMCreate...,
> is it possible to retrieve from this Vec a pointer to the DM used
> to create it?
>
> (I could perhaps build my own Vec-type on top of PETSc's
> which carried with it such a pointer but that doesn't seem like
> a good idea)
>
> Kind regards,
> Carl-Johan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20231116/a083c797/attachment.html>


More information about the petsc-users mailing list