[petsc-users] Compute the sum of the absolute values of the off-block diagonal entries of each row

Jed Brown jed at jedbrown.org
Mon Mar 4 16:57:32 CST 2019


"Zhang, Junchao via petsc-users" <petsc-users at mcs.anl.gov> writes:

> Perhaps PETSc should have a MatGetRemoteRow (or
> MatGetRowOffDiagonalBlock) (A, r, &ncols, &cols, &vals).  MatGetRow()
> internally has to allocate memory and sort indices and values from
> local diagonal block and off-diagonal block. It is totally a waste in
> this case -- users do not care column indices and the local block.
> With MatGetRemoteRow(A, r, &ncols, NULL, &vals), PETSc just needs to
> set an integer and a pointer.

I'm not wild about the resulting programming model, which is so
intimately tied to PETSc *AIJ storage conventions yet also likely not
efficient for operations like SOR.  Perhaps PETSc MatSOR should be
taught about a supplemental diagonal, such as produced by the "l^1"
scheme?


More information about the petsc-users mailing list