# DMSwarmSetCoordinateFunction
Set the function setting initial particle positions 
## Synopsis
```
#include "petscdmswarm.h"   
PetscErrorCode DMSwarmSetCoordinateFunction(DM sw, PetscSimplePointFunc coordFunc)
```
Not collective


## Input parameters

- ***dm -*** the DMSwarm
- ***coordFunc -*** the function setting initial particle positions





## See Also
 `DMSwarmGetCoordinateFunction()`, `DMSwarmSetVelocityFunction()`, `DMSwarmInitializeCoordinates()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/swarmpic.c.html#DMSwarmSetCoordinateFunction">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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
