[petsc-users] Insert values into matrix using MatSetValuesStencil or MatSetValuesLocal

Wee-Beng Tay zonexo at gmail.com
Mon Aug 24 04:09:53 CDT 2015


Hi,

I'm modifying my 3d fortran code from MPI along 1 direction (z) to MPI
along 2 directions (y,z)

Previously I was using MatSetValues with global indices. However, now I'm
using DM and global indices is much more difficult.

I come across MatSetValuesStencil or MatSetValuesLocal.

So what's the difference bet the one since they both seem to work locally?

Which is a simpler/better option?

Is there an example in Fortran for MatSetValuesStencil?

Do I also need to use DMDAGetAO together with MatSetValuesStencil or
MatSetValuesLocal?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150824/6e1d33d9/attachment.html>


More information about the petsc-users mailing list