:orphan:
# DMSwarmViewXDMF
Write `DMSWARM` fields to an XDMF3 file 
## Synopsis
```
PETSC_EXTERN PetscErrorCode DMSwarmViewXDMF(DM dm, const char filename[])
```
Collective


## Input parameters

- ***dm -*** the `DMSWARM`
- ***filename -*** the file name of the XDMF file (must have the extension .xmf)





## Note
Only fields user registered with data type `PETSC_DOUBLE` or `PETSC_INT` will be written into the file


## Developer Note
This should be removed and replaced with the standard use of `PetscViewer`


## See Also
 `DM`, `DMSWARM`, `DMSwarmViewFieldsXDMF()`

## Level
beginner

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex20.c.html">src/dm/tutorials/ex20.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex21.c.html">src/dm/tutorials/ex21.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex70.c.html">src/ksp/ksp/tutorials/ex70.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/swarm/swarmpic_view.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)  
