[petsc-users] How to get Matrix from MatGetArray()
Jed Brown
jedbrown at mcs.anl.gov
Sat Oct 1 10:26:45 CDT 2011
On Sat, Oct 1, 2011 at 10:23, behzad baghapour
<behzad.baghapour at gmail.com>wrote:
> I meant by MatAssembly, the global indices of matrix elements (related to a
> dense format) which is changed into sparse one.
I don't understand what you mean. It doesn't make sense to convert "dense"
indices into sparse ones.
> So what would be right pattern to read the content of the Matrix from
> MatGetArray if I know that the original matrix is created by AIJ?
Use MatGetRow() if you need access to this. (The internal data structures
are different in parallel and serial, so accessing them directly is bad.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111001/3545b98c/attachment.htm>
More information about the petsc-users
mailing list