FNSetMethod — SLEPc 3.24.2 documentation

Skip to main content
`Ctrl`+`K`

# 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 algorithm 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

FN: Mathematical Functions, `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