PETSc version 3.17.4
Fix/Edit manual page

# DMSwarmInitializeVelocities

Set the initial velocities of particles using a distribution.

### Synopsis

    #include "petscdmswarm.h"
    PetscErrorCode DMSwarmInitializeVelocities(DM sw, PetscProbFunc sampler, const PetscReal v0[])

Collective on dm

### Input Parameters

| sw | - The DMSwarm object
| sampler | - A function which uniformly samples the velocity PDF
| v0 | - The velocity scale for nondimensionalization for each species

### See Also

DMSwarmComputeLocalSize(), DMSwarmInitializeCoordinates(), DMSwarmInitializeVelocitiesFromOptions()

### Level

advanced

### Location

src/dm/impls/swarm/swarmpic.c
Index of all DMSWARM routines
Table of Contents for all manual pages
Index of all manual pages