From 934c5e8454d9bb68b3bdbd4e5f4acd6ff95d0c29 Mon Sep 17 00:00:00 2001
From: Bernd Flemisch <bernd@iws.uni-stuttgart.de>
Date: Wed, 28 Nov 2012 09:57:43 +0000
Subject: [PATCH] implicit branch: simplify spatial parameters of test problem,
 rename test_2p to test_box2p

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/branches/implicit@9694 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 test/implicit/2p/Makefile.am                         |  4 ++--
 test/implicit/2p/lensspatialparams.hh                | 12 ++----------
 test/implicit/2p/{test_2p.cc => test_box2p.cc}       |  0
 test/implicit/2p/{test_2p.input => test_box2p.input} |  0
 4 files changed, 4 insertions(+), 12 deletions(-)
 rename test/implicit/2p/{test_2p.cc => test_box2p.cc} (100%)
 rename test/implicit/2p/{test_2p.input => test_box2p.input} (100%)

diff --git a/test/implicit/2p/Makefile.am b/test/implicit/2p/Makefile.am
index 890f94bff7..bb63e52dcf 100644
--- a/test/implicit/2p/Makefile.am
+++ b/test/implicit/2p/Makefile.am
@@ -1,9 +1,9 @@
-check_PROGRAMS = test_2p test_cc2p
+check_PROGRAMS = test_box2p test_cc2p
 
 noinst_HEADERS = *.hh
 EXTRA_DIST=*reference.vtu *.input grids/*.dgf CMakeLists.txt
 
-test_2p_SOURCES = test_2p.cc
+test_box2p_SOURCES = test_box2p.cc
 test_cc2p_SOURCES = test_cc2p.cc
 
 include $(top_srcdir)/am/global-rules
diff --git a/test/implicit/2p/lensspatialparams.hh b/test/implicit/2p/lensspatialparams.hh
index 348ed83976..50d24f9783 100644
--- a/test/implicit/2p/lensspatialparams.hh
+++ b/test/implicit/2p/lensspatialparams.hh
@@ -149,11 +149,7 @@ public:
         if (!isBox_ && scvIdx > 0)
             return intrinsicPermeability(*(fvElemGeom.neighbors[scvIdx]), fvElemGeom, 0);
         
-        GlobalPosition globalPos;
-        if (isBox_)
-            globalPos = fvElemGeom.subContVol[scvIdx].global;
-        else 
-            globalPos = element.geometry().center();
+        const GlobalPosition& globalPos = fvElemGeom.subContVol[scvIdx].global;
         
         if (isInLens_(globalPos))
             return lensK_;
@@ -188,11 +184,7 @@ public:
         if (!isBox_ && scvIdx > 0)
             return materialLawParams(*(fvElemGeom.neighbors[scvIdx]), fvElemGeom, 0);
         
-        GlobalPosition globalPos;
-        if (isBox_)
-            globalPos = fvElemGeom.subContVol[scvIdx].global;
-        else 
-            globalPos = element.geometry().center();
+        const GlobalPosition& globalPos = fvElemGeom.subContVol[scvIdx].global;
         
         if (isInLens_(globalPos))
             return lensMaterialParams_;
diff --git a/test/implicit/2p/test_2p.cc b/test/implicit/2p/test_box2p.cc
similarity index 100%
rename from test/implicit/2p/test_2p.cc
rename to test/implicit/2p/test_box2p.cc
diff --git a/test/implicit/2p/test_2p.input b/test/implicit/2p/test_box2p.input
similarity index 100%
rename from test/implicit/2p/test_2p.input
rename to test/implicit/2p/test_box2p.input
-- 
GitLab