[petsc-dev] The question about the PETSc example

Lulu Liu lulu.liu at kaust.edu.sa
Sun Sep 29 15:06:56 CDT 2013


Run the example /petsc/src/snes/examples/tutorials/ex28.c using the
following options(found in the makefile)

 ./ex28 -da_grid_x 20 -snes_converged_reason -snes_monitor_short
-problem_type 2

It works using default analytic Jacobian to solve coupled system, however,
I comment

 Line 434 : ierr =
SNESSetJacobian(snes,B,B,FormJacobian_All,user);CHKERRQ(ierr);

and run the code again using the same options (i.e., FD Jacobian instead of
analytic Jacobian), we will get the results:

Nonlinear solve did not converge due to DIVERGED_MAX_IT iterations 50

Could you explain why it does not work using FD Jacobian in this example?

Thanks

-- 

------------------------------
This message and its contents, including attachments are intended solely 
for the original recipient. If you are not the intended recipient or have 
received this message in error, please notify me immediately and delete 
this message from your computer system. Any unauthorized use or 
distribution is prohibited. Please consider the environment before printing 
this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130929/93d55447/attachment.html>


More information about the petsc-dev mailing list