Hi,

Is there any way to get the address/location of a particular element in the
matrix, say mat[i,j]
So I can use that address later on to change the value of that element
rather than using MatSetValues.
I am currently using MatGetValues to get the value as such...
        PetscScalar val;
        MatGetValues(mat, 1, &i, 1, &j, &val);

But I would like something where I can pass a pointer and then the pointer
will be pointing to mat[i,j] such as 
        PetscScalar *val;
        MatGetReference(mat, i, j, val);

Is there something like this already in place ? Or is it not allowed because
of the way the matrix is implemented internally?

Thanks,
Julian.


Reply via email to