DMSwarmGetCellSwarm#

Extracts a single cell from the DMSwarm object, returns it as a single cell DMSwarm. The cell DM is filtered for fields of that cell, and the filtered DM is used as the cell DM of the new swarm object.

Synopsis#

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

Important: Changes to this cell of the swarm will be lost if they are made prior to restoring this cell.

Noncollective

Input parameters#

  • sw - the DMSwarm

  • cellID - the integer id of the cell to be extracted and filtered

  • cellswarm - The DMSwarm to receive the cell

Notes#

This presently only supports DMSWARM_PIC type

Should be restored with DMSwarmRestoreCellSwarm()

See Also#

DMSwarmRestoreCellSwarm()

Level#

beginner

Location#

src/dm/impls/swarm/swarm.c


Edit on GitLab

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