[petsc-dev] MatSetValuesStencil analogue in petsc4py

Jed Brown jed at jedbrown.org
Wed Nov 18 13:27:21 CST 2015


Nathan Collier <nathaniel.collier at gmail.com> writes:
> ack MatSetValuesStencil
>
> returns
>
> src/PETSc/petscmat.pxi
> 222:    int
> MatSetValuesStencil(PetscMat,PetscInt,PetscMatStencil[],PetscInt,PetscMatStencil[],PetscScalar[],PetscInsertMode)
> 1027:        CHKERR( MatSetValuesStencil(A,
>
> but 'ack MatSetValueStencil' returns nothing. Hope it helps,

Mat.pyx defines Mat.setValueStencil which calls petscmat.pxi's
matsetvaluestencil which calls PETSc's MatSetValuesStencil with an array
of length 1.  I can't think of any reason not to generalize this to set
many values at once.  Chris, would you like to take a pass at adding
this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151118/bedbb0a0/attachment.sig>


More information about the petsc-dev mailing list