From 7893f3cc69121481e2ece07f7c4e50fa1c3f44f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de>
Date: Wed, 25 Apr 2018 20:04:50 +0200
Subject: [PATCH] [vtk][outputmodule] avoid duplicate if statement

---
 dumux/io/vtkoutputmodule.hh | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/dumux/io/vtkoutputmodule.hh b/dumux/io/vtkoutputmodule.hh
index 7a95aa31ff..97b94f2be3 100644
--- a/dumux/io/vtkoutputmodule.hh
+++ b/dumux/io/vtkoutputmodule.hh
@@ -297,16 +297,15 @@ private:
                 // If velocity output is enabled we need to bind to the whole stencil
                 // otherwise element-local data is sufficient
                 if (velocityOutput.enableOutput())
+                {
                     fvGeometry.bind(element);
+                    elemVolVars.bind(element, fvGeometry, sol_);
+                }
                 else
+                {
                     fvGeometry.bindElement(element);
-
-                // If velocity output is enabled we need to bind to the whole stencil
-                // otherwise element-local data is sufficient
-                if (velocityOutput.enableOutput())
-                    elemVolVars.bind(element, fvGeometry, sol_);
-                else if (!volVarScalarDataInfo_.empty())
                     elemVolVars.bindElement(element, fvGeometry, sol_);
+                }
 
                 if (!volVarScalarDataInfo_.empty()
                     || !volVarVectorDataInfo_.empty())
-- 
GitLab