From e1eb353e39123b08ccdf1c80b98f3152d5192b88 Mon Sep 17 00:00:00 2001
From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de>
Date: Thu, 27 Sep 2012 13:05:57 +0000
Subject: [PATCH] [StokesLocalResidual] Two nested if statements replaced by
 one with && operator. (reviewed by klaus)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9136 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/freeflow/stokes/stokeslocalresidual.hh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dumux/freeflow/stokes/stokeslocalresidual.hh b/dumux/freeflow/stokes/stokeslocalresidual.hh
index 09be6ae479..10c565e821 100644
--- a/dumux/freeflow/stokes/stokeslocalresidual.hh
+++ b/dumux/freeflow/stokes/stokeslocalresidual.hh
@@ -176,9 +176,11 @@ protected:
     {
         // if the momentum balance has a dirichlet b.c., the mass balance
         // is replaced, thus we do not need to calculate outflow fluxes here
-        if (fluxVars.onBoundary())
-            if (momentumBalanceDirichlet_(this->bcTypes_(fluxVars.upstreamIdx())))
-                return;
+        if (fluxVars.onBoundary() &&
+            momentumBalanceDirichlet_(this->bcTypes_(fluxVars.upstreamIdx())))
+        {
+            return;
+        }
 
         // data attached to upstream and the downstream vertices
         const VolumeVariables &up = this->curVolVars_(fluxVars.upstreamIdx());
-- 
GitLab