Skip to main content
`Ctrl`+`K`

# PFSet

Sets the C/C++/Fortran functions to be used by the PF function

## Synopsis

    #include "petscpf.h"
    PetscErrorCode PFSet(PF pf, PetscErrorCode (*apply)(PetscCtx, PetscInt, const PetscScalar *, PetscScalar *), PetscErrorCode (*applyvec)(PetscCtx, Vec, Vec), PetscErrorCode (*view)(PetscCtx, PetscViewer), PetscErrorCode (*destroy)(PetscCtxRt), PetscCtx ctx)

Collective

## Input Parameters

- pf - the function context

- apply - function to apply to an array

- applyvec - function to apply to a Vec

- view - function that prints information about the `PF`

- destroy - function to free the private function context

- ctx - private function context

## See Also

`PF`, `PFCreate()`, `PFDestroy()`, `PFSetType()`, `PFApply()`, `PFApplyVec()`

## Level

beginner

## Location

src/vec/pf/interface/pf.c

## Examples

src/dm/tutorials/ex4.c

Index of all PF routines
Table of Contents for all manual pages
Index of all manual pages