[petsc-users] MatDenseGetArray question

Jed Brown jedbrown at mcs.anl.gov
Wed Apr 17 14:32:21 CDT 2013


Michael Povolotskyi <mpovolot at purdue.edu> writes:

> Thank you, one more detail about MatDenseGetArray
> is this statement correct:
> if a dense matrix is serial, the data is stored in memory in a 
> column-wise order, 

Yes.

> but if a dense matrix is distributed the data is stored in a row-wise
> order?

No, it's still column-major storage, but each process only owns a range
of rows.  So the distributed memory partition is by row.

If you have large dense matrices, then chances are that you should
switch from MATDENSE to MATELEMENTAL anyway.


More information about the petsc-users mailing list