slepc-3.22.1 2024-10-28
Report Typos and Errors

# FNSetMethod

Selects the method to be used to evaluate functions of matrices.

### Synopsis

    #include "slepcfn.h"
    PetscErrorCode FNSetMethod(FN fn,PetscInt meth)

Logically Collective

### Input Parameters

| fn | - the math function context
| meth | - an index identifying the method

### Options Database Key

| -fn_method <meth> | - Sets the method

### Notes

In some FN types there are more than one algorithms available for computing matrix functions. In that case, this function allows choosing the wanted method.

If meth is currently set to 0 (the default) and the input argument A of FNEvaluateFunctionMat() is a symmetric/Hermitian matrix, then the computation is done via the eigendecomposition of A, rather than with the general algorithm.

### See Also

FNGetMethod(), FNEvaluateFunctionMat()

### Level

intermediate

### Location

src/sys/classes/fn/interface/fnbasic.c
Index of all FN routines
Table of Contents for all manual pages
Index of all manual pages