:orphan:
# PCSORSetOmega
Sets the SOR relaxation coefficient, omega (where omega = 1.0 by default). 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCSORSetOmega(PC pc, PetscReal omega)
```
Logically Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***omega -*** relaxation coefficient (0 < omega < 2).



## Options Database Key

- ***-pc_sor_omega <omega> -*** Sets omega





## Note
If omega != 1, you will need to set the `MAT_USE_INODE`S option to `PETSC_FALSE` on the matrix.


## See Also
 `PCSOR`, `PCSORSetSymmetric()`, `PCSORSetIterations()`, `PCEisenstatSetOmega()`, `MatSetOption()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/sor/sor.c.html#PCSORSetOmega">src/ksp/pc/impls/sor/sor.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/sor/sor.c.html#PCSORSetOmega_SOR">PCSORSetOmega_SOR in src/ksp/pc/impls/sor/sor.c</A><BR>


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


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