:orphan:
# DMSwarmCollectViewCreate
Applies a collection method and gathers points in neighbour ranks into the `DMSWARM` 
## Synopsis
```
#include "petscdmswarm.h"   
PetscErrorCode DMSwarmCollectViewCreate(DM dm)
```
Collective


## Input parameter

- ***dm -*** the `DMSWARM`





## Notes
Users should call `DMSwarmCollectViewDestroy()` after
they have finished computations associated with the collected points
Different collect methods are supported. See `DMSwarmSetCollectType()`.


## See Also
 `DM`, `DMSWARM`, `DMSwarmCollectViewDestroy()`, `DMSwarmSetCollectType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/swarm.c.html#DMSwarmCollectViewCreate">src/dm/impls/swarm/swarm.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/swarm_ex1.c.html">src/dm/tutorials/swarm_ex1.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/swarm/swarm.c)


[Index of all DMSwarm routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
