petsc-3.9.4 2018-09-11
Report Typos and Errors

MatShellTestMult

Compares the multiply routine provided to the MATSHELL with differencing on a given function.

Synopsis

#include "petscmat.h" 
PetscErrorCode  MatShellTestMult(Mat mat,PetscErrorCode (*f)(void*,Vec,Vec),Vec base,void *ctx,PetscBool *flg)
Logically Collective on Mat

Input Parameters

mat - the shell matrix
f - the function
base - differences are computed around this vector, see MatMFFDSetBase(), for Jacobians this is the point at which the Jacobian is being evaluated
ctx - an optional context for the function

Output Parameter

flg -PETSC_TRUE if the multiply is likely correct

Options Database

-mat_shell_test_mult_view -print if any differences are detected between the products and print the difference

Fortran Notes: Not supported from Fortran

See Also

MatCreateShell(), MatShellGetContext(), MatShellGetOperation(), MatShellTestMultTranspose()

Level

advanced

Location

src/mat/impls/shell/shell.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages