petsc-3.7.1 2016-05-15
Report Typos and Errors

# PCSetModifySubMatrices

Sets a user-defined routine for modifying the submatrices that arise within certain subdomain-based preconditioners. The basic submatrices are extracted from the preconditioner matrix as usual; the user can then alter these (for example, to set different boundary conditions for each submatrix) before they are used for the local solves.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode  PCSetModifySubMatrices(PC pc,PetscErrorCode (*func)(PC,PetscInt,const IS[],const IS[],Mat[],void*),void *ctx)

Logically Collective on PC Many br

### Input Parameters

| pc | - the preconditioner context Many br
| func | - routine for modifying the submatrices Many br
| ctx | - optional user-defined context (may be null) Many br

### Calling sequence of func

        func (PC pc,PetscInt nsub,IS *row,IS *col,Mat *submat,void *ctx);

row -an array of index sets that contain the global row numbers Many brthat comprise each local submatrix Many br
col -an array of index sets that contain the global column numbers Many brthat comprise each local submatrix Many br
submat -array of local submatrices Many br
ctx -optional user-defined context for private data for the Many bruser-defined func routine (may be null) Many br

### Notes

PCSetModifySubMatrices() MUST be called before KSPSetUp() and Many brKSPSolve(). Many br

A routine set by PCSetModifySubMatrices() is currently called within Many brthe block Jacobi (PCBJACOBI) and additive Schwarz (PCASM) Many brpreconditioners. All other preconditioners ignore this routine. Many br

Many br

### Keywords

PC, set, modify, submatrices

### See Also

PCModifySubMatrices(), PCASMGetSubMatrices()

Level:advanced
Location:src/ksp/pc/interface/precon.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages