# DMSwarmType
Defines the type of `DMSWARM` 
## Synopsis
```
typedef enum {
  DMSWARM_BASIC = 0,
  DMSWARM_PIC
} DMSwarmType;
```
DMSWARM_BASIC defines N entries of varied data-types which the user may register.

DMSWARM_PIC is suitable for particle-in-cell methods. Configured as DMSWARM_PIC, the swarm will be aware of, another DM which serves as the background mesh.
Fields specific to particle-in-cell methods are registered by default. These include spatial coordinates, a unique identifier, a cell index and an index for
the owning rank. The background mesh will (by default) define the spatial decomposition of the points defined in the swarm. DMSWARM_PIC provides support
for particle-in-cell operations such as defining initial point coordinates, communicating particles between sub-domains, projecting particle data fields on to the mesh.




## See Also
 `DMSwarmSetType()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscdmswarm.h.html#DMSwarmType">include/petscdmswarm.h</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/tutorials/ex1.c.html">src/dm/impls/swarm/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/tutorials/ex1f90.F90.html">src/dm/impls/swarm/tutorials/ex1f90.F90.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex20.c.html">src/dm/tutorials/ex20.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex21.c.html">src/dm/tutorials/ex21.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/swarm_ex3.c.html">src/dm/tutorials/swarm_ex3.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex70.c.html">src/ksp/ksp/tutorials/ex70.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex63.c.html">src/snes/tutorials/ex63.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex77.c.html">src/ts/tutorials/ex77.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdmswarm.h)


[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)  
