[petsc-users] TSSetIJacobian is never called

Jed Brown jed at jedbrown.org
Mon Oct 27 15:16:30 CDT 2014


Sharp Stone <thronesf at gmail.com> writes:

> Hi Matt,
>
> That is why we asked this. We do not think the calculation of DAE
> F-functions are wrong. But even if the F-functions are not accurate, we
> expect the TS solver would still call TSSetIJacobian(), but actually it
> does not call TSSetIJacobian() routine at all...

The solver never calls TSSetIJacobian.  It does call your function
(FormIJacobian) if it has to solve something.  But as Matt points out,
your FormIFunction produces a residual of 0, so SNES does not need to
solve anything.

It looks like your FormIFunction contains an implicit solve.  Note that
this will typically make the corresponding Jacobian dense.  It is worth
considering whether you can reformulate to retain sparsity (perhaps
adding some algebraic variables).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141027/e050792c/attachment.pgp>


More information about the petsc-users mailing list