[petsc-users] Question about DMDAGetElements
Sajid Ali
sajidsyed2021 at u.northwestern.edu
Mon Nov 19 15:43:33 CST 2018
So, DMDA is used for sparse matrices arising from FD/FE and MatCreateMPIAIJ
can be used for dense matrices (though it is strongly discouraged).
My confusion stemmed from DMDAGetElements giving the element indices for
the 1D mesh/vector of size N(when the DMDACreate1d is used). But these
indices were then used as local indices to set the values for a 2D matrix
(via MatSetValuesLocal ) created using the same DM (now we have NxN
elements).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181119/6480221b/attachment.html>
More information about the petsc-users
mailing list