Skip to main content
`Ctrl`+`K`

# DMSwarmViewFieldsXDMF

Write a selection of DMSwarm fields to an XDMF3 file

## Synopsis

    #include "petscdmda.h"
    #include "petscdmswarm.h"
    PetscErrorCode DMSwarmViewFieldsXDMF(DM dm, const char filename[], PetscInt nfields, const char *field_name_list[])

Collective

## Input Parameters

- dm - the `DMSWARM`

- filename - the file name of the XDMF file (must have the extension .xmf)

- nfields - the number of fields to write into the XDMF file

- field_name_list - array of length nfields containing the textual name of fields to write

## Note

Only fields registered with data type `PETSC_DOUBLE` or `PETSC_INT` can be written into the file

## See Also

`DM`, `DMSWARM`, `DMSwarmViewXDMF()`

## Level

beginner

## Location

src/dm/impls/swarm/swarmpic_view.c

## Examples

src/dm/tutorials/ex20.c

Index of all DMSwarm routines
Table of Contents for all manual pages
Index of all manual pages