DSNEPSetComputeMatrixFunction — SLEPc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# DSNEPSetComputeMatrixFunction

Sets a user-provided subroutine to compute the matrices \(T(\lambda)\) or \(T'(\lambda)\).

## Synopsis

    #include "slepcds.h"
    PetscErrorCode DSNEPSetComputeMatrixFunction(DS ds,DSNEPMatrixFunctionFn *fun,PetscCtx ctx,PetscCtxDestroyFn *destroy)

Logically Collective

## Input Parameters

- ds - the direct solver context

- fun - matrix function evaluation routine, see `DSNEPMatrixFunctionFn` for the calling sequence

- ctx - a context pointer (the last parameter to the user function)

- destroy - a routine for destroying the context (may be `NULL`), see `PetscCtxDestroyFn` for the calling sequence

## Note

The result is computed as \(T(\lambda) = \sum_i E_i f_i(\lambda)\), and similarly for the derivative, where \(E_i\) are the extra matrices, see `DSMatType`.

## See Also

DS: Direct Solver (or Dense System), `DSNEP`, `DSNEPGetComputeMatrixFunction()`

## Level

developer

## Location

src/sys/classes/ds/impls/nep/dsnep.c

## Implementations

DSNEPSetComputeMatrixFunction_NEP() in src/sys/classes/ds/impls/nep/dsnep.c

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