PCPatchSetDiscretisationInfo — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PCPatchSetDiscretisationInfo

Provide the per-subspace discretisation information required by a `PCPATCH` preconditioner to build patch problems

## Synopsis

    #include "petscpc.h"
    #include "petscmat.h"
    PetscErrorCode PCPatchSetDiscretisationInfo(PC pc, PetscInt nsubspaces, DM dms[], PetscInt bs[], PetscInt nodesPerCell[], const PetscInt **cellNodeMap, const PetscInt subspaceOffsets[], PetscInt numGhostBcs, const PetscInt ghostBcNodes[], PetscInt numGlobalBcs, const PetscInt globalBcNodes[])

Logically Collective

## Input Parameters

- pc - the `PCPATCH` preconditioner

- nsubspaces - the number of discretisation subspaces (e.g. fields)

- dms - array of length `nsubspaces` of `DM`s, one per subspace, from which the local sections and section `PetscSF`s are obtained

- bs - array of length `nsubspaces` giving the block size of each subspace

- nodesPerCell - array of length `nsubspaces` giving the number of nodes per cell for each subspace

- cellNodeMap - array of length `nsubspaces`; entry `i` is a cell-to-node map (array) of length `(cEnd - cStart) * nodesPerCell[i]`

- subspaceOffsets - array of length `nsubspaces + 1` giving the starting global dof offset of each subspace

- numGhostBcs - number of ghost (off-process) boundary-condition dofs

- ghostBcNodes - array of length `numGhostBcs` of the ghost boundary-condition dof indices

- numGlobalBcs - number of global boundary-condition dofs

- globalBcNodes - array of length `numGlobalBcs` of the global boundary-condition dof indices

## See Also

KSP: Linear System Solvers, `PCPATCH`, `PCPatchSetComputeOperator()`, `PCPatchSetComputeFunction()`

## Level

advanced

## Location

src/ksp/pc/impls/patch/pcpatch.c

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