[petsc-users] MatSetValuesStencil correct usage

iwaddington . iwaddington at gmail.com
Wed Nov 13 14:20:21 CST 2013


  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
"src/ksp/ksp/examples/tutorials/ex32.c.html<http://www.mcs.anl.gov/petsc/petsc-3.4/src/ksp/ksp/examples/tutorials/ex32.c.html>"
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.
  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.

  Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131113/bcf1ea4a/attachment.html>


More information about the petsc-users mailing list