Date: 2021-02-01T14:41:56+00:00

Actual source code: dvdtestconv.c
slepc-3.14.2 2021-02-01
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2020, Universitat Politecnica de Valencia, Spain

      6:    This file is part of SLEPc.
      7:    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
      8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      9: */
     10: /*
     11:    SLEPc eigensolver: "davidson"

     13:    Step: test for convergence
     14: */

     16: #include "davidson.h"

     18: static PetscBool dvd_testconv_slepc_0(dvdDashboard *d,PetscScalar eigvr,PetscScalar eigvi,PetscReal r,PetscReal *err)
     19: {

     23:   (*d->eps->converged)(d->eps,eigvr,eigvi,r,err,d->eps->convergedctx);CHKERRABORT(PetscObjectComm((PetscObject)d->eps),ierr);
     24:   PetscFunctionReturn(PetscNot(*err>=d->eps->tol));
     25: }

     27: PetscErrorCode dvd_testconv_slepc(dvdDashboard *d, dvdBlackboard *b)
     28: {

     32:   /* Setup the step */
     33:   if (b->state >= DVD_STATE_CONF) {
     34:     PetscFree(d->testConv_data);
     35:     d->testConv = dvd_testconv_slepc_0;
     36:   }
     37:   return(0);
     38: }