<div dir="ltr"><div><div> Hi everyone, I am having trouble understanding the usage of MatSetValuesStencil. My doubt is in the roles played by the arguments idxm and idxn, which are passed as arguments according to the function documentation. For example, as I was reading example file <br>
"<a href="http://www.mcs.anl.gov/petsc/petsc-3.4/src/ksp/ksp/examples/tutorials/ex32.c.html">src/ksp/ksp/examples/tutorials/ex32.c.html</a>" line 191 I was wondering, ok, we want to insert a 1x5 submatrix inside our global matrix, and we somehow have to pass the grid coordinates of the points we want to insert, so why is the "row" variable needed, the "col" vector seems to contain all the grid coordinates of all the 5 points we are inserting.<br>
</div> I know this doubt will sound trivial to some of you, but I am learning Petsc all by myself, so any help is very much appreciated.<br> <br></div> Thanks a lot.<br></div>