From fe1b1e895d22527719dfcddeb371d6b6e01c4217 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 17 Sep 2015 23:09:42 +0200 Subject: [PATCH] avoid using C++11 functions in arpack unit tests --- tests/arpack/step-36_ar.cc | 12 +++++++++--- tests/arpack/step-36_parpack.cc | 8 ++++++-- tests/arpack/step-36_parpack_trilinos.cc | 12 +++++++++--- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/tests/arpack/step-36_ar.cc b/tests/arpack/step-36_ar.cc index 1811ba4f93..4713a48dae 100644 --- a/tests/arpack/step-36_ar.cc +++ b/tests/arpack/step-36_ar.cc @@ -228,7 +228,7 @@ namespace Step36 // make sure that we have eigenvectors and they are mass-orthonormal: // a) (A*x_i-\lambda*B*x_i).L2() == 0 - // b) x_i*B*y_i=\delta_{ij} + // b) x_j*B*x_i=\delta_{ij} { Vector Ax(eigenfunctions[0]), Bx(eigenfunctions[0]); for (unsigned int i=0; i < eigenfunctions.size(); ++i) @@ -237,12 +237,18 @@ namespace Step36 for (unsigned int j=0; j < eigenfunctions.size(); j++) Assert( std::abs( eigenfunctions[j] * Bx - (i==j))< 1e-8, - ExcMessage(std::to_string(eigenfunctions[j] * Bx))); + ExcMessage("Eigenvectors " + + Utilities::int_to_string(i) + + " and " + + Utilities::int_to_string(j) + + " are not orthonormal!")); stiffness_matrix.vmult(Ax,eigenfunctions[i]); Ax.add(-1.0*std::real(eigenvalues[i]),Bx); Assert (Ax.l2_norm() < 1e-8, - ExcMessage(std::to_string(Ax.l2_norm()))); + ExcMessage("Returned vector " + + Utilities::int_to_string(i) + + " is not an eigenvector!")); } } for (unsigned int i=0; i