[petsc-users] -snes_type test vs -snes_mf

Barry Smith bsmith at mcs.anl.gov
Thu Mar 18 14:49:08 CDT 2010


    I would focus on the Jacobian.


On Mar 18, 2010, at 2:00 PM, (Rebecca) Xuefei YUAN wrote:

> Dear all,
>
> I ran a code for np=1 and np=2.
>
> If hand coded Jacobian is provided, np=1 and np=2 gives me different  
> convergence and solutions, so I want to know what is wrong.
>
> If option -snes_mf is used, np=1 and np=2 gives me the same  
> convergence and close solutions. I thought there might be a bug in  
> FormJacobian().
>
> If option -snes_type test is used, np=1 and np=2 gives different  
> ratio and differences for finite difference Jacobian(fd) and hand  
> coded Jacobian(hc): J_np1_hc = J_np2_hc, but J_np1_fd != J_np2_fd.  
> so I thought there might be a bug in FormFunction().
>
> I am not sure which one should be my focus?
>
> Any suggestions?
>
> Thanks a lot!
>
> Rebecca
>
>
>
>
> -- 
> (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