| Line 97... |
Line 97... |
ierr = MatMult(A,v,e);CHKERRQ(ierr);
|
ierr = MatMult(A,v,e);CHKERRQ(ierr);
|
ierr = VecDot(w,e,&alpha1);CHKERRQ(ierr);
|
ierr = VecDot(w,e,&alpha1);CHKERRQ(ierr);
|
|
|
/* in the case of Wilkinson the shift is improved */
|
/* in the case of Wilkinson the shift is improved */
|
if (power->shift_type == EPSPOWER_SHIFT_WILKINSON) {
|
if (power->shift_type == EPSPOWER_SHIFT_WILKINSON) {
|
#if defined(PETSC_BLASLAPACK_ESSL_ONLY)
|
#if defined(SLEPC_MISSING_LAPACK_TREVC_LAEV2)
|
SETERRQ(PETSC_ERR_SUP,"LAEV2 - Lapack routine is unavailable.");
|
SETERRQ(PETSC_ERR_SUP,"LAEV2 - Lapack routine is unavailable.");
|
#endif
|
#else
|
/* beta1 is the norm of the residual associated to R(v) */
|
/* beta1 is the norm of the residual associated to R(v) */
|
alpha = -alpha1;
|
alpha = -alpha1;
|
ierr = VecAXPY(&alpha,v,e);CHKERRQ(ierr);
|
ierr = VecAXPY(&alpha,v,e);CHKERRQ(ierr);
|
ierr = STNorm(eps->OP,e,&norm);CHKERRQ(ierr);
|
ierr = STNorm(eps->OP,e,&norm);CHKERRQ(ierr);
|
beta1 = norm;
|
beta1 = norm;
|
| Line 118... |
Line 118... |
if (PetscAbsScalar(rt1-alpha1) < PetscAbsScalar(rt2-alpha1)) {
|
if (PetscAbsScalar(rt1-alpha1) < PetscAbsScalar(rt2-alpha1)) {
|
*shift = rt1;
|
*shift = rt1;
|
} else {
|
} else {
|
*shift = rt2;
|
*shift = rt2;
|
}
|
}
|
|
#endif
|
}
|
}
|
else *shift = alpha1;
|
else *shift = alpha1;
|
|
|
PetscFunctionReturn(0);
|
PetscFunctionReturn(0);
|
}
|
}
|