> On Apr 6, 2017, at 6:33 PM, Jed Brown <[email protected]> wrote: > > 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).
Jeff, See demo/wrap-cypython; I believe this example does pretty much exactly what you need, only use SNES instead of Tao. Barry > > "Larson, Jeffrey M." <[email protected]> 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
