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 <[email protected]>
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
>

Reply via email to