[petsc-users] -snes_type test

Jed Brown jed at 59A2.org
Fri Mar 18 06:12:01 CDT 2011


On Fri, Mar 18, 2011 at 12:07, Gianluca Meneghello <gianmail at gmail.com>wrote:

> esting 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 1.08967e-07 difference 2.43658e-07
> Norm of matrix ratio 7.6194e-08 difference 3.4075e-07
> Norm of matrix ratio 7.6211e-08 difference 3.40826e-07
>

Your Jacobian looks good so you don't need to use TEST.


> [0]PETSC ERROR: SNESSolve() line 2360 in src/snes/interface/snes.c
> [0]PETSC ERROR: main() line 144 in src/snes/examples/tutorials/ex1.c
> application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0
> [unset]: aborting job:
> application called MPI_Abort(MPI_COMM_WORLD, 73) - process 0
>

This is intentional, the end of SNESSolve_Test() has

  /*
         Return error code cause Jacobian not good
  */
  PetscFunctionReturn(PETSC_ERR_ARG_WRONGSTATE);

Perhaps it should be done differently, maybe even solve the Newton step and
continue, but that's not the current behavior.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110318/2d00ab2e/attachment.htm>


More information about the petsc-users mailing list