Actual source code: richscale.c

      1: #define PETSCKSP_DLL

     3:  #include src/ksp/ksp/kspimpl.h
     4:  #include src/ksp/ksp/impls/rich/richctx.h

      9: /*@
     10:     KSPRichardsonSetScale - Set the damping factor; if this routine is not called, the factor
     11:     defaults to 1.0.

     13:     Collective on KSP

     15:     Input Parameters:
     16: +   ksp - the iterative context
     17: -   scale - the relaxation factor

     19:     Level: intermediate

     21: .keywords: KSP, Richardson, set, scale
     22: @*/
     23: PetscErrorCode PETSCKSP_DLLEXPORT KSPRichardsonSetScale(KSP ksp,PetscReal scale)
     24: {
     25:   PetscErrorCode ierr,(*f)(KSP,PetscReal);

     29:   PetscObjectQueryFunction((PetscObject)ksp,"KSPRichardsonSetScale_C",(void (**)(void))&f);
     30:   if (f) {
     31:     (*f)(ksp,scale);
     32:   }
     33:   return(0);
     34: }