[petsc-users] about finite difference jacobian approximations

Jed Brown jed at 59A2.org
Sun May 2 07:41:25 CDT 2010


On Sat, 1 May 2010 20:31:11 +0800, "=?gb2312?B?s8LA1sa9o6hMZXBpbmcgQ2hlbqOp?=" <chenleping at yahoo.cn> wrote:
> hello, petsc teams,
> 
> If I want to use finite difference jacobian approximations,how should I define 
> the function FormJacobian()? I don't get analytic jacobians.

You don't write FormJacobian(), you just define the nonzero structure of
the matrix you want.  As I said before, look at

  http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/snes/examples/tutorials/ex5.c.html#line150

Jed

PS: You should set your computer's clock forward one day (it thinks
today is May 1 so your message will show up in a very strange order with
many email clients).

Jed


More information about the petsc-users mailing list