[petsc-users] Question about DMDAGetElements

Sajid Ali sajidsyed2021 at u.northwestern.edu
Tue Nov 13 14:54:38 CST 2018


I'm still confused and have the following questions :

1) Suppose as in the case above a DM object (created using DMCreate1D) is
used to created a matrix A using DMCreateMatrix, how does one convert the
indices obtained from DMDAGetElements to the row and column indices for the
matrix A ? Is there a function telling me exactly which sub-matrix each
rank is storing ?

2) From the ex6.c example above, it looks like e corresponds to row index
and nen is the number of columns and i is the column index (which runs from
0 to nel) when addressing the matrix elements via MatSetValuesLocal. Is
this correct?

3) How would the indices obtained from DMDAGetElements correspond to the
indices for a vector created using DMCreateGlobalVector ?

Thank You,
Sajid Ali
Applied Physics
Northwestern University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181113/d1ae81b8/attachment-0001.html>


More information about the petsc-users mailing list