[petsc-users] Problem with SNES

Barry Smith bsmith at mcs.anl.gov
Mon Aug 29 07:36:24 CDT 2011


  Did you run with  -snes_test_display  it will display the matrices computed both ways so you can see which entries are different and maybe track down the problem.

   Barry

On Aug 29, 2011, at 6:39 AM, Milan Mitrovic wrote:

> Ok... I had a problem with indexing (-1 offset) in the local to global
> mapping and now I get the following:
> 
> 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 3.24883e-07 difference 3.24883e-05
> Norm of matrix ratio 3.25662e-07 difference 3.25662e-05
> Norm of matrix ratio 3.26517e-07 difference 3.26517e-05
> [0]PETSC ERROR: SNESSolve() line 2255 in src/snes/interface/snes.c
> 
> so I guess this means that it is slightly wrong :)
> 
> can you explain now what it is doing here (and why I get this
> error)... can I make it try to solve the equation with the
> approximated fd jacobian (is it doing that already?)



More information about the petsc-users mailing list