Subversion Repositories slepc-dev

Rev

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

Rev 2762 Rev 2823
Line 98... Line 98...
 
 
  /* Avoid setting the automatic shift when a target is set */
  /* Avoid setting the automatic shift when a target is set */
  ierr = STSetDefaultShift(eps->OP,0.0);CHKERRQ(ierr);
  ierr = STSetDefaultShift(eps->OP,0.0);CHKERRQ(ierr);
 
 
  ierr = STSetUp(eps->OP);CHKERRQ(ierr);
  ierr = STSetUp(eps->OP);CHKERRQ(ierr);
  ierr = PetscTypeCompare((PetscObject)eps->OP,STPRECOND,&t);CHKERRQ(ierr);
  ierr = PetscObjectTypeCompare((PetscObject)eps->OP,STPRECOND,&t);CHKERRQ(ierr);
  if (!t) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"PRIMME only works with STPRECOND");
  if (!t) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"PRIMME only works with STPRECOND");
 
 
  /* Transfer SLEPc options to PRIMME options */
  /* Transfer SLEPc options to PRIMME options */
  primme->n = eps->n;
  primme->n = eps->n;
  primme->nLocal = eps->nloc;
  primme->nLocal = eps->nloc;
Line 153... Line 153...
 
 
  /* Setup the preconditioner */
  /* Setup the preconditioner */
  ops->eps = eps;
  ops->eps = eps;
  if (primme->correctionParams.precondition) {
  if (primme->correctionParams.precondition) {
    ierr = STGetKSP(eps->OP,&ops->ksp);CHKERRQ(ierr);
    ierr = STGetKSP(eps->OP,&ops->ksp);CHKERRQ(ierr);
    ierr = PetscTypeCompare((PetscObject)ops->ksp,KSPPREONLY,&t);CHKERRQ(ierr);
    ierr = PetscObjectTypeCompare((PetscObject)ops->ksp,KSPPREONLY,&t);CHKERRQ(ierr);
    if (!t) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"PRIMME only works with KSPPREONLY");
    if (!t) SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"PRIMME only works with KSPPREONLY");
    primme->preconditioner = PETSC_NULL;
    primme->preconditioner = PETSC_NULL;
    primme->applyPreconditioner = applyPreconditioner_PRIMME;
    primme->applyPreconditioner = applyPreconditioner_PRIMME;
  }
  }
 
 
Line 319... Line 319...
  primme_params   *primme = &((EPS_PRIMME *)eps->data)->primme;
  primme_params   *primme = &((EPS_PRIMME *)eps->data)->primme;
  EPSPRIMMEMethod methodn;
  EPSPRIMMEMethod methodn;
  PetscMPIInt     rank;
  PetscMPIInt     rank;
 
 
  PetscFunctionBegin;
  PetscFunctionBegin;
  ierr = PetscTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
  ierr = PetscObjectTypeCompare((PetscObject)viewer,PETSCVIEWERASCII,&isascii);CHKERRQ(ierr);
  if (!isascii) SETERRQ1(((PetscObject)eps)->comm,1,"Viewer type %s not supported for EPSPRIMME",((PetscObject)viewer)->type_name);
  if (!isascii) SETERRQ1(((PetscObject)eps)->comm,1,"Viewer type %s not supported for EPSPRIMME",((PetscObject)viewer)->type_name);
 
 
  ierr = PetscViewerASCIIPrintf(viewer,"  PRIMME: block size=%d\n",primme->maxBlockSize);CHKERRQ(ierr);
  ierr = PetscViewerASCIIPrintf(viewer,"  PRIMME: block size=%d\n",primme->maxBlockSize);CHKERRQ(ierr);
  ierr = EPSPRIMMEGetMethod(eps,&methodn);CHKERRQ(ierr);
  ierr = EPSPRIMMEGetMethod(eps,&methodn);CHKERRQ(ierr);
  ierr = PetscViewerASCIIPrintf(viewer,"  PRIMME: solver method: %s\n",EPSPRIMMEMethods[methodn]);CHKERRQ(ierr);
  ierr = PetscViewerASCIIPrintf(viewer,"  PRIMME: solver method: %s\n",EPSPRIMMEMethods[methodn]);CHKERRQ(ierr);