# PFCreate
Creates a mathematical function context. 
## Synopsis
```
#include "petscpf.h" 
PetscErrorCode PFCreate(MPI_Comm comm, PetscInt dimin, PetscInt dimout, PF *pf)
```
Collective


## Input Parameters

- ***comm -*** MPI communicator
- ***dimin -*** dimension of the space you are mapping from
- ***dimout -*** dimension of the space you are mapping to



## Output Parameter

- ***pf -*** the function context





## See Also
 `PFSet()`, `PFApply()`, `PFDestroy()`, `PFApplyVec()`

## Level
developer

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

## Examples
<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#PFCreate_Constant">PFCreate_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#PFCreate_Quick(PF pf, PetscErrorCode (*function)">PFCreate_Quick(PF pf, PetscErrorCode (*function) 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#PFCreate_Identity">PFCreate_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#PFCreate_Matlab">PFCreate_Matlab in src/vec/pf/impls/matlab/cmatlab.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/pf/impls/string/cstring.c.html#PFCreate_String">PFCreate_String in src/vec/pf/impls/string/cstring.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)  
