Actual source code: richscale.c

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


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

 12:     Collective on KSP

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

 18:     Level: intermediate

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

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