petsc-3.7.1 2016-05-15
Report Typos and Errors

MatMFFDComputeJacobian

Tells the matrix-free Jacobian object the new location at which Jacobian matrix vector products will be computed at, i.e. J(x) * a. The x is obtained from the SNES object (using SNESGetSolution()).

Synopsis

#include "petscsnes.h" 
#include "petscdm.h"   
PetscErrorCode  MatMFFDComputeJacobian(SNES snes,Vec x,Mat jac,Mat B,void *dummy)
Logically Collective on SNES Many br

Input Parameters

snes - the nonlinear solver context Many br
x - the point at which the Jacobian vector products will be performed Many br
jac - the matrix-free Jacobian object Many br
B - either the same as jac or another matrix type (ignored) Many br
flag - not relevent for matrix-free form Many br
dummy - the user context (ignored) Many br

Many br

Warning

If MatMFFDSetBase() is ever called on jac then this routine will NO longer get Many brthe x from the SNES object and MatMFFDSetBase() must from that point on be used to Many brchange the base vector x. Many br

Notes

This can be passed into SNESSetJacobian() as the Jacobian evaluation function argument Many brwhen using a completely matrix-free solver, Many brthat is the B matrix is also the same matrix operator. This is used when you select Many br-snes_mf but rarely used directly by users. (All this routine does is call MatAssemblyBegin/End() on Many brthe Mat jac.) Many br

See Also

MatMFFDGetH(), MatCreateSNESMF(), MatCreateMFFD(), MATMFFD,
MatMFFDSetHHistory(), MatMFFDSetFunctionError(), MatCreateMFFD(), SNESSetJacobian() Many br

Level:developer
Location:
src/snes/mf/snesmfj.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages