From bfeabab6b088a606f87fa7de28eb06cfb314496d Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 10 May 2020 18:50:32 -0500 Subject: [PATCH] Tests arpack/step-36_ar* - use solver_within_range macro --- tests/arpack/step-36_ar.cc | 15 +++++++++------ tests/arpack/step-36_ar.with_umfpack=true.output | 2 +- tests/arpack/step-36_ar_with_iterations.cc | 15 +++++++++------ ...36_ar_with_iterations.with_umfpack=true.output | 2 +- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/tests/arpack/step-36_ar.cc b/tests/arpack/step-36_ar.cc index 267af91027..a4528c644f 100644 --- a/tests/arpack/step-36_ar.cc +++ b/tests/arpack/step-36_ar.cc @@ -223,12 +223,15 @@ namespace Step36 ArpackSolver::AdditionalData additional_data( num_arnoldi_vectors, ArpackSolver::largest_magnitude, true); ArpackSolver eigensolver(solver_control, additional_data); - eigensolver.solve(stiffness_matrix, - mass_matrix, - inverse, - eigenvalues, - eigenfunctions, - eigenvalues.size()); + check_solver_within_range(eigensolver.solve(stiffness_matrix, + mass_matrix, + inverse, + eigenvalues, + eigenfunctions, + eigenvalues.size()), + solver_control.last_step(), + 2, + 10); // make sure that we have eigenvectors and they are mass-orthonormal: // a) (A*x_i-\lambda*B*x_i).L2() == 0 diff --git a/tests/arpack/step-36_ar.with_umfpack=true.output b/tests/arpack/step-36_ar.with_umfpack=true.output index b9591d254d..80459630d4 100644 --- a/tests/arpack/step-36_ar.with_umfpack=true.output +++ b/tests/arpack/step-36_ar.with_umfpack=true.output @@ -1,5 +1,5 @@ -DEAL::Convergence step 8 value 0.00000 +DEAL::Solver stopped within 2 - 10 iterations DEAL:: Eigenvalue 0 : (4.93877,0.00000) DEAL:: Eigenvalue 1 : (12.3707,0.00000) DEAL:: Eigenvalue 2 : (12.3707,0.00000) diff --git a/tests/arpack/step-36_ar_with_iterations.cc b/tests/arpack/step-36_ar_with_iterations.cc index 63165446df..7e21bc18e0 100644 --- a/tests/arpack/step-36_ar_with_iterations.cc +++ b/tests/arpack/step-36_ar_with_iterations.cc @@ -223,12 +223,15 @@ namespace Step36 ArpackSolver::AdditionalData additional_data( num_arnoldi_vectors, ArpackSolver::largest_magnitude, true); ArpackSolver eigensolver(solver_control, additional_data); - eigensolver.solve(stiffness_matrix, - mass_matrix, - inverse, - eigenvalues, - eigenfunctions, - eigenvalues.size()); + check_solver_within_range(eigensolver.solve(stiffness_matrix, + mass_matrix, + inverse, + eigenvalues, + eigenfunctions, + eigenvalues.size()), + solver_control.last_step(), + 2, + 10); // make sure that we have eigenvectors and they are mass-orthonormal: // a) (A*x_i-\lambda*B*x_i).L2() == 0 diff --git a/tests/arpack/step-36_ar_with_iterations.with_umfpack=true.output b/tests/arpack/step-36_ar_with_iterations.with_umfpack=true.output index 89431ddcc6..d7c3ae04b5 100644 --- a/tests/arpack/step-36_ar_with_iterations.with_umfpack=true.output +++ b/tests/arpack/step-36_ar_with_iterations.with_umfpack=true.output @@ -1,5 +1,5 @@ -DEAL::Convergence step 8 value 0.00000 +DEAL::Solver stopped within 2 - 10 iterations DEAL::8 iterations used DEAL:: Eigenvalue 0 : (4.93877,0.00000) DEAL:: Eigenvalue 1 : (12.3707,0.00000) -- 2.39.5