[petsc-users] petsc4py

Jed Brown jed at 59A2.org
Thu Sep 30 13:07:47 CDT 2010


On Thu, Sep 30, 2010 at 19:35, Jed Brown <jed at 59a2.org> wrote:
>> 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

Actually, you have to set the initial vector somewhere, and the
residual vector can be obtained by duplicating it.  PETSc works this
way in C.  Lisandro, why does TS.setIFunction require the residual
vector to be provided?  If you agree that it's not necessary, please
apply the attached patch.

Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jed-setifunction.patch
Type: text/x-patch
Size: 1172 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100930/efa97b15/attachment.bin>


More information about the petsc-users mailing list