Skip to main content
`Ctrl`+`K`

# DMSwarmSetVelocityFunction

Set the function setting initial particle velocities

## Synopsis

    #include "petscdmswarm.h"
    PetscErrorCode DMSwarmSetVelocityFunction(DM sw, PetscSimplePointFn *velFunc)

Not Collective

## Input Parameters

- sw - the `DMSWARM`

- velFunc - the function setting initial particle velocities, see `PetscSimplePointFn` for the calling sequence

## See Also

`DMSWARM`, `DMSwarmGetVelocityFunction()`, `DMSwarmSetCoordinateFunction()`, `DMSwarmInitializeVelocities()`, `PetscSimplePointFn`

## Level

intermediate

## Location

src/dm/impls/swarm/swarmpic.c

Index of all DMSwarm routines
Table of Contents for all manual pages
Index of all manual pages