petsc4py.PETSc.DMPlexTransform#

class petsc4py.PETSc.DMPlexTransform#

Bases: Object

Mesh transformations.

Methods Summary

apply(dm)

Apply a mesh transformation.

create([comm])

Create a mesh transformation.

createSplitCellLabel(dm)

Return a label for cells whose source cell was split.

destroy()

Destroy a mesh transformation.

getActive()

Return the label marking the points to transform.

getSourcePoint(pNew)

Return the source point of a point of the transformed mesh.

getType()

Return the transformation type name.

setActive(label)

Set the label marking the points to transform.

setDM(dm)

Set the DM for the transformation.

setFromOptions()

Configure the transformation from the options database.

setType(tr_type)

Set the transformation type.

setUp()

Setup a mesh transformation.

view([viewer])

View the mesh transformation.

Methods Documentation

apply(dm)#

Apply a mesh transformation.

Collective.

Source code at petsc4py/PETSc/DMPlex.pyx:3929

Parameters:

dm (DM)

Return type:

DM

create(comm=None)#

Create a mesh transformation.

Collective.

Source code at petsc4py/PETSc/DMPlex.pyx:3940

Parameters:

comm (Comm | None)

Return type:

Self

createSplitCellLabel(dm)#

Return a label for cells whose source cell was split.

Not collective.

Parameters:

dm (DM) – The transformed mesh this transformation produced.

Return type:

DMLabel

Notes

This can include cells not flagged for refinement because the transform can split cells to restore conformity.

Source code at petsc4py/PETSc/DMPlex.pyx:3985

destroy()#

Destroy a mesh transformation.

Collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4036

Return type:

Self

getActive()#

Return the label marking the points to transform.

Not collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4009

Return type:

DMLabel

getSourcePoint(pNew)#

Return the source point of a point of the transformed mesh.

Not collective.

Parameters:

pNew (int) – The point in the transformed mesh.

Returns:

  • p (int) – The point of the original mesh that produced pNew.

  • r (int) – The replica number of pNew, that is, it is the rth point of the polytope type of pNew produced by p.

Return type:

tuple[int, int]

Source code at petsc4py/PETSc/DMPlex.pyx:3957

getType()#

Return the transformation type name.

Not collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4049

Return type:

str

setActive(label)#

Set the label marking the points to transform.

Logically collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4024

Parameters:

label (DMLabel)

Return type:

None

setDM(dm)#

Set the DM for the transformation.

Logically collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4087

Parameters:

dm (DM)

Return type:

None

setFromOptions()#

Configure the transformation from the options database.

Collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4096

Return type:

None

setType(tr_type)#

Set the transformation type.

Collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4073

Parameters:

tr_type (DMPlexTransformType | str)

Return type:

None

setUp()#

Setup a mesh transformation.

Collective.

Source code at petsc4py/PETSc/DMPlex.pyx:4063

Return type:

Self

view(viewer=None)#

View the mesh transformation.

Collective.

Parameters:

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

Return type:

None

Source code at petsc4py/PETSc/DMPlex.pyx:4108