# DMPlexTransformExtrudeSetNormalFunction
Set a function to determine the extrusion normal 
## Synopsis
```
#include "petscdmplextransform.h" 
PetscErrorCode DMPlexTransformExtrudeSetNormalFunction(DMPlexTransform tr, PetscSimplePointFunc normalFunc)
```
Not collective


## Input Parameters

- ***tr     -*** The DMPlexTransform
- ***normalFunc -*** A function determining the extrusion direction


Note: The calling sequence for the function is normalFunc(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt r, PetscScalar u[], void *ctx)
```none
dim  - The coordinate dimension of the original mesh (usually a surface)
```
```none
time - The current time, or 0.
```
```none
x    - The location of the current normal, in the coordinate space of the original mesh
```
```none
r    - The extrusion replica number (layer number) of this point
```
```none
u    - The user provides the computed normal on output; the sign and magnitude is not significant
```
```none
ctx  - An optional user context
```




## See Also
 `DMPlexTransformExtrudeGetNormal()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/transform/impls/extrudeplextrextrude.c.html#DMPlexTransformExtrudeSetNormalFunction">src/dm/impls/plex/transform/impls/extrudeplextrextrude.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/transform/impls/extrudeplextrextrude.c)


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