[petsc-users] MatGetValuesStencil?
Barry Smith
bsmith at mcs.anl.gov
Sun Jul 13 14:45:08 CDT 2014
We don’t currently have such a routine. You could copy MatSetValuesStencil() and MatSetValuesLocal() and produce MatGetValuesStencil() and MatGetValuesLocal() with very minor changes and get what you want. You could consider contributing these back to PETSc with a pull request see https://bitbucket.org/petsc/petsc/wiki/Home#markdown-header-contributing-a-larger-piece-of-functionality
Barry
On Jul 13, 2014, at 12:49 PM, Xiangdong <epscodes at gmail.com> wrote:
> Hello everyone,
>
> I am just wondering whether there is a function doing the opposite of MatSetValuesStencil. I tried to find a MatGetValues equivalent for using structured grid indexing, but it seems that MatGetValuesStencil does not exist.
>
> I have a sparse matrix A built on DMDA. If I want to use A's entries to build another DMDA matrices B, what is the best way to retrieve A's entries? Is it possible to use grid indexing?
>
> Thank you.
>
> Best,
> Xiangdong
More information about the petsc-users
mailing list