From 313568aced3db680f9f4ac111cc0e877fcf207bc Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 Jun 2016 11:21:52 +0200 Subject: [PATCH] parpack: change two Assert so that LinearOperator can be used for mass_matrix --- include/deal.II/lac/parpack_solver.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/deal.II/lac/parpack_solver.h b/include/deal.II/lac/parpack_solver.h index 2e5f0058b6..de67f19d17 100644 --- a/include/deal.II/lac/parpack_solver.h +++ b/include/deal.II/lac/parpack_solver.h @@ -610,12 +610,14 @@ void PArpackSolver::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( -- 2.39.5