[petsc-users] Calling PETSc functions from Python using petsc4py

Jed Brown jed at jedbrown.org
Thu Apr 6 18:33:59 CDT 2017


No, these are not part of the PETSc library so they would need to be
compiled and called separately (you can do that, but it isn't part of
petsc4py).

"Larson, Jeffrey M." <jmlarson at mcs.anl.gov> writes:

> Hello,
>
> Is there a way to call a function in a PETSc example file from python?
>
> Explicitly, I'd like to call EvaluateFunction and EvaluateJacobian (resp. lines 123 and 147) of https://www.mcs.anl.gov/petsc/petsc-current/src/tao/leastsquares/examples/tutorials/chwirut1.c.html
> from Python.
>
> Can petsc4py version 3.7.0 help with this?
>
> Thank you for your help,
> Jeffrey Larson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170406/15a420a3/attachment.pgp>


More information about the petsc-users mailing list