# PCDiagonalScaleSet

Indicates the left scaling to use to apply an additional left and right scaling as needed by certain time-stepping codes.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode PETSCKSP_DLLEXPORT PCDiagonalScaleSet(PC pc,Vec s)

Collective on PC

### Input Parameters

| pc | - the preconditioner context
| s | - scaling vector

Notes: The system solved via the Krylov method is

              D M A D^{-1} y = D M b  for left preconditioning or

              D A M D^{-1} z = D b for right preconditioning

PCDiagonalScaleLeft() scales a vector by D. PCDiagonalScaleRight() scales a vector by D^{-1}.

### Keywords

PC

### See Also

PCCreate(), PCSetUp(), PCDiagonalScaleLeft(), PCDiagonalScaleRight(), PCDiagonalScale()

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

### Examples

src/ksp/ksp/examples/tutorials/ex10.c.html