# petsc4py.PETSc.DMPlex

class petsc4py.PETSc.DMPlex

  Bases: `DM`

  Encapsulate an unstructured mesh.

  DMPlex encapsulates both topology and geometry. It is capable of parallel refinement and coarsening (using Pragmatic or ParMmg) and parallel redistribution for load balancing.

  Methods Summary

  `computeCellGeometryFVM`(cell) | Compute the volume for a given cell.
  `computeGradientClementInterpolant`(locX, locC) | Return the L2 projection of the cellwise gradient of a function onto P1.
  `constructGhostCells`([labelName]) | Construct ghost cells which connect to every boundary face.
  `coordinatesLoad`(viewer, sfxc) | Load coordinates into this `DMPlex` object.
  `coordinatesView`(viewer) | Save `DMPlex` coordinates into a file.
  `create`([comm]) | Create a `DMPlex` object, which encapsulates an unstructured mesh.
  `createBoxMesh`(faces[, lower, upper, ...]) | Create a mesh on the tensor product of intervals.
  `createBoxSurfaceMesh`(faces[, lower, upper, ...]) | Create a mesh on the surface of a box mesh using tensor cells.
  `createCGNS`(cgid[, interpolate, comm]) | Create a `DMPlex` mesh from a CGNS file.
  `createCGNSFromFile`(filename[, interpolate, comm]) | "Create a `DMPlex` mesh from a CGNS file.
  `createClosureIndex`(sec) | Calculate an index for `sec` for the closure operation.
  `createCoarsePointIS`() | Create an `IS` covering the coarse `DMPlex` chart with the fine points as data.
  `createCohesiveSubmesh`(hasLagrange, value) | Extract the hypersurface defined by one face of the cohesive cells.
  `createExodus`(exoid[, interpolate, comm]) | Create a `DMPlex` mesh from an ExodusII file ID.
  `createExodusFromFile`(filename[, ...]) | Create a `DMPlex` mesh from an ExodusII file.
  `createFromCellList`(dim, cells, coords[, ...]) | Create a `DMPlex` from a list of vertices for each cell on process 0.
  `createFromFile`(filename[, plexname, ...]) | Create `DMPlex` from a file.
  `createGmsh`(viewer[, interpolate, comm]) | Create a `DMPlex` mesh from a Gmsh file viewer.
  `createPointNumbering`() | Create a global numbering for all points.
  `createSection`(numComp, numDof[, bcField, ...]) | Create a `Section` based upon the DOF layout specification provided.
  `distribute`([overlap]) | Distribute the mesh and any associated sections.
  `distributeField`(sf, sec, vec[, newsec, newvec]) | Distribute field data with a with a given `SF`.
  `distributeGetDefault`() | Return a flag indicating whether the `DM` should be distributed by default.
  `distributeOverlap`([overlap]) | Add partition overlap to a distributed non-overlapping `DMPlex`.
  `distributeSetDefault`(flag) | Set flag indicating whether the `DMPlex` should be distributed by default.
  `distributionGetName`() | Retrieve the name of the specific parallel distribution.
  `distributionSetName`(name) | Set the name of the specific parallel distribution.
  `generate`(boundary[, name, interpolate]) | Generate a mesh.
  `getAdjacency`(p) | Return all points adjacent to the given point.
  `getAdjacencyUseAnchors`() | Query whether adjacency in the mesh uses the point-to-point constraints.
  `getCellNumbering`() | Return a global cell numbering for all cells on this process.
  `getCellType`(p) | Return the polytope type of a given cell.
  `getCellTypeLabel`() | Return the `DMLabel` recording the polytope type of each cell.
  `getChart`() | Return the interval for all mesh points [`pStart`, `pEnd`).
  `getCone`(p) | Return the points on the in-edges for this point in the DAG.
  `getConeOrientation`(p) | Return the orientations on the in-edges for this point in the DAG.
  `getConeSize`(p) | Return the number of in-edges for this point in the DAG.
  `getDepth`() | Return the depth of the DAG representing this mesh.
  `getDepthStratum`(svalue) | Return the bounds [`start`, `end`) for all points at a certain depth.
  `getFullJoin`(points) | Return an array for the join of the set of points.
  `getHeightStratum`(svalue) | Return the bounds [`start`, `end`) for all points at a certain height.
  `getJoin`(points) | Return an array for the join of the set of points.
  `getMaxSizes`() | Return the maximum number of in-edges and out-edges of the DAG.
  `getMeet`(points) | Return an array for the meet of the set of points.
  `getMinRadius`() | Return the minimum distance from any cell centroid to a face.
  `getOrdering`(otype) | Calculate a reordering of the mesh.
  `getPartitioner`() | Return the mesh partitioner.
  `getPointDepth`(point) | Return the depth of a given point.
  `getPointGlobal`(point) | Return location of point data in global `Vec`.
  `getPointGlobalField`(point, field) | Return location of point field data in global `Vec`.
  `getPointHeight`(point) | Return the height of a given point.
  `getPointLocal`(point) | Return location of point data in local `Vec`.
  `getPointLocalField`(point, field) | Return location of point field data in local `Vec`.
  `getRefinementLimit`() | Retrieve the maximum cell volume for refinement.
  `getRefinementUniform`() | Retrieve the flag for uniform refinement.
  `getSubpointIS`() | Return an `IS` covering the entire subdm chart.
  `getSubpointMap`() | Return a `DMLabel` with point dimension as values.
  `getSupport`(p) | Return the points on the out-edges for this point in the DAG.
  `getSupportSize`(p) | Return the number of out-edges for this point in the DAG.
  `getTransitiveClosure`(p[, useCone]) | Return the points and orientations on the transitive closure of this point.
  `getVecClosure`(sec, vec, point) | Return an array of the values on the closure of a point.
  `getVertexNumbering`() | Return a global vertex numbering for all vertices on this process.
  `globalVectorLoad`(viewer, sectiondm, sf, vec) | Load on-disk vector data into a global vector.
  `globalVectorView`(viewer, sectiondm, vec) | Save a global vector.
  `insertCone`(p, conePos, conePoint) | DMPlexInsertCone - Insert a point into the in-edges for the point p in the DAG.
  `insertConeOrientation`(p, conePos, ...) | Insert a point orientation for the in-edge for the point p in the DAG.
  `interpolate`() | Convert to a mesh with all intermediate faces, edges, etc.
  `isDistributed`() | Return the flag indicating if the mesh is distributed.
  `isSimplex`() | Return the flag indicating if the first cell is a simplex.
  `labelCohesiveComplete`(label, bdlabel, ...) | Add all other mesh pieces to complete the surface.
  `labelComplete`(label) | Add the transitive closure to the surface.
  `labelsLoad`(viewer, sfxc) | Load labels into this `DMPlex` object.
  `labelsView`(viewer) | Save `DMPlex` labels into a file.
  `localVectorLoad`(viewer, sectiondm, sf, vec) | Load on-disk vector data into a local vector.
  `localVectorView`(viewer, sectiondm, vec) | Save a local vector.
  `markBoundaryFaces`(label[, value]) | Mark all faces on the boundary.
  `metricAverage2`(metric1, metric2, metricAvg) | Compute and return the unweighted average of two metrics.
  `metricAverage3`(metric1, metric2, metric3, ...) | Compute and return the unweighted average of three metrics.
  `metricCreate`([field]) | Create a Riemannian metric field.
  `metricCreateIsotropic`(indicator[, field]) | Construct an isotropic metric from an error indicator.
  `metricCreateUniform`(alpha[, field]) | Construct a uniform isotropic metric.
  `metricDeterminantCreate`([field]) | Create the determinant field for a Riemannian metric.
  `metricEnforceSPD`(metric, ometric, determinant) | Enforce symmetric positive-definiteness of a metric.
  `metricGetGradationFactor`() | Return the metric gradation factor.
  `metricGetHausdorffNumber`() | Return the metric Hausdorff number.
  `metricGetMaximumAnisotropy`() | Return the maximum tolerated metric anisotropy.
  `metricGetMaximumMagnitude`() | Return the maximum tolerated metric magnitude.
  `metricGetMinimumMagnitude`() | Return the minimum tolerated metric magnitude.
  `metricGetNormalizationOrder`() | Return the order p for L-p normalization.
  `metricGetNumIterations`() | Return the number of parallel adaptation iterations.
  `metricGetTargetComplexity`() | Return the target metric complexity.
  `metricGetVerbosity`() | Return the verbosity of the mesh adaptation package.
  `metricIntersection2`(metric1, metric2, metricInt) | Compute and return the intersection of two metrics.
  `metricIntersection3`(metric1, metric2, ...) | Compute the intersection of three metrics.
  `metricIsIsotropic`() | Return the flag indicating whether the metric is isotropic or not.
  `metricIsUniform`() | Return the flag indicating whether the metric is uniform or not.
  `metricNoInsertion`() | Return the flag indicating whether node insertion and deletion are turned off.
  `metricNoMovement`() | Return the flag indicating whether node movement is turned off.
  `metricNoSurf`() | Return the flag indicating whether surface modification is turned off.
  `metricNoSwapping`() | Return the flag indicating whether facet swapping is turned off.
  `metricNormalize`(metric, ometric, determinant) | Apply L-p normalization to a metric.
  `metricRestrictAnisotropyFirst`() | Return `true` if anisotropy is restricted before normalization.
  `metricSetFromOptions`() | Configure the object from the options database.
  `metricSetGradationFactor`(beta) | Set the metric gradation factor.
  `metricSetHausdorffNumber`(hausd) | Set the metric Hausdorff number.
  `metricSetIsotropic`(isotropic) | Record whether the metric is isotropic or not.
  `metricSetMaximumAnisotropy`(a_max) | Set the maximum tolerated metric anisotropy.
  `metricSetMaximumMagnitude`(h_max) | Set the maximum tolerated metric magnitude.
  `metricSetMinimumMagnitude`(h_min) | Set the minimum tolerated metric magnitude.
  `metricSetNoInsertion`(noInsert) | Set the flag indicating whether node insertion should be turned off.
  `metricSetNoMovement`(noMove) | Set the flag indicating whether node movement should be turned off.
  `metricSetNoSurf`(noSurf) | Set the flag indicating whether surface modification should be turned off.
  `metricSetNoSwapping`(noSwap) | Set the flag indicating whether facet swapping should be turned off.
  `metricSetNormalizationOrder`(p) | Set the order p for L-p normalization.
  `metricSetNumIterations`(numIter) | Set the number of parallel adaptation iterations.
  `metricSetRestrictAnisotropyFirst`(...) | Record whether anisotropy is be restricted before normalization or after.
  `metricSetTargetComplexity`(targetComplexity) | Set the target metric complexity.
  `metricSetUniform`(uniform) | Record whether the metric is uniform or not.
  `metricSetVerbosity`(verbosity) | Set the verbosity of the mesh adaptation package.
  `orient`() | Give a consistent orientation to the input mesh.
  `permute`(perm) | Reorder the mesh according to the input permutation.
  `rebalanceSharedPoints`([entityDepth, ...]) | Redistribute shared points in order to achieve better balancing.
  `reorderGetDefault`() | Return flag indicating whether the `DMPlex` should be reordered by default.
  `reorderSetDefault`(flag) | Set flag indicating whether the DM should be reordered by default.
  `sectionLoad`(viewer, sectiondm, sfxc) | Load section into a `DM`.
  `sectionView`(viewer, sectiondm) | Save a section associated with a `DMPlex`.
  `setAdjacencyUseAnchors`([useAnchors]) | Define adjacency in the mesh using the point-to-point constraints.
  `setCellType`(p, ctype) | Set the polytope type of a given cell.
  `setChart`(pStart, pEnd) | Set the interval for all mesh points [`pStart`, `pEnd`).
  `setCone`(p, cone[, orientation]) | Set the points on the in-edges for this point in the DAG.
  `setConeOrientation`(p, orientation) | Set the orientations on the in-edges for this point in the DAG.
  `setConeSize`(p, size) | Set the number of in-edges for this point in the DAG.
  `setMatClosure`(sec, gsec, mat, point, values) | Set an array of the values on the closure of `point`.
  `setPartitioner`(part) | Set the mesh partitioner.
  `setRefinementLimit`(refinementLimit) | Set the maximum cell volume for refinement.
  `setRefinementUniform`([refinementUniform]) | Set the flag for uniform refinement.
  `setSupport`(p, supp) | Set the points on the out-edges for this point in the DAG.
  `setSupportSize`(p, size) | Set the number of out-edges for this point in the DAG.
  `setTetGenOptions`(opts) | Set the options used for the Tetgen mesh generator.
  `setTriangleOptions`(opts) | Set the options used for the Triangle mesh generator.
  `setVecClosure`(sec, vec, point, values[, addv]) | Set an array of the values on the closure of `point`.
  `stratify`() | Calculate the strata of DAG.
  `symmetrize`() | Create support (out-edge) information from cone (in-edge) information.
  `topologyLoad`(viewer) | Load a topology into this `DMPlex` object.
  `topologyView`(viewer) | Save a `DMPlex` topology into a file.
  `uninterpolate`() | Convert to a mesh with only cells and vertices.
  `vecGetClosure`(sec, vec, p) | Return an array of values on the closure of `p`.

  Methods Documentation

  computeCellGeometryFVM(cell)

    Compute the volume for a given cell.

    Not collective.

    Parameters:

      cell (int) – The cell.

    Returns:

      - volume (`float`) – The cell volume.

      - centroid (`ArrayReal`) – The cell centroid.

      - normal (`ArrayReal`) – The cell normal, if appropriate.

    Return type:

      tuple[float, ArrayReal, ArrayReal]

    See also

    `DMPlex`, `DM.getCoordinateSection`, `DM.getCoordinates`, `DMPlexComputeCellGeometryFVM`

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

  computeGradientClementInterpolant(locX, locC)

    Return the L2 projection of the cellwise gradient of a function onto P1.

    Collective.

    Parameters:

      - locX (Vec) – The coefficient vector of the function.

      - locC (Vec) – The output `Vec` which holds the Clement interpolant of the gradient.

    Return type:

      Vec

    See also

    `DM`, `DMPlex`, `DMPlexComputeGradientClementInterpolant`

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

  constructGhostCells(labelName=None)

    Construct ghost cells which connect to every boundary face.

    Collective.

    Parameters:

      labelName (str | None) – The name of the label specifying the boundary faces. Defaults to `"Face Sets"`.

    Returns:

      numGhostCells – The number of ghost cells added to the `DMPlex`.

    Return type:

      `int`

    See also

    `DM`, `DMPlex`, `DM.create`, `DMPlexConstructGhostCells`

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

  coordinatesLoad(viewer, sfxc)

    Load coordinates into this `DMPlex` object.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` for the saved coordinates.

      - sfxc (SF) – The `SF` returned by `topologyLoad`.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.load`, `DMPlex.topologyLoad`, `DMPlex.labelsLoad`, `DM.view`, `SF`, `Viewer`, `DMPlexCoordinatesLoad`

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

  coordinatesView(viewer)

    Save `DMPlex` coordinates into a file.

    Collective.

    Parameters:

      viewer (Viewer) – The `Viewer` for saving.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.view`, `DMPlex.topologyView`, `DMPlex.labelsView`, `DMPlex.coordinatesLoad`, `Viewer`, `DMPlexCoordinatesView`

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

  create(comm=None)

    Create a `DMPlex` object, which encapsulates an unstructured mesh.

    Collective.

    Parameters:

      comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DM.create`, `DM.setType`, `DMPlexCreate`

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

  createBoxMesh(faces, lower=(0, 0, 0), upper=(1, 1, 1), simplex=True, periodic=False, interpolate=True, localizationHeight=0, sparseLocalize=True, comm=None)

    Create a mesh on the tensor product of intervals.

    Collective.

    Parameters:

      - faces (Sequence[int]) – Number of faces per dimension, or `None` for the default.

      - lower (Sequence[float] | None) – The lower left corner.

      - upper (Sequence[float] | None) – The upper right corner.

      - simplex (bool | None) – `True` for simplices, `False` for tensor cells.

      - periodic (Sequence | str | int | bool | None) – The boundary type for the X, Y, Z direction, or `None` for `DM.BoundaryType.NONE`.

      - interpolate (bool | None) – Flag to create intermediate mesh entities (edges, faces).

      - localizationHeight (int | None) – Flag to localize edges and faces in addition to cells; only significant for periodic meshes.

      - sparseLocalize (bool | None) – Flag to localize coordinates only for cells near the periodic boundary; only significant for periodic meshes.

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DM.setFromOptions`, `DMPlex.createFromFile`, `DM.setType`, `DM.create`, `DMPlexCreateBoxMesh`

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

  createBoxSurfaceMesh(faces, lower=(0, 0, 0), upper=(1, 1, 1), interpolate=True, comm=None)

    Create a mesh on the surface of a box mesh using tensor cells.

    Collective.

    Parameters:

      - faces (Sequence[int]) – Number of faces per dimension, or `None` for the default.

      - lower (Sequence[float] | None) – The lower left corner.

      - upper (Sequence[float] | None) – The upper right corner.

      - interpolate (bool | None) – Flag to create intermediate mesh pieces (edges, faces).

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DM.setFromOptions`, `DMPlex.createBoxMesh`, `DMPlex.createFromFile`, `DM.setType`, `DM.create`, `DMPlexCreateBoxSurfaceMesh`

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

  createCGNS(cgid, interpolate=True, comm=None)

    Create a `DMPlex` mesh from a CGNS file.

    Collective.

    Parameters:

      - cgid (int) – The CG id associated with a file and obtained using cg_open.

      - interpolate (bool | None) – Create faces and edges in the mesh.

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.createCGNSFromFile`, `DMPlex.createExodus`, `DMPlexCreateCGNS`

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

  createCGNSFromFile(filename, interpolate=True, comm=None)

    “Create a `DMPlex` mesh from a CGNS file.

    Collective.

    Parameters:

      - filename (str) – The name of the CGNS file.

      - interpolate (bool | None) – Create faces and edges in the mesh.

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.createCGNS`, `DMPlex.createExodus`, `DMPlexCreateCGNS`

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

  createClosureIndex(sec)

    Calculate an index for `sec` for the closure operation.

    Not collective.

    Parameters:

      sec (Section) – The `Section` describing the layout in the local vector, or `None` to use the default section.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `Section`, `DMPlex.vecGetClosure`, `DMPlexCreateClosureIndex`

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

  createCoarsePointIS()

    Create an `IS` covering the coarse `DMPlex` chart with the fine points as data.

    Collective.

    Returns:

      fpointIS – The `IS` of all the fine points which exist in the original coarse mesh.

    Return type:

      `IS`

    See also

    `DM`, `DMPlex`, `IS`, `DM.refine`, `DMPlex.setRefinementUniform`, `DMPlexCreateCoarsePointIS`

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

  createCohesiveSubmesh(hasLagrange, value)

    Extract the hypersurface defined by one face of the cohesive cells.

    Collective.

    Parameters:

      - hasLagrange (bool) – Flag indicating whether the mesh has Lagrange dofs in the cohesive cells.

      - value (int) – A label value.

    Return type:

      DMPlex

    See also

    `DM`, `DMPlex`, `DMPlexCreateCohesiveSubmesh`

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

  createExodus(exoid, interpolate=True, comm=None)

    Create a `DMPlex` mesh from an ExodusII file ID.

    Collective.

    Parameters:

      - exoid (int) – The ExodusII id associated with a file obtained using `ex_open`.

      - interpolate (bool | None) – Create faces and edges in the mesh,

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DM.create`, `DMPlexCreateExodus`

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

  createExodusFromFile(filename, interpolate=True, comm=None)

    Create a `DMPlex` mesh from an ExodusII file.

    Collective.

    Parameters:

      - filename (str) – The name of the ExodusII file.

      - interpolate (bool | None) – Create faces and edges in the mesh.

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DM.create`, `DMPlex.createExodus`, `DMPlexCreateExodusFromFile`

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

  createFromCellList(dim, cells, coords, interpolate=True, comm=None)

    Create a `DMPlex` from a list of vertices for each cell on process 0.

    Collective.

    Parameters:

      - dim (int) – The topological dimension of the mesh.

      - cells (Sequence[int]) – An array of number of cells times number of vertices on each cell.

      - coords (Sequence[float]) – An array of number of vertices times spatial dimension for coordinates.

      - interpolate (bool | None) – Flag to interpolate the mesh.

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.interpolate`, `DMPlexCreateFromCellListPetsc`

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

  createFromFile(filename, plexname='unnamed', interpolate=True, comm=None)

    Create `DMPlex` from a file.

    Collective.

    Parameters:

      - filename (str) – A file name.

      - plexname (str | None) – The name of the resulting `DMPlex`, also used for intra-datafile lookup by some formats.

      - interpolate (bool | None) – Flag to create intermediate mesh pieces (edges, faces).

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DMPlex.createFromCellList`, `DMPlex.create`, `Object.setName`, `DM.view`, `DM.load`, Working with PETSc options, `DMPlexCreateFromFile`

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

  createGmsh(viewer, interpolate=True, comm=None)

    Create a `DMPlex` mesh from a Gmsh file viewer.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` associated with a Gmsh file.

      - interpolate (bool | None) – Create faces and edges in the mesh.

      - comm (Comm | None) – MPI communicator, defaults to `Sys.getDefaultComm`.

    Return type:

      Self

    Notes

    `-dm_plex_gmsh_hybrid` forces triangular prisms to use tensor order.

    `-dm_plex_gmsh_periodic` allows for reading Gmsh periodic section.

    `-dm_plex_gmsh_highorder` allows for generating high-order coordinates.

    `-dm_plex_gmsh_project` projects high-order coordinates to a different space, use the prefix `-dm_plex_gmsh_project_` to define the space.

    `-dm_plex_gmsh_use_regions` generates labels with region names.

    `-dm_plex_gmsh_mark_vertices` adds vertices to generated labels.

    `-dm_plex_gmsh_multiple_tags` allows multiple tags for default labels.

    `-dm_plex_gmsh_spacedim <d>` embedding space dimension.

    See also

    `DM`, `DMPlex`, `DM.create`, Working with PETSc options, `DMPlexCreateGmsh`

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

  createPointNumbering()

    Create a global numbering for all points.

    Collective.

    See also

    `DM`, `DMPlex`, `DMPlex.getCellNumbering`, `DMPlexCreatePointNumbering`

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

    Return type:

      IS

  createSection(numComp, numDof, bcField=None, bcComps=None, bcPoints=None, perm=None)

    Create a `Section` based upon the DOF layout specification provided.

    Not collective.

    Parameters:

      - numComp (Sequence[int]) – An array of size `numFields` holding the number of components per field.

      - numDof (Sequence[int]) – An array of size `numFields*(dim+1)` holding the number of DOFs per field on a mesh piece of dimension `dim`.

      - bcField (Sequence[int] | None) – An array of size `numBC` giving the field number for each boundary condition, where `numBC` is the number of boundary conditions.

      - bcComps (Sequence[IS] | None) – An array of size `numBC` giving an `IS` holding the field components to which each boundary condition applies.

      - bcPoints (Sequence[IS] | None) – An array of size `numBC` giving an `IS` holding the `DMPlex` points to which each boundary condition applies.

      - perm (IS | None) – Permutation of the chart.

    Return type:

      Section

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `Section.create`, `Section.setPermutation`, `DMPlexCreateSection`

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

  distribute(overlap=0)

    Distribute the mesh and any associated sections.

    Collective.

    Parameters:

      overlap (int | None) – The overlap of partitions.

    Returns:

      sf – The `SF` used for point distribution, or `None` if not distributed.

    Return type:

      `SF` or `None`

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlexDistribute`

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

  distributeField(sf, sec, vec, newsec=None, newvec=None)

    Distribute field data with a with a given `SF`.

    Collective.

    Parameters:

      - sf (SF) – The `SF` describing the communication pattern.

      - sec (Section) – The `Section` for existing data layout.

      - vec (Vec) – The existing data in a local vector.

      - newsec (Section | None) – The `SF` describing the new data layout.

      - newvec (Vec | None) – The new data in a local vector.

    Returns:

      - newSection (`Section`) – The `SF` describing the new data layout.

      - newVec (`Vec`) – The new data in a local vector.

    Return type:

      tuple[Section, Vec]

    See also

    `DMPlex`, `DMPlex.distribute`, `DMPlexDistributeField`

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

  distributeGetDefault()

    Return a flag indicating whether the `DM` should be distributed by default.

    Not collective.

    Returns:

      dist – Flag indicating whether the `DMPlex` should be distributed by default.

    Return type:

      `bool`

    See also

    `DM`, `DMPlex`, `DMPlex.distributeSetDefault`, `DMPlex.distribute`, `DMPlexDistributeGetDefault`

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

  distributeOverlap(overlap=0)

    Add partition overlap to a distributed non-overlapping `DMPlex`.

    Collective.

    Parameters:

      overlap (int | None) – The overlap of partitions (the same on all ranks).

    Returns:

      sf – The `SF` used for point distribution.

    Return type:

      `SF`

    See also

    `DM`, `DMPlex`, `SF`, `DMPlex.create`, `DMPlex.distribute`, `DMPlexDistributeOverlap`

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

  distributeSetDefault(flag)

    Set flag indicating whether the `DMPlex` should be distributed by default.

    Logically collective.

    Parameters:

      flag (bool) – Flag indicating whether the `DMPlex` should be distributed by default.

    Return type:

      None

    See also

    `DMPlex`, `DMPlex.distributeGetDefault`, `DMPlex.distribute`, `DMPlexDistributeSetDefault`

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

  distributionGetName()

    Retrieve the name of the specific parallel distribution.

    Not collective.

    Returns:

      name – The name of the specific parallel distribution.

    Return type:

      `str`

    See also

    `DMPlex`, `DMPlex.distributionSetName`, `DMPlex.topologyView`, `DMPlex.topologyLoad`, `DMPlexDistributionGetName`

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

  distributionSetName(name)

    Set the name of the specific parallel distribution.

    Logically collective.

    Parameters:

      name (str) – The name of the specific parallel distribution.

    Return type:

      None

    See also

    `DMPlex`, `DMPlex.distributionGetName`, `DMPlex.topologyView`, `DMPlex.topologyLoad`, `DMPlexDistributionSetName`

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

  generate(boundary, name=None, interpolate=True)

    Generate a mesh.

    Not collective.

    Parameters:

      - boundary (DMPlex) – The `DMPlex` boundary object.

      - name (str | None) – The mesh generation package name.

      - interpolate (bool | None) – Flag to create intermediate mesh elements.

    Return type:

      Self

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DM.refine`, Working with PETSc options, `DMPlexGenerate`

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

  getAdjacency(p)

    Return all points adjacent to the given point.

    Not collective.

    Parameters:

      p (int) – The point.

    Return type:

      ArrayInt

    See also

    `DMPlex`, `DMPlex.distribute`, `DMPlexGetAdjacency`

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

  getAdjacencyUseAnchors()

    Query whether adjacency in the mesh uses the point-to-point constraints.

    Not collective.

    See also

    `DMPlex`, `DMPlex.getAdjacency`, `DMPlex.distribute`, `DMPlexGetAdjacencyUseAnchors`

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

    Return type:

      bool

  getCellNumbering()

    Return a global cell numbering for all cells on this process.

    Collective the first time it is called.

    See also

    `DM`, `DMPlex`, `DMPlex.getVertexNumbering`, `DMPlexGetCellNumbering`

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

    Return type:

      IS

  getCellType(p)

    Return the polytope type of a given cell.

    Not collective.

    Parameters:

      p (int) – The cell.

    Return type:

      PolytopeType

    See also

    `DM`, `DMPlex`, `DM.PolytopeType`, `DMPlex.getCellTypeLabel`, `DMPlex.getDepth`, `DMPlexGetCellType`

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

  getCellTypeLabel()

    Return the `DMLabel` recording the polytope type of each cell.

    Not collective.

    See also

    `DM`, `DMPlex`, `DMPlex.getCellType`, `DM.createLabel`, `DMPlexGetCellTypeLabel`

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

    Return type:

      DMLabel

  getChart()

    Return the interval for all mesh points [`pStart`, `pEnd`).

    Not collective.

    Returns:

      - pStart (`int`) – The first mesh point.

      - pEnd (`int`) – The upper bound for mesh points.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.setChart`, `DMPlexGetChart`

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

  getCone(p)

    Return the points on the in-edges for this point in the DAG.

    Not collective.

    Parameters:

      p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

    Return type:

      ArrayInt

    See also

    `DM`, `DMPlex`, `DMPlex.getConeSize`, `DMPlex.setCone`, `DMPlex.setChart`, `DMPlexGetCone`

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

  getConeOrientation(p)

    Return the orientations on the in-edges for this point in the DAG.

    Not collective.

    Parameters:

      p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

    Return type:

      ArrayInt

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getCone`, `DMPlex.setCone`, `DMPlex.setChart`, `DMPlexGetConeOrientation`

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

  getConeSize(p)

    Return the number of in-edges for this point in the DAG.

    Not collective.

    Parameters:

      p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

    Return type:

      int

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.setConeSize`, `DMPlex.setChart`, `DMPlexGetConeSize`

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

  getDepth()

    Return the depth of the DAG representing this mesh.

    Not collective.

    See also

    `DM`, `DMPlex`, `DMPlex.getDepthStratum`, `DMPlex.symmetrize`, `DMPlexGetDepth`

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

    Return type:

      int

  getDepthStratum(svalue)

    Return the bounds [`start`, `end`) for all points at a certain depth.

    Not collective.

    Parameters:

      svalue (int) – The requested depth.

    Returns:

      - pStart (`int`) – The first stratum point.

      - pEnd (`int`) – The upper bound for stratum points.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.getHeightStratum`, `DMPlex.getDepth`, `DMPlex.symmetrize`, `DMPlex.interpolate`, `DMPlexGetDepthStratum`

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

  getFullJoin(points)

    Return an array for the join of the set of points.

    Not collective.

    Parameters:

      points (Sequence[int]) – The input points.

    Return type:

      ArrayInt

    See also

    `DM`, `DMPlex`, `DMPlex.getJoin`, `DMPlex.getMeet`, `DMPlexGetFullJoin`

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

  getHeightStratum(svalue)

    Return the bounds [`start`, `end`) for all points at a certain height.

    Not collective.

    Parameters:

      svalue (int) – The requested height.

    Returns:

      - pStart (`int`) – The first stratum point.

      - pEnd (`int`) – The upper bound for stratum points.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.getDepthStratum`, `DMPlex.getDepth`, `DMPlexGetHeightStratum`

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

  getJoin(points)

    Return an array for the join of the set of points.

    Not collective.

    Parameters:

      points (Sequence[int]) – The input points.

    Return type:

      ArrayInt

    See also

    `DM`, `DMPlex`, `DMPlex.getMeet`, `DMPlexGetJoin`

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

  getMaxSizes()

    Return the maximum number of in-edges and out-edges of the DAG.

    Not collective.

    Returns:

      - maxConeSize (`int`) – The maximum number of in-edges.

      - maxSupportSize (`int`) – The maximum number of out-edges.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.setConeSize`, `DMPlex.setChart`, `DMPlexGetMaxSizes`

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

  getMeet(points)

    Return an array for the meet of the set of points.

    Not collective.

    Parameters:

      points (Sequence[int]) – The input points.

    Return type:

      ArrayInt

    See also

    `DM`, `DMPlex`, `DMPlex.getJoin`, `DMPlexGetMeet`

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

  getMinRadius()

    Return the minimum distance from any cell centroid to a face.

    Not collective.

    See also

    `DMPlex`, `DM.getCoordinates`, `DMPlexGetMinRadius`

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

    Return type:

      float

  getOrdering(otype)

    Calculate a reordering of the mesh.

    Collective.

    Parameters:

      otype (OrderingType) – Type of reordering, see `Mat.OrderingType`.

    Returns:

      perm – The point permutation.

    Return type:

      `IS`

    See also

    `DMPlex`, `DMPlex.permute`, `Mat.OrderingType`, `Mat.getOrdering`, `DMPlexGetOrdering`

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

  getPartitioner()

    Return the mesh partitioner.

    Not collective.

    See also

    `DM`, `DMPlex`, `Partitioner`, `Section`, `DMPlex.distribute`, `DMPlex.setPartitioner`, `Partitioner.create`, `PetscPartitionerDMPlexPartition`, `DMPlexGetPartitioner`

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

    Return type:

      Partitioner

  getPointDepth(point)

    Return the depth of a given point.

    Not collective.

    Parameters:

      point (int) – The point.

    Return type:

      int

    See also

    `DM`, `DMPlex`, `DMPlex.getDepthStratum`, `DMPlex.getDepth`, `DMPlexGetPointDepth`

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

  getPointGlobal(point)

    Return location of point data in global `Vec`.

    Not collective.

    Parameters:

      point (int) – The topological point.

    Returns:

      - start (`int`) – Start of point data; returns `-(globalStart+1)` if point is not owned.

      - end (`int`) – End of point data; returns `-(globalEnd+1)` if point is not owned.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.getPointGlobalField`, `Section.getOffset`, `Section.getDof`, `DMPlex.getPointLocal`, `DMPlexGetPointGlobal`

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

  getPointGlobalField(point, field)

    Return location of point field data in global `Vec`.

    Not collective.

    Parameters:

      - point (int) – The topological point.

      - field (int) – The field number.

    Returns:

      - start (`int`) – Start of point data; returns `-(globalStart+1)` if point is not owned.

      - end (`int`) – End of point data; returns `-(globalEnd+1)` if point is not owned.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.getPointGlobal`, `Section.getOffset`, `Section.getDof`, `DMPlex.getPointLocal`, `DMPlexGetPointGlobalField`

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

  getPointHeight(point)

    Return the height of a given point.

    Not collective.

    Parameters:

      point (int) – The point.

    Return type:

      int

    See also

    `DM`, `DMPlex`, `DMPlex.getHeightStratum`, `DMPlexGetPointHeight`

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

  getPointLocal(point)

    Return location of point data in local `Vec`.

    Not collective.

    Parameters:

      point (int) – The topological point.

    Returns:

      - start (`int`) – Start of point data.

      - end (`int`) – End of point data.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.getPointLocalField`, `Section.getOffset`, `Section.getDof`, `DMPlexGetPointLocal`

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

  getPointLocalField(point, field)

    Return location of point field data in local `Vec`.

    Not collective.

    Parameters:

      - point (int) – The topological point.

      - field (int) – The field number.

    Returns:

      - start (`int`) – Start of point data.

      - end (`int`) – End of point data.

    Return type:

      tuple[int, int]

    See also

    `DM`, `DMPlex`, `DMPlex.getPointLocal`, `Section.getOffset`, `DMPlexGetPointLocalField`

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

  getRefinementLimit()

    Retrieve the maximum cell volume for refinement.

    Not collective.

    See also

    `DM`, `DMPlex`, `DM.refine`, `DMPlex.setRefinementLimit`, `DMPlex.getRefinementUniform`, `DMPlex.setRefinementUniform`, `DMPlexGetRefinementLimit`

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

    Return type:

      float

  getRefinementUniform()

    Retrieve the flag for uniform refinement.

    Not collective.

    Returns:

      refinementUniform – The flag for uniform refinement.

    Return type:

      `bool`

    See also

    `DM`, `DMPlex`, `DM.refine`, `DMPlex.setRefinementUniform`, `DMPlex.getRefinementLimit`, `DMPlex.setRefinementLimit`, `DMPlexGetRefinementUniform`

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

  getSubpointIS()

    Return an `IS` covering the entire subdm chart.

    Not collective.

    Returns:

      iset – The `IS` containing subdm’s parent’s points.

    Return type:

      `IS`

    See also

    `DM`, `DMPlex`, `DMPlexGetSubpointIS`

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

  getSubpointMap()

    Return a `DMLabel` with point dimension as values.

    Not collective.

    Returns:

      label – The `DMLabel` whose values are subdm’s point dimensions.

    Return type:

      `DMLabel`

    See also

    `DM`, `DMPlex`, `DMPlexGetSubpointMap`

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

  getSupport(p)

    Return the points on the out-edges for this point in the DAG.

    Not collective.

    Parameters:

      p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

    Return type:

      ArrayInt

    See also

    `DM`, `DMPlex`, `DMPlex.getSupportSize`, `DMPlex.setSupport`, `DMPlex.getCone`, `DMPlex.setChart`, `DMPlexGetSupport`

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

  getSupportSize(p)

    Return the number of out-edges for this point in the DAG.

    Not collective.

    Parameters:

      p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

    Return type:

      int

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.setConeSize`, `DMPlex.setChart`, `DMPlex.getConeSize`, `DMPlexGetSupportSize`

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

  getTransitiveClosure(p, useCone=True)

    Return the points and orientations on the transitive closure of this point.

    Not collective.

    Parameters:

      - p (int) – The mesh point.

      - useCone (bool | None) – `True` for the closure, otherwise return the star.

    Returns:

      - points (`ArrayInt`) – The points.

      - orientations (`ArrayInt`) – The orientations.

    Return type:

      tuple[ArrayInt, ArrayInt]

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.setCone`, `DMPlex.setChart`, `DMPlex.getCone`, `DMPlexGetTransitiveClosure`

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

  getVecClosure(sec, vec, point)

    Return an array of the values on the closure of a point.

    Not collective.

    Parameters:

      - sec (Section) – The `Section` describing the layout in `vec` or `None` to use the default section.

      - vec (Vec) – The local vector.

      - point (int) – The point in the `DMPlex`.

    Return type:

      ArrayScalar

    See also

    `DM`, `DMPlex`, `DMPlexVecRestoreClosure`

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

  getVertexNumbering()

    Return a global vertex numbering for all vertices on this process.

    Collective the first time it is called.

    See also

    `DM`, `DMPlex`, `DMPlex.getCellNumbering`, `DMPlexGetVertexNumbering`

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

    Return type:

      IS

  globalVectorLoad(viewer, sectiondm, sf, vec)

    Load on-disk vector data into a global vector.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` that represents the on-disk vector data.

      - sectiondm (DM) – The `DM` that contains the global section on which vec is defined.

      - sf (SF) – The `SF` that migrates the on-disk vector data into vec.

      - vec (Vec) – The global vector to set values of.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.topologyLoad`, `DMPlex.sectionLoad`, `DMPlex.localVectorLoad`, `DMPlex.globalVectorView`, `DMPlex.localVectorView`, `SF`, `Viewer`, `DMPlexGlobalVectorLoad`

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

  globalVectorView(viewer, sectiondm, vec)

    Save a global vector.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` to save data with.

      - sectiondm (DM) – The `DM` containing the global section on which `vec` is defined; may be the same as this `DMPlex` object.

      - vec (Vec) – The global vector to be saved.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.topologyView`, `DMPlex.sectionView`, `DMPlex.localVectorView`, `DMPlex.globalVectorLoad`, `DMPlex.localVectorLoad`, `DMPlexGlobalVectorView`

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

  insertCone(p, conePos, conePoint)

    DMPlexInsertCone - Insert a point into the in-edges for the point p in the DAG.

    Not collective.

    Parameters:

      - p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

      - conePos (int) – The local index in the cone where the point should be put.

      - conePoint (int) – The mesh point to insert.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getCone`, `DMPlex.setChart`, `DMPlex.setConeSize`, `DM.setUp`, `DMPlexInsertCone`

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

  insertConeOrientation(p, conePos, coneOrientation)

    Insert a point orientation for the in-edge for the point p in the DAG.

    Not collective.

    Parameters:

      - p (int) – The point, which must lie in the chart set with `DMPlex.setChart`

      - conePos (int) – The local index in the cone where the point should be put.

      - coneOrientation (int) – The point orientation to insert.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getCone`, `DMPlex.setChart`, `DMPlex.setConeSize`, `DM.setUp`, `DMPlexInsertConeOrientation`

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

  interpolate()

    Convert to a mesh with all intermediate faces, edges, etc.

    Collective.

    See also

    `DMPlex`, `DMPlex.uninterpolate`, `DMPlex.createFromCellList`, `DMPlexInterpolate`

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

    Return type:

      None

  isDistributed()

    Return the flag indicating if the mesh is distributed.

    Collective.

    See also

    `DM`, `DMPlex`, `DMPlex.distribute`, `DMPlexIsDistributed`

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

    Return type:

      bool

  isSimplex()

    Return the flag indicating if the first cell is a simplex.

    Not collective.

    See also

    `DM`, `DMPlex`, `DMPlex.getCellType`, `DMPlex.getHeightStratum`, `DMPlexIsSimplex`

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

    Return type:

      bool

  labelCohesiveComplete(label, bdlabel, bdvalue, flip, split, subdm)

    Add all other mesh pieces to complete the surface.

    Not collective.

    Parameters:

      - label (DMLabel) – A `DMLabel` marking the surface.

      - bdlabel (DMLabel) – A `DMLabel` marking the vertices on the boundary which will not be duplicated.

      - bdvalue (int) – Value of `DMLabel` marking the vertices on the boundary.

      - flip (bool) – Flag to flip the submesh normal and replace points on the other side.

      - split (bool) – Flag to split faces incident on the surface boundary, rather than clamping those faces to the boundary

      - subdm (DMPlex) – The `DMPlex` associated with the label.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.labelComplete`, `DMPlexLabelCohesiveComplete`

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

  labelComplete(label)

    Add the transitive closure to the surface.

    Not collective.

    Parameters:

      label (DMLabel) – A `DMLabel` marking the surface points.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.labelCohesiveComplete`, `DMPlexLabelComplete`

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

  labelsLoad(viewer, sfxc)

    Load labels into this `DMPlex` object.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` for the saved labels.

      - sfxc (SF) – The `SF` returned by `topologyLoad`.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.load`, `DMPlex.topologyLoad`, `DMPlex.coordinatesLoad`, `DM.view`, `SF`, `Viewer`, `DMPlexLabelsLoad`

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

  labelsView(viewer)

    Save `DMPlex` labels into a file.

    Collective.

    Parameters:

      viewer (Viewer) – The `Viewer` for saving.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.view`, `DMPlex.topologyView`, `DMPlex.coordinatesView`, `DMPlex.labelsLoad`, `Viewer`, `DMPlexLabelsView`

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

  localVectorLoad(viewer, sectiondm, sf, vec)

    Load on-disk vector data into a local vector.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` that represents the on-disk vector data.

      - sectiondm (DM) – The `DM` that contains the local section on which vec is defined.

      - sf (SF) – The `SF` that migrates the on-disk vector data into vec.

      - vec (Vec) – The local vector to set values of.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.topologyLoad`, `DMPlex.sectionLoad`, `DMPlex.globalVectorLoad`, `DMPlex.globalVectorView`, `DMPlex.localVectorView`, `SF`, `Viewer`, `DMPlexLocalVectorLoad`

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

  localVectorView(viewer, sectiondm, vec)

    Save a local vector.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` to save data with.

      - sectiondm (DM) – The `DM` that contains the local section on which `vec` is defined; may be the same as this `DMPlex` object.

      - vec (Vec) – The local vector to be saved.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.topologyView`, `DMPlex.sectionView`, `DMPlex.globalVectorView`, `DMPlex.globalVectorLoad`, `DMPlex.localVectorLoad`, `DMPlexLocalVectorView`

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

  markBoundaryFaces(label, value=None)

    Mark all faces on the boundary.

    Not collective.

    Parameters:

      - value (int | None) – The marker value, or `DETERMINE` or `None` to use some value in the closure (or 1 if none are found).

      - label (str)

    Return type:

      DMLabel

    See also

    `DM`, `DMPlex`, `DMLabel.create`, `DM.createLabel`, `DMPlexMarkBoundaryFaces`

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

  metricAverage2(metric1, metric2, metricAvg)

    Compute and return the unweighted average of two metrics.

    Collective.

    Parameters:

      - metric1 (Vec) – The first metric to be averaged.

      - metric2 (Vec) – The second metric to be averaged.

      - metricAvg (Vec) – The output averaged metric.

    Return type:

      Vec

    See also

    `DMPlex.metricAverage3`, `DMPlexMetricAverage2`

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

  metricAverage3(metric1, metric2, metric3, metricAvg)

    Compute and return the unweighted average of three metrics.

    Collective.

    Parameters:

      - metric1 (Vec) – The first metric to be averaged.

      - metric2 (Vec) – The second metric to be averaged.

      - metric3 (Vec) – The third metric to be averaged.

      - metricAvg (Vec) – The output averaged metric.

    Return type:

      Vec

    See also

    `DMPlex.metricAverage2`, `DMPlexMetricAverage3`

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

  metricCreate(field=0)

    Create a Riemannian metric field.

    Collective.

    Parameters:

      field (int | None) – The field number to use.

    Return type:

      Vec

    See also

    `DMPlex.metricCreateUniform`, `DMPlex.metricCreateIsotropic`, Working with PETSc options, `DMPlexMetricCreate`

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

  metricCreateIsotropic(indicator, field=0)

    Construct an isotropic metric from an error indicator.

    Collective.

    Parameters:

      - indicator (Vec) – The error indicator.

      - field (int | None) – The field number to use.

    Return type:

      Vec

    See also

    `DMPlex.metricCreate`, `DMPlex.metricCreateUniform`, `DMPlexMetricCreateIsotropic`

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

  metricCreateUniform(alpha, field=0)

    Construct a uniform isotropic metric.

    Collective.

    Parameters:

      - alpha (float) – Scaling parameter for the diagonal.

      - field (int | None) – The field number to use.

    Return type:

      Vec

    See also

    `DMPlex.metricCreate`, `DMPlex.metricCreateIsotropic`, `DMPlexMetricCreateUniform`

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

  metricDeterminantCreate(field=0)

    Create the determinant field for a Riemannian metric.

    Collective.

    Parameters:

      field (int | None) – The field number to use.

    Returns:

      - determinant (`Vec`) – The determinant field.

      - dmDet (`DM`) – The corresponding DM

    Return type:

      tuple[Vec, DM]

    See also

    `DMPlex.metricCreateUniform`, `DMPlex.metricCreateIsotropic`, `DMPlex.metricCreate`, `DMPlexMetricDeterminantCreate`

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

  metricEnforceSPD(metric, ometric, determinant, restrictSizes=False, restrictAnisotropy=False)

    Enforce symmetric positive-definiteness of a metric.

    Collective.

    Parameters:

      - metric (Vec) – The metric.

      - ometric (Vec) – The output metric.

      - determinant (Vec) – The output determinant.

      - restrictSizes (bool | None) – Flag indicating whether maximum/minimum magnitudes should be enforced.

      - restrictAnisotropy (bool | None) – Flag indicating whether maximum anisotropy should be enforced.

    Returns:

      - ometric (`Vec`) – The output metric.

      - determinant (`Vec`) – The output determinant.

    Return type:

      tuple[Vec, Vec]

    See also

    `DMPlex.metricNormalize`, `DMPlex.metricIntersection2`, `DMPlex.metricIntersection3`, Working with PETSc options, `DMPlexMetricEnforceSPD`

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

  metricGetGradationFactor()

    Return the metric gradation factor.

    Not collective.

    See also

    `DMPlex.metricSetGradationFactor`, `DMPlex.metricGetHausdorffNumber`, `DMPlexMetricGetGradationFactor`

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

    Return type:

      float

  metricGetHausdorffNumber()

    Return the metric Hausdorff number.

    Not collective.

    See also

    `DMPlex.metricGetGradationFactor`, `DMPlex.metricSetHausdorffNumber`, `DMPlexMetricGetHausdorffNumber`

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

    Return type:

      float

  metricGetMaximumAnisotropy()

    Return the maximum tolerated metric anisotropy.

    Not collective.

    See also

    `DMPlex.metricSetMaximumAnisotropy`, `DMPlex.metricGetMaximumMagnitude`, `DMPlexMetricGetMaximumAnisotropy`

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

    Return type:

      float

  metricGetMaximumMagnitude()

    Return the maximum tolerated metric magnitude.

    Not collective.

    See also

    `DMPlex.metricSetMaximumMagnitude`, `DMPlex.metricGetMinimumMagnitude`, `DMPlexMetricGetMaximumMagnitude`

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

    Return type:

      float

  metricGetMinimumMagnitude()

    Return the minimum tolerated metric magnitude.

    Not collective.

    See also

    `DMPlex.metricSetMinimumMagnitude`, `DMPlex.metricGetMaximumMagnitude`, `DMPlexMetricGetMinimumMagnitude`

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

    Return type:

      float

  metricGetNormalizationOrder()

    Return the order p for L-p normalization.

    Not collective.

    See also

    `DMPlex.metricSetNormalizationOrder`, `DMPlex.metricGetTargetComplexity`, `DMPlexMetricGetNormalizationOrder`

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

    Return type:

      float

  metricGetNumIterations()

    Return the number of parallel adaptation iterations.

    Not collective.

    See also

    `DMPlex.metricSetNumIterations`, `DMPlex.metricGetVerbosity`, `DMPlexMetricGetNumIterations`

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

    Return type:

      int

  metricGetTargetComplexity()

    Return the target metric complexity.

    Not collective.

    See also

    `DMPlex.metricSetTargetComplexity`, `DMPlex.metricGetNormalizationOrder`, `DMPlexMetricGetTargetComplexity`

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

    Return type:

      float

  metricGetVerbosity()

    Return the verbosity of the mesh adaptation package.

    Not collective.

    Returns:

      verbosity – The verbosity, where -1 is silent and 10 is maximum.

    Return type:

      `int`

    See also

    `DMPlex.metricSetVerbosity`, `DMPlex.metricGetNumIterations`, `DMPlexMetricGetVerbosity`

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

  metricIntersection2(metric1, metric2, metricInt)

    Compute and return the intersection of two metrics.

    Collective.

    Parameters:

      - metric1 (Vec) – The first metric to be intersected.

      - metric2 (Vec) – The second metric to be intersected.

      - metricInt (Vec) – The output intersected metric.

    Return type:

      Vec

    See also

    `DMPlex.metricIntersection3`, `DMPlexMetricIntersection2`

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

  metricIntersection3(metric1, metric2, metric3, metricInt)

    Compute the intersection of three metrics.

    Collective.

    Parameters:

      - metric1 (Vec) – The first metric to be intersected.

      - metric2 (Vec) – The second metric to be intersected.

      - metric3 (Vec) – The third metric to be intersected.

      - metricInt (Vec) – The output intersected metric.

    Return type:

      Vec

    See also

    `DMPlex.metricIntersection2`, `DMPlexMetricIntersection3`

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

  metricIsIsotropic()

    Return the flag indicating whether the metric is isotropic or not.

    Not collective.

    See also

    `DMPlex.metricSetIsotropic`, `DMPlex.metricIsUniform`, `DMPlex.metricRestrictAnisotropyFirst`, `DMPlexMetricIsIsotropic`

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

    Return type:

      bool

  metricIsUniform()

    Return the flag indicating whether the metric is uniform or not.

    Not collective.

    See also

    `DMPlex.metricSetUniform`, `DMPlex.metricRestrictAnisotropyFirst`, `DMPlexMetricIsUniform`

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

    Return type:

      bool

  metricNoInsertion()

    Return the flag indicating whether node insertion and deletion are turned off.

    Not collective.

    See also

    `DMPlex.metricSetNoInsertion`, `DMPlex.metricNoSwapping`, `DMPlex.metricNoMovement`, `DMPlex.metricNoSurf`, `DMPlexMetricNoInsertion`

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

    Return type:

      bool

  metricNoMovement()

    Return the flag indicating whether node movement is turned off.

    Not collective.

    See also

    `DMPlex.metricSetNoMovement`, `DMPlex.metricNoInsertion`, `DMPlex.metricNoSwapping`, `DMPlex.metricNoSurf`, `DMPlexMetricNoMovement`

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

    Return type:

      bool

  metricNoSurf()

    Return the flag indicating whether surface modification is turned off.

    Not collective.

    See also

    `DMPlex.metricSetNoSurf`, `DMPlex.metricNoMovement`, `DMPlex.metricNoInsertion`, `DMPlex.metricNoSwapping`, `DMPlexMetricNoSurf`

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

    Return type:

      bool

  metricNoSwapping()

    Return the flag indicating whether facet swapping is turned off.

    Not collective.

    See also

    `DMPlex.metricSetNoSwapping`, `DMPlex.metricNoInsertion`, `DMPlex.metricNoMovement`, `DMPlex.metricNoSurf`, `DMPlexMetricNoSwapping`

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

    Return type:

      bool

  metricNormalize(metric, ometric, determinant, restrictSizes=True, restrictAnisotropy=True)

    Apply L-p normalization to a metric.

    Collective.

    Parameters:

      - metric (Vec) – The metric.

      - ometric (Vec) – The output metric.

      - determinant (Vec) – The output determinant.

      - restrictSizes (bool | None) – Flag indicating whether maximum/minimum magnitudes should be enforced.

      - restrictAnisotropy (bool | None) – Flag indicating whether maximum anisotropy should be enforced.

    Returns:

      - ometric (`Vec`) – The output normalized metric.

      - determinant (`Vec`) – The output determinant.

    Return type:

      tuple[Vec, Vec]

    See also

    `DMPlex.metricEnforceSPD`, `DMPlex.metricIntersection2`, `DMPlex.metricIntersection3`, Working with PETSc options, `DMPlexMetricNormalize`

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

  metricRestrictAnisotropyFirst()

    Return `true` if anisotropy is restricted before normalization.

    Not collective.

    See also

    `DMPlex.metricIsIsotropic`, `DMPlex.metricSetRestrictAnisotropyFirst`, `DMPlexMetricRestrictAnisotropyFirst`

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

    Return type:

      bool

  metricSetFromOptions()

    Configure the object from the options database.

    Collective.

    See also

    Working with PETSc options

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

    Return type:

      None

  metricSetGradationFactor(beta)

    Set the metric gradation factor.

    Logically collective.

    Parameters:

      beta (float) – The metric gradation factor.

    Return type:

      None

    See also

    `DMPlex.metricGetGradationFactor`, `DMPlex.metricSetHausdorffNumber`, `DMPlexMetricSetGradationFactor`

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

  metricSetHausdorffNumber(hausd)

    Set the metric Hausdorff number.

    Logically collective.

    Parameters:

      hausd (float) – The metric Hausdorff number.

    Return type:

      None

    See also

    `DMPlex.metricSetGradationFactor`, `DMPlex.metricGetHausdorffNumber`, `DMPlexMetricSetHausdorffNumber`

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

  metricSetIsotropic(isotropic)

    Record whether the metric is isotropic or not.

    Logically collective.

    Parameters:

      isotropic (bool) – Flag indicating whether the metric is isotropic or not.

    Return type:

      None

    See also

    `DMPlex.metricIsIsotropic`, `DMPlex.metricSetUniform`, `DMPlex.metricSetRestrictAnisotropyFirst`, `DMPlexMetricSetIsotropic`

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

  metricSetMaximumAnisotropy(a_max)

    Set the maximum tolerated metric anisotropy.

    Logically collective.

    Parameters:

      a_max (float) – The maximum tolerated metric anisotropy.

    Return type:

      None

    See also

    `DMPlex.metricGetMaximumAnisotropy`, `DMPlex.metricSetMaximumMagnitude`, `DMPlexMetricSetMaximumAnisotropy`

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

  metricSetMaximumMagnitude(h_max)

    Set the maximum tolerated metric magnitude.

    Logically collective.

    Parameters:

      h_max (float) – The maximum tolerated metric magnitude.

    Return type:

      None

    See also

    `DMPlex.metricGetMaximumMagnitude`, `DMPlex.metricSetMinimumMagnitude`, `DMPlexMetricSetMaximumMagnitude`

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

  metricSetMinimumMagnitude(h_min)

    Set the minimum tolerated metric magnitude.

    Logically collective.

    Parameters:

      h_min (float) – The minimum tolerated metric magnitude.

    Return type:

      None

    See also

    `DMPlex.metricGetMinimumMagnitude`, `DMPlex.metricSetMaximumMagnitude`, `DMPlexMetricSetMinimumMagnitude`

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

  metricSetNoInsertion(noInsert)

    Set the flag indicating whether node insertion should be turned off.

    Logically collective.

    Parameters:

      noInsert (bool) – Flag indicating whether node insertion and deletion should be turned off.

    Return type:

      None

    See also

    `DMPlex.metricNoInsertion`, `DMPlex.metricSetNoSwapping`, `DMPlex.metricSetNoMovement`, `DMPlex.metricSetNoSurf`, `DMPlexMetricSetNoInsertion`

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

  metricSetNoMovement(noMove)

    Set the flag indicating whether node movement should be turned off.

    Logically collective.

    Parameters:

      noMove (bool) – Flag indicating whether node movement should be turned off.

    Return type:

      None

    See also

    `DMPlex.metricNoMovement`, `DMPlex.metricSetNoInsertion`, `DMPlex.metricSetNoSwapping`, `DMPlex.metricSetNoSurf`, `DMPlexMetricSetNoMovement`

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

  metricSetNoSurf(noSurf)

    Set the flag indicating whether surface modification should be turned off.

    Logically collective.

    Parameters:

      noSurf (bool) – Flag indicating whether surface modification should be turned off.

    Return type:

      None

    See also

    `DMPlex.metricNoSurf`, `DMPlex.metricSetNoMovement`, `DMPlex.metricSetNoInsertion`, `DMPlex.metricSetNoSwapping`, `DMPlexMetricSetNoSurf`

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

  metricSetNoSwapping(noSwap)

    Set the flag indicating whether facet swapping should be turned off.

    Logically collective.

    Parameters:

      noSwap (bool) – Flag indicating whether facet swapping should be turned off.

    Return type:

      None

    See also

    `DMPlex.metricNoSwapping`, `DMPlex.metricSetNoInsertion`, `DMPlex.metricSetNoMovement`, `DMPlex.metricSetNoSurf`, `DMPlexMetricSetNoSwapping`

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

  metricSetNormalizationOrder(p)

    Set the order p for L-p normalization.

    Logically collective.

    Parameters:

      p (float) – The normalization order.

    Return type:

      None

    See also

    `DMPlex.metricGetNormalizationOrder`, `DMPlex.metricSetTargetComplexity`, `DMPlexMetricSetNormalizationOrder`

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

  metricSetNumIterations(numIter)

    Set the number of parallel adaptation iterations.

    Logically collective.

    Parameters:

      numIter (int) – The number of parallel adaptation iterations.

    Return type:

      None

    See also

    `DMPlex.metricSetVerbosity`, `DMPlex.metricGetNumIterations`, `DMPlexMetricSetNumIterations`

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

  metricSetRestrictAnisotropyFirst(restrictAnisotropyFirst)

    Record whether anisotropy is be restricted before normalization or after.

    Logically collective.

    Parameters:

      restrictAnisotropyFirst (bool) – Flag indicating if anisotropy is restricted before normalization or after.

    Return type:

      None

    See also

    `DMPlex.metricSetIsotropic`, `DMPlex.metricRestrictAnisotropyFirst`, `DMPlexMetricSetRestrictAnisotropyFirst`

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

  metricSetTargetComplexity(targetComplexity)

    Set the target metric complexity.

    Logically collective.

    Parameters:

      targetComplexity (float) – The target metric complexity.

    Return type:

      None

    See also

    `DMPlex.metricGetTargetComplexity`, `DMPlex.metricSetNormalizationOrder`, `DMPlexMetricSetTargetComplexity`

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

  metricSetUniform(uniform)

    Record whether the metric is uniform or not.

    Logically collective.

    Parameters:

      uniform (bool) – Flag indicating whether the metric is uniform or not.

    Return type:

      None

    See also

    `DMPlex.metricIsUniform`, `DMPlex.metricSetIsotropic`, `DMPlex.metricSetRestrictAnisotropyFirst`, `DMPlexMetricSetUniform`

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

  metricSetVerbosity(verbosity)

    Set the verbosity of the mesh adaptation package.

    Logically collective.

    Parameters:

      verbosity (int) – The verbosity, where -1 is silent and 10 is maximum.

    Return type:

      None

    See also

    `DMPlex.metricGetVerbosity`, `DMPlex.metricSetNumIterations`, `DMPlexMetricSetVerbosity`

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

  orient()

    Give a consistent orientation to the input mesh.

    Collective.

    See also

    `DM`, `DMPlex`, `DM.create`, `DMPlexOrient`

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

    Return type:

      None

  permute(perm)

    Reorder the mesh according to the input permutation.

    Collective.

    Parameters:

      perm (IS) – The point permutation, `perm[old point number] = new point number`.

    Returns:

      pdm – The permuted `DMPlex`.

    Return type:

      `DMPlex`

    See also

    `DMPlex`, `Mat.permute`, `DMPlexPermute`

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

  rebalanceSharedPoints(entityDepth=0, useInitialGuess=True, parallel=True)

    Redistribute shared points in order to achieve better balancing.

    Collective.

    Parameters:

      - entityDepth (int | None) – Depth of the entity to balance (e.g., 0 -> balance vertices).

      - useInitialGuess (bool | None) – Whether to use the current distribution as initial guess.

      - parallel (bool | None) – Whether to use ParMETIS and do the partition in parallel or gather the graph onto a single process.

    Returns:

      success – Whether the graph partitioning was successful or not. Unsuccessful simply means no change to the partitioning.

    Return type:

      `bool`

    See also

    `DM`, `DMPlex`, `DMPlex.distribute`, Working with PETSc options, `DMPlexRebalanceSharedPoints`

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

  reorderGetDefault()

    Return flag indicating whether the `DMPlex` should be reordered by default.

    Not collective.

    See also

    `None`, `DMPlexReorderGetDefault`

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

    Return type:

      ReorderDefaultFlag

  reorderSetDefault(flag)

    Set flag indicating whether the DM should be reordered by default.

    Logically collective.

    Parameters:

      - reorder – Flag for reordering.

      - flag (ReorderDefaultFlag)

    Return type:

      None

    See also

    `DMPlex.reorderGetDefault`, `DMPlexReorderSetDefault`

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

  sectionLoad(viewer, sectiondm, sfxc)

    Load section into a `DM`.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` that represents the on-disk section (`sectionA`).

      - sectiondm (DM) – The `DM` into which the on-disk section (`sectionA`) is migrated.

      - sfxc (SF) – The `SF` returned by `topologyLoad`.

    Returns:

      - gsf (`SF`) – The `SF` that migrates any on-disk `Vec` data associated with `sectionA` into a global `Vec` associated with the `sectiondm`’s global section (`None` if not needed).

      - lsf (`SF`) – The `SF` that migrates any on-disk `Vec` data associated with `sectionA` into a local `Vec` associated with the `sectiondm`’s local section (`None` if not needed).

    Return type:

      tuple[SF, SF]

    See also

    `DM`, `DMPlex`, `DM.load`, `DMPlex.topologyLoad`, `DMPlex.coordinatesLoad`, `DMPlex.labelsLoad`, `DMPlex.globalVectorLoad`, `DMPlex.localVectorLoad`, `DMPlex.sectionView`, `SF`, `Viewer`, `DMPlexSectionLoad`

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

  sectionView(viewer, sectiondm)

    Save a section associated with a `DMPlex`.

    Collective.

    Parameters:

      - viewer (Viewer) – The `Viewer` for saving.

      - sectiondm (DM) – The `DM` that contains the section to be saved.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.view`, `DMPlex.topologyView`, `DMPlex.coordinatesView`, `DMPlex.labelsView`, `DMPlex.globalVectorView`, `DMPlex.localVectorView`, `DMPlex.sectionLoad`, `Viewer`, `DMPlexSectionView`

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

  setAdjacencyUseAnchors(useAnchors=True)

    Define adjacency in the mesh using the point-to-point constraints.

    Logically collective.

    Parameters:

      useAnchors (bool) – Flag to use the constraints. If `True`, then constrained points are omitted from `DMPlex.getAdjacency`, and their anchor points appear in their place.

    Return type:

      None

    See also

    `DMPlex`, `DMPlex.getAdjacency`, `DMPlex.distribute`, `DMPlexSetAdjacencyUseAnchors`

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

  setCellType(p, ctype)

    Set the polytope type of a given cell.

    Not collective.

    Parameters:

      - p (int) – The cell.

      - ctype (PolytopeType) – The polytope type of the cell.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.getCellTypeLabel`, `DMPlex.getDepth`, `DM.createLabel`, `DMPlexSetCellType`

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

  setChart(pStart, pEnd)

    Set the interval for all mesh points [`pStart`, `pEnd`).

    Not collective.

    Parameters:

      - pStart (int) – The first mesh point.

      - pEnd (int) – The upper bound for mesh points.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getChart`, `DMPlexSetChart`

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

  setCone(p, cone, orientation=None)

    Set the points on the in-edges for this point in the DAG.

    Not collective.

    Parameters:

      - p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

      - cone (Sequence[int]) – An array of points which are on the in-edges for point `p`.

      - orientation (Sequence[int] | None) – An array of orientations, defaults to `None`.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getCone`, `DMPlex.setChart`, `DMPlex.setConeSize`, `DM.setUp`, `DMPlex.setSupport`, `DMPlex.setSupportSize`, `DMPlexSetCone`

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

  setConeOrientation(p, orientation)

    Set the orientations on the in-edges for this point in the DAG.

    Not collective.

    Parameters:

      - p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

      - orientation (Sequence[int]) – An array of orientations.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getConeOrientation`, `DMPlex.setCone`, `DMPlex.setChart`, `DMPlex.setConeSize`, `DM.setUp`, `DMPlexSetConeOrientation`

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

  setConeSize(p, size)

    Set the number of in-edges for this point in the DAG.

    Not collective.

    Parameters:

      - p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

      - size (int) – The cone size for point `p`.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getConeSize`, `DMPlex.setChart`, `DMPlexSetConeSize`

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

  setMatClosure(sec, gsec, mat, point, values, addv=None)

    Set an array of the values on the closure of `point`.

    Not collective.

    Parameters:

      - sec (Section) – The section describing the layout in `mat`, or `None` to use the default section.

      - gsec (Section) – The section describing the layout in `mat`, or `None` to use the default global section.

      - mat (Mat) – The matrix.

      - point (int) – The point in the `DMPlex`.

      - values (Sequence[Scalar]) – The array of values.

      - mode – The insertion mode.

      - addv (InsertModeSpec | None)

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlexMatSetClosure`

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

  setPartitioner(part)

    Set the mesh partitioner.

    Logically collective.

    Parameters:

      part (Partitioner) – The partitioner.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `Partitioner`, `DMPlex.distribute`, `DMPlex.getPartitioner`, `Partitioner.create`, `DMPlexSetPartitioner`

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

  setRefinementLimit(refinementLimit)

    Set the maximum cell volume for refinement.

    Logically collective.

    Parameters:

      refinementLimit (float) – The maximum cell volume in the refined mesh.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.refine`, `DMPlex.getRefinementLimit`, `DMPlex.getRefinementUniform`, `DMPlex.setRefinementUniform`, `DMPlexSetRefinementLimit`

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

  setRefinementUniform(refinementUniform=True)

    Set the flag for uniform refinement.

    Logically collective.

    Parameters:

      refinementUniform (bool | None) – The flag for uniform refinement.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.refine`, `DMPlex.getRefinementUniform`, `DMPlex.getRefinementLimit`, `DMPlex.setRefinementLimit`, `DMPlexSetRefinementUniform`

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

  setSupport(p, supp)

    Set the points on the out-edges for this point in the DAG.

    Not collective.

    Parameters:

      - p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

      - supp (Sequence[int]) – An array of points which are on the out-edges for point `p`.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.setCone`, `DMPlex.setConeSize`, `DMPlex.create`, `DMPlex.getSupport`, `DMPlex.setChart`, `DMPlex.setSupportSize`, `DM.setUp`, `DMPlexSetSupport`

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

  setSupportSize(p, size)

    Set the number of out-edges for this point in the DAG.

    Not collective.

    Parameters:

      - p (int) – The point, which must lie in the chart set with `DMPlex.setChart`.

      - size (int) – The support size for point `p`.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.getSupportSize`, `DMPlex.setChart`, `DMPlexSetSupportSize`

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

  setTetGenOptions(opts)

    Set the options used for the Tetgen mesh generator.

    Not collective.

    Parameters:

      opts (str) – The command line options.

    Return type:

      None

    See also

    Working with PETSc options, `DM`, `DMPlex`, `DMPlex.setTriangleOptions`, `DMPlex.generate`, `DMPlexTetgenSetOptions`

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

  setTriangleOptions(opts)

    Set the options used for the Triangle mesh generator.

    Not collective.

    Parameters:

      opts (str) – The command line options.

    Return type:

      None

    See also

    Working with PETSc options, `DM`, `DMPlex`, `DMPlex.setTetGenOptions`, `DMPlex.generate`, `DMPlexTriangleSetOptions`

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

  setVecClosure(sec, vec, point, values, addv=None)

    Set an array of the values on the closure of `point`.

    Not collective.

    Parameters:

      - sec (Section) – The section describing the layout in `vec`, or `None` to use the default section.

      - vec (Vec) – The local vector.

      - point (int) – The point in the `DMPlex`.

      - values (Sequence[Scalar]) – The array of values.

      - mode – The insertion mode.

      - addv (InsertModeSpec | None)

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DMPlexVecSetClosure`

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

  stratify()

    Calculate the strata of DAG.

    Collective.

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.symmetrize`, `DMPlexStratify`

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

    Return type:

      None

  symmetrize()

    Create support (out-edge) information from cone (in-edge) information.

    Not collective.

    See also

    `DM`, `DMPlex`, `DMPlex.create`, `DMPlex.setChart`, `DMPlex.setConeSize`, `DMPlex.setCone`, `DMPlexSymmetrize`

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

    Return type:

      None

  topologyLoad(viewer)

    Load a topology into this `DMPlex` object.

    Collective.

    Parameters:

      viewer (Viewer) – The `Viewer` for the saved topology

    Returns:

      sfxc – The `SF` that pushes points in `[0, N)` to the associated points in the loaded `DMPlex`, where `N` is the global number of points.

    Return type:

      `SF`

    See also

    `DM`, `DMPlex`, `DM.load`, `DMPlex.coordinatesLoad`, `DMPlex.labelsLoad`, `DM.view`, `SF`, `Viewer`, `DMPlexTopologyLoad`

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

  topologyView(viewer)

    Save a `DMPlex` topology into a file.

    Collective.

    Parameters:

      viewer (Viewer) – The `Viewer` for saving.

    Return type:

      None

    See also

    `DM`, `DMPlex`, `DM.view`, `DMPlex.coordinatesView`, `DMPlex.labelsView`, `DMPlex.topologyLoad`, `Viewer`, `DMPlexTopologyView`

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

  uninterpolate()

    Convert to a mesh with only cells and vertices.

    Collective.

    See also

    `DMPlex`, `DMPlex.interpolate`, `DMPlex.createFromCellList`, `DMPlexUninterpolate`

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

    Return type:

      None

  vecGetClosure(sec, vec, p)

    Return an array of values on the closure of `p`.

    Not collective.

    Parameters:

      - sec (Section) – The section describing the layout in `vec`.

      - vec (Vec) – The local vector.

      - p (int) – The point in the `DMPlex`.

    Return type:

      ArrayScalar

    See also

    `DM`, `DMPlex`, `DMPlexVecRestoreClosure`

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