FNPhiSetIndex — SLEPc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# FNPhiSetIndex

Sets the index of the \(\varphi\)-function.

## Synopsis

    #include "slepcfn.h"
    PetscErrorCode FNPhiSetIndex(FN fn,PetscInt k)

Logically Collective

## Input Parameters

- fn - the math function context

- k - the index

## Notes

The \(\varphi\)-functions are defined as

\[\begin{split}\begin{align} \varphi_0(x)&=e^x,\\ \varphi_1(x)&=\frac{e^x-1}{x},\\ \varphi_k(x)&=\frac{\varphi_{k-1}(x)-1/(k-1)!}{x}. \end{align}\end{split}\]
The default index is \(k=1\).

## See Also

FN: Mathematical Functions, `FNPHI`, `FNPhiGetIndex()`

## Level

intermediate

## Location

src/sys/classes/fn/impls/phi/fnphi.c

## Examples

src/mfn/tutorials/ex39.c

## Implementations

FNPhiSetIndex_Phi() in src/sys/classes/fn/impls/phi/fnphi.c

Index of all FN routines Table of Contents for all manual pages Index of all manual pages