From 68659b7f9c5758b029a48704971e059558a00fd6 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 16 Dec 2014 02:44:37 +0100 Subject: [PATCH] sort output of arpack/step-36_ar --- tests/arpack/step-36_ar.cc | 7 +++++++ tests/arpack/step-36_ar.output | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/arpack/step-36_ar.cc b/tests/arpack/step-36_ar.cc index 416330c2f8..1b429a8cdd 100644 --- a/tests/arpack/step-36_ar.cc +++ b/tests/arpack/step-36_ar.cc @@ -51,6 +51,7 @@ #include #include +#include namespace Step36 { @@ -264,6 +265,10 @@ namespace Step36 } + bool my_compare(std::complex a, std::complex b) + { + return a.real() < b.real(); + } template void EigenvalueProblem::run () @@ -274,6 +279,8 @@ namespace Step36 const std::pair res = solve (); + std::sort(eigenvalues.begin(), eigenvalues.end(), my_compare); + for (unsigned int i=0; i