]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added an assertion to protect when SLEPc fails to converge the number of eigenvalues...
authorToby D. Young <tyoung@ippt.pan.pl>
Wed, 7 Oct 2009 14:05:41 +0000 (14:05 +0000)
committerToby D. Young <tyoung@ippt.pan.pl>
Wed, 7 Oct 2009 14:05:41 +0000 (14:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@19750 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/slepc_solver.h

index 5296b113e17d3481e19cca833b358702c5cef5db..da355171f0d4a180685ddd0e64984f87344063dd 100644 (file)
@@ -555,10 +555,10 @@ namespace SLEPcWrappers
       set_matrices (A,B);
       solve (n_eigenvectors, &n_converged);
 
-      if (n_converged > n_eigenvectors)
+      if (n_converged >= n_eigenvectors)
        n_converged = n_eigenvectors;
-      AssertThrow (n_converged == n_eigenvectors, ExcSLEPcWrappersUsageError());
 
+      AssertThrow (n_converged == n_eigenvectors, ExcSLEPcWrappersUsageError());
       AssertThrow (vr.size() >= 1, ExcSLEPcWrappersUsageError());
       vr.resize (n_converged, vr.front());
       kr.resize (n_converged);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.