# PCSPAISetNBSteps
set maximum number of improvement steps per row in the `PCSPAI` preconditioner 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCSPAISetNBSteps(PC pc, PetscInt nbsteps1)
```

## Input Parameters

- ***pc -*** the preconditioner
- ***n -*** number of steps (default 5)



## Note
`PCSPAI` constructs to approximation to every column of
the exact inverse of A in a series of improvement
steps. The quality of the approximation is determined
by epsilon. If an approximation achieving an accuracy
of epsilon is not obtained after ns steps, SPAI simply
uses the best approximation constructed so far.




## See Also
 `PCSPAI`, `PCSetType()`, `PCSPAISetMaxNew()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/spai/ispai.c.html#PCSPAISetNBSteps">src/ksp/pc/impls/spai/ispai.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/spai/ispai.c.html#PCSPAISetNBSteps_SPAI">PCSPAISetNBSteps_SPAI in src/ksp/pc/impls/spai/ispai.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/spai/ispai.c)


[Index of all PC routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
