#include "petscsnes.h" PetscErrorCode SNESComputeJacobianDefault(SNES snes,Vec x1,Mat J,Mat B,void *ctx)Collective on SNES
x1 | - compute Jacobian at this point | |
ctx | - Section 1.5 Writing Application Codes with PETSc's function context, as set with SNESSetFunction() |
J | - Jacobian matrix (not altered in this routine) | |
B | - newly computed Jacobian matrix to use with preconditioner (generally the same as J) |
-snes_fd | - Activates SNESComputeJacobianDefault() | |
-snes_test_err | - Square root of function error tolerance, default square root of machine epsilon (1.e-8 in double, 3.e-4 in single) | |
-mat_fd_type | - Either wp or ds (see MATMFFD_WP or MATMFFD_DS) |
An alternative routine that uses coloring to exploit matrix sparsity is SNESComputeJacobianDefaultColor().