# PetscDualSpaceApply
Apply a functional from the dual space basis to an input function 
## Synopsis
```
#include "petscfe.h" 
PetscErrorCode PetscDualSpaceApply(PetscDualSpace sp, PetscInt f, PetscReal time, PetscFEGeom *cgeom, PetscInt numComp, PetscErrorCode (*func)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar *, void *), void *ctx, PetscScalar *value)
```

## Input Parameters

- ***sp      -*** The `PetscDualSpace` object
- ***f       -*** The basis functional index
- ***time    -*** The time
- ***cgeom   -*** A context with geometric information for this cell, we use v0 (the initial vertex) and J (the Jacobian) (or evaluated at the coordinates of the functional)
- ***numComp -*** The number of components for the function
- ***func    -*** The input function
- ***ctx     -*** A context for the function



## Output Parameter

- ***value   -*** numComp output values



## Calling Sequence of func
```none
  func(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt numComponents, PetscScalar values[], void *ctx)
```





## See Also
 `PetscDualSpace`, `PetscDualSpaceCreate()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/dualspace/interface/dualspace.c.html#PetscDualSpaceApply">src/dm/dt/dualspace/interface/dualspace.c</A>


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


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