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

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

destroy()#

Destroy the cell DM.

Collective.

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

Return type:

Self

getBlockSize(sw)#

Return the block size for this cell DM.

Not collective.

Parameters:

sw (DM) – The DMSwarm object

Return type:

int

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

getCellID()#

Return the cellid field for this cell DM.

Not collective.

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

Return type:

str

getCoordinateFields()#

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

Not collective.

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

Return type:

list[str]

getDM()#

Return the underlying DM.

Not collective.

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

Return type:

DM

getFields()#

Return the swarm fields defined on this cell DM.

Not collective.

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

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

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