| Line 91... |
Line 91... |
if (!eps->max_it) {
|
if (!eps->max_it) {
|
if (eps->which==EPS_ALL) eps->max_it = 100; /* special case for spectrum slicing */
|
if (eps->which==EPS_ALL) eps->max_it = 100; /* special case for spectrum slicing */
|
else eps->max_it = PetscMax(100,2*eps->n/eps->ncv);
|
else eps->max_it = PetscMax(100,2*eps->n/eps->ncv);
|
}
|
}
|
if (!eps->which) { ierr = EPSDefaultSetWhich(eps);CHKERRQ(ierr); }
|
if (!eps->which) { ierr = EPSDefaultSetWhich(eps);CHKERRQ(ierr); }
|
if (eps->ishermitian && (eps->which==EPS_LARGEST_IMAGINARY || eps->which==EPS_SMALLEST_IMAGINARY))
|
if (eps->ishermitian && (eps->which==EPS_LARGEST_IMAGINARY || eps->which==EPS_SMALLEST_IMAGINARY)) SETERRQ(((PetscObject)eps)->comm,1,"Wrong value of eps->which");
|
SETERRQ(((PetscObject)eps)->comm,1,"Wrong value of eps->which");
|
|
|
|
if (!eps->extraction) {
|
if (!eps->extraction) {
|
ierr = EPSSetExtraction(eps,EPS_RITZ);CHKERRQ(ierr);
|
ierr = EPSSetExtraction(eps,EPS_RITZ);CHKERRQ(ierr);
|
} else if (eps->extraction!=EPS_RITZ && eps->extraction!=EPS_HARMONIC) {
|
} else if (eps->extraction!=EPS_RITZ && eps->extraction!=EPS_HARMONIC)
|
SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Unsupported extraction type");
|
SETERRQ(((PetscObject)eps)->comm,PETSC_ERR_SUP,"Unsupported extraction type");
|
}
|
|
|
|
ierr = EPSAllocateSolution(eps);CHKERRQ(ierr);
|
ierr = EPSAllocateSolution(eps);CHKERRQ(ierr);
|
ierr = PetscFree(eps->T);CHKERRQ(ierr);
|
ierr = PetscFree(eps->T);CHKERRQ(ierr);
|
if (!eps->ishermitian || eps->extraction==EPS_HARMONIC) {
|
if (!eps->ishermitian || eps->extraction==EPS_HARMONIC) {
|
ierr = PetscMalloc(eps->ncv*eps->ncv*sizeof(PetscScalar),&eps->T);CHKERRQ(ierr);
|
ierr = PetscMalloc(eps->ncv*eps->ncv*sizeof(PetscScalar),&eps->T);CHKERRQ(ierr);
|