[petsc-users] hand-coded Jacobian

(Rebecca) Xuefei YUAN xy2102 at columbia.edu
Tue Jul 13 21:23:51 CDT 2010


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?

Thanks a lot!

Rebecca




Quoting Jed Brown <jed at 59A2.org>:

> On Sun, 11 Jul 2010 00:50:30 -0400, "(Rebecca) Xuefei YUAN"   
> <xy2102 at columbia.edu> wrote:
>> Dear all,
>>
>> If testing the hand coded Jacobian, the ratio is 1e-10, but the
>> difference is 1e-4, would this be some mistakes in Jacobian?
>
> This is fine, it just means that your matrix hasn't been scaled to O(1).
>
> Jed
>
>



-- 
(Rebecca) Xuefei YUAN
Department of Applied Physics and Applied Mathematics
Columbia University
Tel:917-399-8032
www.columbia.edu/~xy2102



More information about the petsc-users mailing list