<div dir="ltr"><div>Hi Petsc-users,</div>I confused about the MatSetValue from the manual.<div>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.</div>
<div>Thank you.</div><div><br></div><div>Que.</div></div>