[petsc-dev] MatSetValuesStencil analogue in petsc4py

Nathan Collier nathaniel.collier at gmail.com
Wed Nov 18 13:09:12 CST 2015


I am not sure if this is the right place or not, but it seems to me that
MatSetValuesStencil is the only function called in petsc4py. I don't see a
wrapper for MatSetValueStencil implemented.

It can be tricky to figure out what is going on in petsc4py--your best bet
is to look at source code. In the lack of documentation, I use ack (
http://beyondgrep.com/) to search the petsc4py source code, looking for the
desired PETSc function. For example,

ack MatSetValuesStencil


222:    int
1027:        CHKERR( MatSetValuesStencil(A,

but 'ack MatSetValueStencil' returns nothing. Hope it helps,


On Wed, Nov 18, 2015 at 12:20 PM Chris Eldred <chris.eldred at gmail.com>

> Hey petsc-dev,
> I was wondering if there was an analogue of MatSetValuesStencil in
> petsc4py? I see a SetValueStencil method at
> https://pythonhosted.org/petsc4py/apiref/petsc4py.PETSc.Mat-class.html,
> but no SetValuesStencil method.
> Also, is this the correct place to direct questions about petsc4py?
> There doesn't really seem to be any documentation or tutorials online
> or a mailing list dedicated to petsc4py.
> Thanks,
> Chris Eldred
> --
> Chris Eldred
> Postdoctoral Fellow, LAGA, University of Paris 13
> PhD, Atmospheric Science, Colorado State University, 2015
> DOE Computational Science Graduate Fellow (Alumni)
> B.S. Applied Computational Physics, Carnegie Mellon University, 2009
> chris.eldred at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20151118/08afae88/attachment.html>

More information about the petsc-dev mailing list