Peter Brune <[email protected]> writes: >> And get the SNES context from TS, then set the Jacobian option this way: >> >> SNES snes; >> >> TSGetSNES(ts, &snes); >> >> SNESSetJacobian(snes, J, J, SNESDefaultComputeJacobian, PETSC_NULL); >> >> >> > This should work as well. Note that SNESDefaultComputeJacobian is quite > expensive and should be used for testing only, which is why I would > hesitate to hard-code its use.
Also note that SNESDefaultComputeJacobian is named SNESComputeJacobianDefault now. If you already configured the nonzero structure, you can use -snes_fd_color or SNESComputeJacobianDefaultColor.
