From e7996009cf6b92752c5b6856af34a5f3f7c7d82b Mon Sep 17 00:00:00 2001 From: Alexandre Halbach Date: Sun, 17 Oct 2021 11:27:23 +0300 Subject: [PATCH] clean myalgo::findmin --- src/mesh/myalgorithm.cpp | 1 - src/mesh/myalgorithm.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesh/myalgorithm.cpp b/src/mesh/myalgorithm.cpp index ad42d225..bd588bc9 100755 --- a/src/mesh/myalgorithm.cpp +++ b/src/mesh/myalgorithm.cpp @@ -2196,7 +2196,6 @@ int myalgorithm::findmin(std::vector vals, double nt) std::vector reorderingvector; stablesort(nt, vals, reorderingvector); - int ind = 0; for (int i = 0; i < reorderingvector.size(); i++) { if (reorderingvector[i] == 0) diff --git a/src/mesh/myalgorithm.h b/src/mesh/myalgorithm.h index 81a30e6e..bb634b3f 100755 --- a/src/mesh/myalgorithm.h +++ b/src/mesh/myalgorithm.h @@ -271,7 +271,7 @@ namespace myalgorithm // Append the values of this rank and all neighbour ranks (in case of DDM). Also get the value 'togroup' on each neighbour rank. std::vector appendneighbourvalues(std::vector& toappendto, std::vector& toappend, int togroup); - // Return the index of the min value. The lowest index is returned in case other values are closer than nt to the min value. + // Return the lowest index of any value closer than nt to the min value: int findmin(std::vector vals, double nt); };