[petsc-users] MatSetValue
Que Cat
quecat001 at gmail.com
Tue Jan 21 13:22:34 CST 2014
Hi Petsc-users,
I confused about the MatSetValue from the manual.
For example, I need to assembly three values A[0,1]=1 , A[3,2]=10 ,
A[5,2]=20 to the parallel matrix A. I can create a dense subblock matrix
values that has dimension of m=1, n=3: values=[1 10 20], idxm=[0 3 5],
idxn=[1 2 2]. But the manual says that "the value to be put in row idxm[i]
and column idxn[j] is located in values[i*n+j]". So, for example i=1,j=1
will add values[1*3+1] to the matrix, which does not exist in values. What
do I misunderstand the manual? We can set separate value to the parallel
matrix, but it says that it is better to set a subblock matrix.
Thank you.
Que.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140121/3b466e34/attachment.html>
More information about the petsc-users
mailing list