]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Safety check for usable eigenvalues extended to non-symmetric matrices
authorRoland Richter <Roland.Richter2@gmx.de>
Tue, 15 Oct 2019 08:26:19 +0000 (10:26 +0200)
committerRoland Richter <Roland.Richter2@gmx.de>
Tue, 15 Oct 2019 08:26:19 +0000 (10:26 +0200)
include/deal.II/lac/arpack_solver.h

index 4bbdb42c02764f1454fccf7019736df31a6a5abf..1ea8407214b8b7cac08483a260d986cff28a5484 100644 (file)
@@ -483,6 +483,21 @@ inline ArpackSolver::AdditionalData::AdditionalData(
         ExcMessage(
           "'smallest imaginary part' can only be used for non-symmetric problems!"));
     }
+  // Check for possible options for asymmetric problems
+  else
+    {
+      Assert(
+        eigenvalue_of_interest != algebraically_largest,
+        ExcMessage(
+          "'largest algebraic part' can only be used for symmetric problems!"));
+      Assert(
+        eigenvalue_of_interest != algebraically_smallest,
+        ExcMessage(
+          "'smallest algebraic part' can only be used for symmetric problems!"));
+      Assert(eigenvalue_of_interest != both_ends,
+             ExcMessage(
+               "'both ends' can only be used for symmetric problems!"));
+    }
 }
 
 

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.