]> https://gitweb.dealii.org/ - dealii.git/commitdiff
parpack: change two Assert so that LinearOperator can be used for mass_matrix 2683/head
authorDenis Davydov <davydden@gmail.com>
Wed, 15 Jun 2016 09:21:52 +0000 (11:21 +0200)
committerDenis Davydov <davydden@gmail.com>
Wed, 15 Jun 2016 09:21:52 +0000 (11:21 +0200)
include/deal.II/lac/parpack_solver.h

index 2e5f0058b6fc1e154c23c1d5771688ff805337cf..de67f19d17db134977a578fc8125c97e611da575 100644 (file)
@@ -610,12 +610,14 @@ void PArpackSolver<VectorType>::solve
           PArpackExcInvalidEigenvalueSize(n_eigenvalues, eigenvalues.size()));
 
 
-  Assert (n_eigenvalues < mass_matrix.m(),
-          PArpackExcInvalidNumberofEigenvalues(n_eigenvalues, mass_matrix.m()));
+  // use eigenvectors to get the problem size so that it is possible to
+  // employ LinearOperator for mass_matrix.
+  Assert (n_eigenvalues < eigenvectors[0].size(),
+          PArpackExcInvalidNumberofEigenvalues(n_eigenvalues, eigenvectors[0].size()));
 
-  Assert (additional_data.number_of_arnoldi_vectors < mass_matrix.m(),
+  Assert (additional_data.number_of_arnoldi_vectors < eigenvectors[0].size(),
           PArpackExcInvalidNumberofArnoldiVectors(
-            additional_data.number_of_arnoldi_vectors, mass_matrix.m()));
+            additional_data.number_of_arnoldi_vectors, eigenvectors[0].size()));
 
   Assert (additional_data.number_of_arnoldi_vectors > 2*n_eigenvalues+1,
           PArpackExcSmallNumberofArnoldiVectors(

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.