Hi all,
I use -snes_type test to check the Jacobian matrix of my semiconductor code.
And get the result as follows:

Testing hand-coded Jacobian, if the ratio is
O(1.e-8), the hand-coded Jacobian is probably correct.
Run with -snes_test_display to show difference
of hand-coded and finite difference Jacobian.
Norm of matrix ratio 0.00277812 difference 0.0152703
Norm of matrix ratio 1.82658e-09 difference 1.01895e-08
Norm of matrix ratio 1.82964e-09 difference 1.02066e-08
[0]PETSC ERROR: SNESSolve() line 1871 in src/snes/interface/snes.c

It seems PETSC check hand writing Jacobian for 3 times. 
The Norm is something large in the first time check but keeps small in other 
two.
Dose this mean my Jacobian implementation correct or not? 
However, my code seems work well. 

Yours
GONG DING

Last mail seems lost. I send it again.


Reply via email to