PCModifySubMatrices — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PCModifySubMatrices

Calls an optional user-defined routine within certain preconditioners if one has been set with `PCSetModifySubMatrices()`.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode PCModifySubMatrices(PC pc, PetscInt nsub, const IS row[], const IS col[], Mat submat[], PetscCtx ctx)

Collective

## Input Parameters

- pc - the `PC` preconditioner context

- nsub - the number of local submatrices

- row - an array of index sets that contain the global row numbers that comprise each local submatrix

- col - an array of index sets that contain the global column numbers that comprise each local submatrix

- submat - array of local submatrices

- ctx - optional user-defined context for private data for the user-defined routine (may be `NULL`)

## Output Parameter

- submat - array of local submatrices (the entries of which may have been modified)

## Note

The user should NOT generally call this routine, as it will automatically be called within certain preconditioners.

## See Also

KSP: Linear System Solvers, `PC`, `PCModifySubMatricesFn`, `PCSetModifySubMatrices()`

## Level

developer

## Location

src/ksp/pc/interface/precon.c

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