[petsc-users] hand-coded Jacobian
Jed Brown
jed at 59A2.org
Wed Jul 14 04:05:31 CDT 2010
On Tue, 13 Jul 2010 22:23:51 -0400, "(Rebecca) Xuefei YUAN" <xy2102 at columbia.edu> wrote:
> Dear Jed,
>
> What happens if the finite difference Jacobian and hand coded Jacobian
> are very close to each other for the constant vector 1 and -1 (the
> second and third sets), but are very different for the first set as:
>
> Norm of matrix ratio 0.0076637 difference 3.21475
>
> Norm of matrix ratio 2.90621e-10 difference 1.21909e-07
>
> Norm of matrix ratio 1.71734e-10 difference 7.20388e-08
>
> in the output file of the -snes_test_display?
This of course means that your analytic Jacobian decays to being correct
when applied to small perturbations of the constant, but not when
applied to other states. What sort of nonlinearity is in your function?
Jed
More information about the petsc-users
mailing list