From e4ac3fba7785f60ecefe574e426ed77bc5f20a6f Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 20 Apr 2017 10:54:08 +0100 Subject: [PATCH] SVD: Improved overflow/division protection. Resolves bug report https://bugs.openfoam.org/view.php?id=2486 --- src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C index 8b090ff275..89105de655 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C +++ b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -156,7 +156,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition) { if (i < Un-1) { - if (g != 0) + if (g*U_(i, l) != 0) { for (label j=l; j