:orphan:
# DMSwarmSetVelocityFunction
Set the function setting initial particle velocities 
## Synopsis
```
#include "petscdmswarm.h"   
PetscErrorCode DMSwarmSetVelocityFunction(DM sw, PetscSimplePointFunc velFunc)
```
Not Collective


## Input parameters

- ***dm -*** the `DMSWARM`
- ***coordFunc -*** the function setting initial particle velocities





## See Also
 `DMSWARM`, `DMSwarmGetVelocityFunction()`, `DMSwarmSetCoordinateFunction()`, `DMSwarmInitializeVelocities()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/swarmpic.c.html#DMSwarmSetVelocityFunction">src/dm/impls/swarm/swarmpic.c</A>


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


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