# NEPApplyFunction

Applies the nonlinear function T(lambda) to a given vector.

### Synopsis

    #include "slepcnep.h"
    PetscErrorCode NEPApplyFunction(NEP nep,PetscScalar lambda,Vec x,Vec v,Vec y,Mat *A,Mat *B,MatStructure *flg)

Collective on NEP

### Input Parameters

| nep | - the nonlinear eigensolver context
| lambda | - scalar argument
| x | - vector to be multiplied against
| v | - workspace vector

### Output Parameters

| y | - result vector
| A | - Function matrix
| B | - optional preconditioning matrix
| flg | - flag indicating matrix structure (see MatStructure enum)

### Note

If the nonlinear operator is represented in split form, the result y = T(lambda)*x is computed without building T(lambda) explicitly. In that case, parameters A, B and flg are not used. Otherwise, the matrix T(lambda) is built and the effect is the same as a call to NEPComputeFunction() followed by a MatMult().

### See Also

NEPSetSplitOperator(), NEPComputeFunction()

Location: src/nep/interface/nepsolve.c
Index of all NEP routines
Table of Contents for all manual pages
Index of all manual pages