From 875c9591c2cbfc5d9838244d9dca019bdfb342c4 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Fri, 15 Mar 2024 18:58:31 +0100 Subject: [PATCH] Fix test --- tests/lac/precondition_relaxation_01.cc | 23 +++++++++++--------- tests/lac/precondition_relaxation_01.output | 24 ++++++++++----------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/tests/lac/precondition_relaxation_01.cc b/tests/lac/precondition_relaxation_01.cc index 2d495811dc..b53f4e3f2c 100644 --- a/tests/lac/precondition_relaxation_01.cc +++ b/tests/lac/precondition_relaxation_01.cc @@ -225,18 +225,19 @@ main() { std::vector> results; - { - // 0) Test PreconditionJacobi - PreconditionJacobi preconditioner; + if (relaxation != 0.0) + { + // 0) Test PreconditionJacobi + PreconditionJacobi preconditioner; - PreconditionJacobi::AdditionalData ad; - ad.relaxation = relaxation; - ad.n_iterations = n_iterations; + PreconditionJacobi::AdditionalData ad; + ad.relaxation = relaxation; + ad.n_iterations = n_iterations; - preconditioner.initialize(system_matrix, ad); + preconditioner.initialize(system_matrix, ad); - results.emplace_back(test(preconditioner, src)); - } + results.emplace_back(test(preconditioner, src)); + } { // 1) Test PreconditionRelaxation + DiagonalMatrix and matrix with @@ -358,7 +359,9 @@ main() return true; })) - deallog << "OK!" << std::endl; + deallog << "OK! " << std::get<0>(results[0]) << " " + << std::get<1>(results[0]) << " " << std::get<2>(results[0]) + << " " << std::get<3>(results[0]) << " " << std::endl; else deallog << "ERROR!" << std::endl; } diff --git a/tests/lac/precondition_relaxation_01.output b/tests/lac/precondition_relaxation_01.output index c3f612cf69..24faf71694 100644 --- a/tests/lac/precondition_relaxation_01.output +++ b/tests/lac/precondition_relaxation_01.output @@ -1,13 +1,13 @@ -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! -DEAL::OK! +DEAL::OK! 6.06176 14.6813 6.06176 14.6813 +DEAL::OK! 10.5221 19.3228 10.5221 19.3228 +DEAL::OK! 15.3680 24.2003 15.3680 24.2003 +DEAL::OK! 5.62500 14.2615 5.62500 14.2615 +DEAL::OK! 9.85490 18.6445 9.85490 18.6445 +DEAL::OK! 14.3212 23.1484 14.3212 23.1484 +DEAL::OK! 5.06250 13.7224 5.06250 13.7224 +DEAL::OK! 8.97855 17.7551 8.97855 17.7551 +DEAL::OK! 12.9800 21.7988 12.9800 21.7988 +DEAL::OK! 6.18750 14.8024 6.18750 14.8024 +DEAL::OK! 10.7121 19.5161 10.7121 19.5161 +DEAL::OK! 15.6708 24.5042 15.6708 24.5042 -- 2.39.5