MatFDColoringApply

Given a matrix for which a MatFDColoring context has been created, computes the Jacobian for a function via finite differences.

Synopsis

int MatFDColoringApply(Mat J,MatFDColoring coloring,Vec x1,MatStructure *flag,void *sctx)
Collective on MatFDColoring

Input Parameters

mat - location to store Jacobian
coloring - coloring context created with MatFDColoringCreate()
x1 - location at which Jacobian is to be computed
sctx - optional context required by function (actually a SNES context)

Options Database Keys

-mat_fd_coloring_freq <freq> -Sets coloring frequency

See Also

MatFDColoringCreate(), MatFDColoringDestroy(), MatFDColoringView()

Keywords

coloring, Jacobian, finite differences

Location: src/mat/interface/fdmatrix.c
Matrix Index
Table of Contents