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>