[petsc-users] How to set matrix values using "MatSetValuesStencil" when dof>1 idxn -

Feng Shi fshi at fit.edu
Fri Sep 19 23:45:29 CDT 2014


Hi Folks,

I get hard times in using the routine MatSetValuesStencil for dof>1. There numerous examples for dof=1 but dof>1, neither in the Petsc manual. The routine on-line manual (http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatSetValuesStencil.html) says, idxm/idxn are grid coordinates (and component number when dof > 1) for matrix columns being entered. What is the general form of these indices? Am I right, for example, for idxn, if I write idxn[ix, dof].i?

Thank you for your help!

Best regards,

Feng


More information about the petsc-users mailing list