#include "petscmat.h" PetscErrorCode MatFDColoringSetParameters(MatFDColoring matfd,PetscReal error,PetscReal umin)Logically Collective on MatFDColoring
The Jacobian is estimated with the differencing approximation
F'(u)_{:,i} = [F(u+h*dx_{i}) - F(u)]/h where htype = 'ds': h = error_rel*u[i] if abs(u[i]) > umin = +/- error_rel*umin otherwise, with +/- determined by the sign of u[i] dx_{i} = (0, ... 1, .... 0) htype = 'wp': h = error_rel * sqrt(1 + ||u||)
coloring | - the coloring context | |
error_rel | - relative error | |
umin | - minimum allowable u-value magnitude |