# PFApply
Applies the mathematical function to an array of values. 
## Synopsis
```
#include "petscpf.h" 
PetscErrorCode PFApply(PF pf, PetscInt n, const PetscScalar *x, PetscScalar *y)
```
Collective


## Input Parameters

- ***pf -*** the function context
- ***n -*** number of pointwise function evaluations to perform, each pointwise function evaluation
is a function of dimin variables and computes dimout variables where dimin and dimout are defined
in the call to PFCreate()
- ***x -*** input array



## Output Parameter

- ***y -*** output array





## Notes


## See Also
 `PFApplyVec()`, `PFCreate()`, `PFDestroy()`, `PFSetType()`, `PFSet()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/pf/interface/pf.c.html#PFApply">src/vec/pf/interface/pf.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/pf/impls/constant/const.c.html#PFApply_Constant">PFApply_Constant in src/vec/pf/impls/constant/const.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/pf/impls/constant/const.c.html#PFApply_Identity">PFApply_Identity in src/vec/pf/impls/constant/const.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/pf/impls/matlab/cmatlab.c.html#PFApply_Matlab">PFApply_Matlab in src/vec/pf/impls/matlab/cmatlab.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/pf/interface/pf.c)


[Index of all PF routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
