Subversion Repositories slepc-dev

Rev

Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2384 Rev 2499
Line 62... Line 62...
  PetscFunctionBegin;
  PetscFunctionBegin;
  if (eps->ncv) {
  if (eps->ncv) {
    if (eps->ncv<eps->nev) SETERRQ(((PetscObject)eps)->comm,1,"The value of ncv must be at least nev");
    if (eps->ncv<eps->nev) SETERRQ(((PetscObject)eps)->comm,1,"The value of ncv must be at least nev");
  }
  }
  else eps->ncv = eps->nev;
  else eps->ncv = eps->nev;
  if (eps->mpd) PetscInfo(eps,"Warning: parameter mpd ignored\n");
  if (eps->mpd) { ierr = PetscInfo(eps,"Warning: parameter mpd ignored\n");CHKERRQ(ierr); }
  if (!eps->max_it) eps->max_it = PetscMax(2000,100*eps->n);
  if (!eps->max_it) eps->max_it = PetscMax(2000,100*eps->n);
  if (!eps->which) eps->which = EPS_LARGEST_MAGNITUDE;
  if (!eps->which) eps->which = EPS_LARGEST_MAGNITUDE;
  if (eps->which!=EPS_LARGEST_MAGNITUDE)
  if (eps->which!=EPS_LARGEST_MAGNITUDE)
    SETERRQ(((PetscObject)eps)->comm,1,"Wrong value of eps->which");
    SETERRQ(((PetscObject)eps)->comm,1,"Wrong value of eps->which");
  if (power->shift_type != EPS_POWER_SHIFT_CONSTANT) {
  if (power->shift_type != EPS_POWER_SHIFT_CONSTANT) {
Line 75... Line 75...
      SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Variable shifts only allowed in shift-and-invert ST");
      SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Variable shifts only allowed in shift-and-invert ST");
    ierr = STGetMatMode(eps->OP,&mode);CHKERRQ(ierr);
    ierr = STGetMatMode(eps->OP,&mode);CHKERRQ(ierr);
    if (mode == ST_MATMODE_INPLACE)
    if (mode == ST_MATMODE_INPLACE)
      SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"ST matrix mode inplace does not work with variable shifts");
      SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"ST matrix mode inplace does not work with variable shifts");
  }
  }
  if (eps->extraction) {
  if (eps->extraction) { ierr = PetscInfo(eps,"Warning: extraction type ignored\n");CHKERRQ(ierr); }
     ierr = PetscInfo(eps,"Warning: extraction type ignored\n");CHKERRQ(ierr);
 
  }
 
  if (eps->balance!=EPS_BALANCE_NONE)
  if (eps->balance!=EPS_BALANCE_NONE)
    SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Balancing not supported in this solver");
    SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Balancing not supported in this solver");
  ierr = EPSAllocateSolution(eps);CHKERRQ(ierr);
  ierr = EPSAllocateSolution(eps);CHKERRQ(ierr);
  if (eps->leftvecs) {
  if (eps->leftvecs) {
    ierr = EPSDefaultGetWork(eps,3);CHKERRQ(ierr);
    ierr = EPSDefaultGetWork(eps,3);CHKERRQ(ierr);
Line 226... Line 224...
      else {
      else {
        v = eps->V[eps->nconv];
        v = eps->V[eps->nconv];
        ierr = EPSGetStartVector(eps,eps->nconv,v,&breakdown);CHKERRQ(ierr);
        ierr = EPSGetStartVector(eps,eps->nconv,v,&breakdown);CHKERRQ(ierr);
        if (breakdown) {
        if (breakdown) {
          eps->reason = EPS_DIVERGED_BREAKDOWN;
          eps->reason = EPS_DIVERGED_BREAKDOWN;
          PetscInfo(eps,"Unable to generate more start vectors\n");
          ierr = PetscInfo(eps,"Unable to generate more start vectors\n");CHKERRQ(ierr);
        }
        }
      }
      }
    }
    }
    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
    if (eps->its >= eps->max_it) eps->reason = EPS_DIVERGED_ITS;
  }
  }