# PFApplyVec
Applies the mathematical function to a vector 
## Synopsis
```
#include "petscpf.h" 
PetscErrorCode PFApplyVec(PF pf, Vec x, Vec y)
```
Collective


## Input Parameters

- ***pf -*** the function context
- ***x -*** input vector (or NULL for the vector (0,1, .... N-1)



## Output Parameter

- ***y -*** output vector





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

## Level
beginner

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex4.c.html">src/dm/tutorials/ex4.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex22.c.html">src/snes/tutorials/ex22.c.html</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/pf/impls/constant/const.c.html#PFApplyVec_Constant">PFApplyVec_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#PFApplyVec_Identity">PFApplyVec_Identity in src/vec/pf/impls/constant/const.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)  
