# DMSwarmInitializeVelocitiesFromOptions
Set the initial velocities of particles using a distribution determined from options. 
## Synopsis
```
#include "petscdmswarm.h"   
PetscErrorCode DMSwarmInitializeVelocitiesFromOptions(DM sw, const PetscReal v0[])
```
Collective on dm


## Input Parameters

- ***sw      -*** The DMSwarm object
- ***v0      -*** The velocity scale for nondimensionalization for each species





## See Also
 `DMSwarmComputeLocalSize()`, `DMSwarmInitializeCoordinates()`, `DMSwarmInitializeVelocities()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/swarmpic.c.html#DMSwarmInitializeVelocitiesFromOptions">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)  
