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

SNESDefaultMatrixFreeSetParameters2

Sets the parameters for the approximation of matrix-vector products using finite differences.

Synopsis

#include "petscsnes.h"   
PetscErrorCode  SNESDefaultMatrixFreeSetParameters2(Mat mat,PetscReal error,PetscReal umin,PetscReal h)
      J(u)*a = [J(u+h*a) - J(u)]/h where

either the user sets h directly here, or this parameter is computed via Many br

       h = error_rel*u'a/||a||^2                        if  |u'a| > umin*||a||_{1}
         = error_rel*umin*sign(u'a)*||a||_{1}/||a||^2   else

Input Parameters

mat - the matrix Many br
error_rel - relative error (should be set to the square root of Many brthe relative error in the function evaluations) Many br
umin - minimum allowable u-value Many br
h - differencing parameter Many br

Many br

Notes

If the user sets the parameter h directly, then this value will be used Many brinstead of the default computation indicated above. Many br

Keywords

SNES, matrix-free, parameters

See Also

MatCreateSNESMF()

Level:advanced
Location:
src/snes/interface/noise/snesmfj2.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages