Skip to main content
`Ctrl`+`K`

# PCSPAISetSp

specify a symmetric matrix sparsity pattern in the `PCSPAI` preconditioner

## Synopsis

    PetscErrorCode PCSPAISetSp(PC pc, PetscInt sp)

## Input Parameters

- pc - the preconditioner

- sp - 0 or 1

## Note

If A has a symmetric nonzero pattern use `sp` 1 to improve performance by eliminating some communication in the parallel version. Even if A does not have a symmetric nonzero pattern `sp` 1 may well lead to good results, but the code will not follow the published SPAI algorithm exactly.

## See Also

KSP: Linear System Solvers, `PCSPAI`, `PCSetType()`

## Level

intermediate

## Location

src/ksp/pc/impls/spai/ispai.c

## Implementations

PCSPAISetSp_SPAI() in src/ksp/pc/impls/spai/impl/iispai.c

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