From 8c02820db6874c924ee9ae5ef24c6f1fe296326e Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin <kutalmis.bercin@esi-group.com> Date: Thu, 24 Nov 2022 13:47:08 +0000 Subject: [PATCH] COMP: EigenMatrix: remove unused iter variable --- .../test/matrices/EigenMatrix/Test-EigenMatrix.C | 16 +--------------- src/OpenFOAM/matrices/EigenMatrix/EigenMatrix.C | 6 +----- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/applications/test/matrices/EigenMatrix/Test-EigenMatrix.C b/applications/test/matrices/EigenMatrix/Test-EigenMatrix.C index d7e891e5c09..c99686591c4 100644 --- a/applications/test/matrices/EigenMatrix/Test-EigenMatrix.C +++ b/applications/test/matrices/EigenMatrix/Test-EigenMatrix.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is derivative work of OpenFOAM. @@ -49,20 +49,6 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Return the absolute tolerance value for bitwise comparisons of floatScalars -floatScalar getTol(floatScalar) -{ - return 1e-2; -} - - -// Return the absolute tolerance value for bitwise comparisons of doubleScalars -doubleScalar getTol(doubleScalar) -{ - return 1e-10; -} - - // Create each constructor of EigenMatrix<Type>, and print output template<class Type> void test_constructors(Type) diff --git a/src/OpenFOAM/matrices/EigenMatrix/EigenMatrix.C b/src/OpenFOAM/matrices/EigenMatrix/EigenMatrix.C index 170a9777bd6..30ddb10c36d 100644 --- a/src/OpenFOAM/matrices/EigenMatrix/EigenMatrix.C +++ b/src/OpenFOAM/matrices/EigenMatrix/EigenMatrix.C @@ -9,7 +9,7 @@ Contributed 2018-07-31 to the OpenFOAM Foundation Copyright (C) 2018 OpenFOAM Foundation Copyright (C) 2019-2020 Alberto Passalacqua - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -221,12 +221,8 @@ void Foam::EigenMatrix<cmptType>::symmTridiagonalQL() // If m == l, EValsRe_[l] is an eigenvalue, otherwise, iterate if (m > l) { - label iter = 0; - do { - iter += 1; - // Compute implicit shift cmptType g = EValsRe_[l]; cmptType p = (EValsRe_[l + 1] - g)/(2.0*EValsIm_[l]); -- GitLab