[petsc-users] MATELEMENTAL MatSetValue( )

Eric D. Robertson eric.robertson at cfdrc.com
Wed May 25 22:19:07 CDT 2016


I am trying to multiply two dense matrices using the Elemental interface. I fill the matrix using MatSetValue( ) like below:

 for ( i = 0; i < Matrix.M; i++){
        for ( j = 0; j < Matrix.N; j++) {
             PetscScalar temp = i + one + (j*three);
             MatSetValue(Matrix.A, i, j, temp, INSERT_VALUES);

      }
   }


However, I seem to get the following error:

[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: Only ADD_VALUES to off-processor entry is supported

But if I use ADD_VALUES, I get a different matrix depending on the number of processors used. The entries become multiplied by the number of processors. How do I reconcile this?


<redir.aspx?REF=hVEx-ekIltbV6NDJuYjzplTZG3ymEirNPcO9eR2dIGrvJzCyE4XTCAFtYWlsdG86ZXJpYy5yb2JlcnRzb25AY2ZkcmMuY29t>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160526/3f7c4729/attachment.html>


More information about the petsc-users mailing list