# PFSetType
Builds PF for a particular function 
## Synopsis
```
#include "petscpf.h" 
PetscErrorCode PFSetType(PF pf, PFType type, void *ctx)
```
Collective on PF


## Input Parameters

- ***pf -*** the function context.
- ***type -*** a known method
- ***ctx -*** optional type dependent context



## Options Database Key

- ***-pf_type <type> -*** Sets PF type



## Notes
See "petsc/include/petscpf.h" for available methods (for instance,
PFCONSTANT)




## See Also
 `PFSet()`, `PFRegister()`, `PFCreate()`, `DMDACreatePF()`


## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/pf/interface/pf.c.html#PFSetType">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>


---
[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)  
