[petsc-users] TSDefaultComputeJacobian

Jed Brown jed at 59A2.org
Wed Jul 21 19:04:17 CDT 2010


On Wed, 21 Jul 2010 19:52:23 -0400, Xuan YU <xxy113 at psu.edu> wrote:
> Hi,
> 
> In SNES, Petsc can compute Jacobian by:
> 
> ierr =  
> SNESSetJacobian 
> (snes,J,J,SNESDefaultComputeJacobian,PETSC_NULL);CHKERRQ(ierr);
> 
> How about TS? I don't want to provide Jacobian function by myself, but  
> I didn't find something like TSDefaultComputeJacobian.

You can use -snes_fd (or -snes_mf or -snes_mf_operator) with TS.
Programmatically,

  TSGetSNES(ts,&snes);
  SNESSetJacobian(snes,A,B,SNESDefaultComputeJacobian,ts);

Jed


More information about the petsc-users mailing list