DMSwarmRestoreCellSwarm — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# DMSwarmRestoreCellSwarm

Restores a `DMSWARM` object obtained with `DMSwarmGetCellSwarm()`. All fields are copied back into the parent swarm.

## Synopsis

    #include "petscdmswarm.h"
    PetscErrorCode DMSwarmRestoreCellSwarm(DM sw, PetscInt cellID, DM cellswarm)

Noncollective

## Input Parameters

- sw - the parent `DMSWARM`

- cellID - the integer id of the cell to be copied back into the parent swarm

- cellswarm - the cell swarm object

## Note

This only supports `DMSWARM_PIC` types of `DMSWARM`s

## See Also

`DM`, `DMSWARM`, `DMSwarmGetCellSwarm()`

## Level

beginner

## Location

src/dm/impls/swarm/swarm.c

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