Skip to main content
`Ctrl`+`K`

# petsc4py.PETSc.CellDM

class petsc4py.PETSc.CellDM

  Bases: `Object`

  CellDM object.

  See also

  `DMSwarmCellDM`

  Methods Summary

  `create`(dm, fields, coords) | Create the cell DM.
  `destroy`() | Destroy the cell DM.
  `getBlockSize`(sw) | Return the block size for this cell DM.
  `getCellID`() | Return the cellid field for this cell DM.
  `getCoordinateFields`() | Return the swarm fields used as coordinates on this cell DM.
  `getDM`() | Return the underlying DM.
  `getFields`() | Return the swarm fields defined on this cell DM.
  `view`([viewer]) | View the cell DM.

  Methods Documentation

  create(dm, fields, coords)

    Create the cell DM.

    Collective.

    Parameters:

      - dm (DM) – The underlying DM on which to place particles

      - fields (Sequence[str]) – The swarm fields represented on the DM

      - coords (Sequence[str]) – The swarm fields to use as coordinates in the DM

    Return type:

      Self

    See also

    `destroy`, `DMSwarmCellDMCreate`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1121

  destroy()

    Destroy the cell DM.

    Collective.

    See also

    `create`, `DMSwarmCellDMDestroy`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1108

    Return type:

      Self

  getBlockSize(sw)

    Return the block size for this cell DM.

    Not collective.

    Parameters:

      sw (DM) – The `DMSwarm` object

    Return type:

      int

    See also

    `DMSwarmCellDMGetBlockSize`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1195

  getCellID()

    Return the cellid field for this cell DM.

    Not collective.

    See also

    `DMSwarmCellDMGetCellID`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1181

    Return type:

      str

  getCoordinateFields()

    Return the swarm fields used as coordinates on this cell DM.

    Not collective.

    See also

    `DMSwarmCellDMGetCoordinateFields`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1232

    Return type:

      list[str]

  getDM()

    Return the underlying DM.

    Not collective.

    See also

    `DMSwarmCellDMGetDM`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1164

    Return type:

      DM

  getFields()

    Return the swarm fields defined on this cell DM.

    Not collective.

    See also

    `DMSwarmCellDMGetFields`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1214

    Return type:

      list[str]

  view(viewer=None)

    View the cell DM.

    Collective.

    Parameters:

      viewer (Viewer | None) – A `Viewer` instance or `None` for the default viewer.

    Return type:

      None

    See also

    `Viewer`, `DMSwarmCellDMView`

    Source code at petsc4py/PETSc/DMSwarm.pyx:1089