Skip to content

Commit

Permalink
pseudo-fix more the convergence issue with sketched davidson
Browse files Browse the repository at this point in the history
  • Loading branch information
Heatherms27 committed Apr 24, 2024
1 parent 230a92c commit d81fb6a
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/eigs/primme_c.c
Expand Up @@ -574,13 +574,24 @@ STATIC void convTestFunAbsolute(double *eval, void *evec, double *rNorm,
(void)eval; /* unused parameter */
(void)evec; /* unused parameter */

if (primme->massMatrixMatvec == NULL) {
*isConv = *rNorm < max(primme->eps, MACHINE_EPSILON * 2) *
problemNorm_Sprimme(0, primme);
}
else {
*isConv = *rNorm < max(primme->eps, MACHINE_EPSILON) *
problemNorm_Sprimme(0, primme);
if(primme->projectionParams.projection != primme_proj_sketched){
if (primme->massMatrixMatvec == NULL) {
*isConv = *rNorm < max(primme->eps, MACHINE_EPSILON * 2) *
problemNorm_Sprimme(0, primme);
}
else {
*isConv = *rNorm < max(primme->eps, MACHINE_EPSILON) *
problemNorm_Sprimme(0, primme);
}
} else { // XXX: Made changes to "fix" convergence bug with sketching - Heather
if (primme->massMatrixMatvec == NULL) {
*isConv = *rNorm < max(primme->eps * 2, MACHINE_EPSILON * 2) *
problemNorm_Sprimme(0, primme);
}
else {
*isConv = *rNorm < max(primme->eps * 2, MACHINE_EPSILON) *
problemNorm_Sprimme(0, primme);
}
}
*ierr = 0;
}
Expand Down

0 comments on commit d81fb6a

Please sign in to comment.