petsc-3.14.5 2021-03-03
Report Typos and Errors

# MatHasOperation

Determines whether the given matrix supports the particular operation.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatHasOperation(Mat mat,MatOperation op,PetscBool *has)

Not Collective

### Input Parameters

| mat | - the matrix
| op | - the operation, for example, MATOP_GET_DIAGONAL

### Output Parameter

| has | - either PETSC_TRUE or PETSC_FALSE

### Notes

See the file include/petscmat.h for a complete list of matrix operations, which all have the form MATOP_<OPERATION>, where <OPERATION> is the name (in all capital letters) of the user-level routine. E.g., MatNorm() -> MATOP_NORM.

### See Also

MatCreateShell()

### Level

advanced

### Location

src/mat/interface/matrix.c

### Implementations

MatHasOperation_Nest in src/mat/impls/nest/matnest.c
MatHasOperation_Transpose in src/mat/impls/transpose/transm.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages