[petsc-users] petsc4py
Jed Brown
jed at 59A2.org
Thu Sep 30 12:35:05 CDT 2010
2010/9/30 Николай Кутузов <kutuzovnp at gmail.com>:
> ts.setIFunction(ode.evalFunction, f) ---> ts.setIFunction(ode.evalFunction)
This won't work, you need to provide a residual vector, otherwise
PETSc does not know how large your vector is. Your earlier emails
said that you removed the line that reads
ts.setIJacobian(ode.evalJacobian, J)
but said nothing about modifying the line
ts.setIFunction(ode.evalFunction, f)
That was why we couldn't understand what was going wrong for you. You
*can* skip the ts.setIJacobian line if you use the option -snes_mf, it
will do exactly the same algorithm as if you leave rober.py exactly as
it is and run with -snes_mf.
Jed
More information about the petsc-users
mailing list