From 45b875b65d2b1358722f730f3212ed3d8cd65ff8 Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Mon, 28 Sep 2015 22:18:39 +0100
Subject: [PATCH] Removed unnecessary "else if" conditions Resolves bug-report
 http://www.openfoam.org/mantisbt/view.php?id=1858

---
 .../schemes/linearUpwind/linearUpwindV.C      | 25 ++-----------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C
index 6368d2accd8..22a04bff7b4 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -125,17 +125,6 @@ Foam::linearUpwindV<Type>::correction
                 sfCorr[facei] *= maxCorrs/(sfCorrs + VSMALL);
             }
         }
-        else if (sfCorrs < 0)
-        {
-            if (maxCorrs > 0)
-            {
-                sfCorr[facei] = vector::zero;
-            }
-            else if (sfCorrs < maxCorrs)
-            {
-                sfCorr[facei] *= maxCorrs/(sfCorrs - VSMALL);
-            }
-        }
     }
 
 
@@ -203,17 +192,6 @@ Foam::linearUpwindV<Type>::correction
                         pSfCorr[facei] *= maxCorrs/(pSfCorrs + VSMALL);
                     }
                 }
-                else if (pSfCorrs < 0)
-                {
-                    if (maxCorrs > 0)
-                    {
-                        pSfCorr[facei] = vector::zero;
-                    }
-                    else if (pSfCorrs < maxCorrs)
-                    {
-                        pSfCorr[facei] *= maxCorrs/(pSfCorrs - VSMALL);
-                    }
-                }
             }
         }
     }
@@ -227,4 +205,5 @@ namespace Foam
     makelimitedSurfaceInterpolationTypeScheme(linearUpwindV, vector)
 }
 
+
 // ************************************************************************* //
-- 
GitLab