From 8f0591440a7368b19e1b945a14b6571d8cfac276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de> Date: Fri, 22 Oct 2021 23:58:51 +0200 Subject: [PATCH] [splinecommon_] Use idx instead of i Otherwise the reverse feature would not work. This bug exists since the beginning of splinecommon_. Thanks Timo for spotting a mistake I'd introduced. --- dumux/common/splinecommon_.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dumux/common/splinecommon_.hh b/dumux/common/splinecommon_.hh index 8bebaae5d3..0d51108ac4 100644 --- a/dumux/common/splinecommon_.hh +++ b/dumux/common/splinecommon_.hh @@ -347,8 +347,8 @@ protected: int idx = i; if (reverse) idx = numSamples - i - 1; - destX[i] = (*it)[0]; - destY[i] = (*it)[1]; + destX[idx] = (*it)[0]; + destY[idx] = (*it)[1]; } } @@ -382,8 +382,8 @@ protected: int idx = i; if (reverse) idx = numSamples - i - 1; - destX[i] = std::get<0>(*it); - destY[i] = std::get<1>(*it); + destX[idx] = std::get<0>(*it); + destY[idx] = std::get<1>(*it); } } -- GitLab