PETSc version 3.17.0
Fix/Edit manual page

# DMSwarmComputeLocalSize

Compute the local number and distribution of particles based upon a density function

### Synopsis

    #include "petscdmswarm.h"
    PetscErrorCode DMSwarmComputeLocalSize(DM sw, PetscInt N, PetscProbFunc density)

Not collective

### Input Parameters

| sw | - The DMSwarm
| N | - The target number of particles
| density | - The density field for the particle layout, normalized to unity

Note: One particle will be created for each species.

### See Also

DMSwarmComputeLocalSizeFromOptions()

### 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