[petsc-users] Getting access to matrix rows without and setting values simultaneously

Jed Brown jed at 59A2.org
Thu Jun 16 06:10:22 CDT 2011


On Thu, Jun 16, 2011 at 12:59, Alexander Grayver <agrayver at gfz-potsdam.de>wrote:

>    ! store transformed elements
>    call
> MatSetValues(A,1,rowidx,nvals,cols,transformedvals,INSERT_VALUES,ierr);CHKERRQ(ierr);
>    call MatRestoreRow(A,i,nvals,cols,vals,ierr);CHKERRQ(ierr);
>

You can't mix these because MatGetRow() needs an assembled matrix, and
MatSetValues() makes the matrix be unassembled.

What do you want the parallel semantics to be during this transformation?

The MatGetArray() for MPIDense just gives you access to the "diagonal"
block.

What is the high-level description of the operation you're trying to do? Is
this "matrix" actually being used as a linear operator, or is it a grid of
values?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110616/5a4bc48d/attachment.htm>


More information about the petsc-users mailing list