From 9d81160247e9c6fd5b0662cba5d00ab722f1acd1 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Wed, 4 Nov 2015 11:54:08 +0100
Subject: [PATCH] [test][generalproblem] Use vector for lens

---
 .../generalproblem/generallensspatialparams.hh       | 12 ++++++------
 .../generalproblem/test_generalproblem2p.input       |  6 ++----
 .../test_generalproblem2p_reference.input            |  6 ++----
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/test/common/generalproblem/generallensspatialparams.hh b/test/common/generalproblem/generallensspatialparams.hh
index 06adf1a765..0c4a60970d 100644
--- a/test/common/generalproblem/generallensspatialparams.hh
+++ b/test/common/generalproblem/generallensspatialparams.hh
@@ -91,10 +91,8 @@ public:
     GeneralLensSpatialParams(const GridView& gridView)
         : ParentType(gridView), eps_(3e-6)
     {
-        lensLowerLeft_[0]   = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftX);
-        lensLowerLeft_[1]   = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftY);
-        lensUpperRight_[0]  = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightX);
-        lensUpperRight_[1]  = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightY);
+        lensLowerLeft_   = GET_RUNTIME_PARAM(TypeTag, GlobalPosition, SpatialParams.LensLowerLeft);
+        lensUpperRight_  = GET_RUNTIME_PARAM(TypeTag, GlobalPosition, SpatialParams.LensUpperRight);
 
         // residual saturations
         lensMaterialParams_.setSwr(0.18);
@@ -109,10 +107,12 @@ public:
         outerMaterialParams_.setVgAlpha(0.0037);
         outerMaterialParams_.setVgn(4.7);
 
+        // initialize with zero
+        lensK_ = 0.0; outerK_ = 0.0;
         for (int i=0; i < dim; i++)
         {
-        lensK_[i][i] = 9.05e-12;
-        outerK_[i][i] = 4.6e-10;
+            lensK_[i][i] = 9.05e-12;
+            outerK_[i][i] = 4.6e-10;
         }
     }
 
diff --git a/test/common/generalproblem/test_generalproblem2p.input b/test/common/generalproblem/test_generalproblem2p.input
index f7606c8b66..72ddf0abd9 100644
--- a/test/common/generalproblem/test_generalproblem2p.input
+++ b/test/common/generalproblem/test_generalproblem2p.input
@@ -7,10 +7,8 @@ UpperRight = 6 4 # upper right corner coordinates [m]
 Cells = 48 32    # number of cells in (x, y)-direction [-]
 
 [SpatialParams]
-LensLowerLeftX = 1.0 # [m] x-coordinate of the lower left lens corner
-LensLowerLeftY = 2.0 # [m] y-coordinate of the lower left lens corner
-LensUpperRightX = 4.0 # [m] x-coordinate of the upper right lens corner
-LensUpperRightY = 3.0 # [m] y-coordinate of the upper right lens corner
+LensLowerLeft = 1.0 2.0  # coordinates of the lower left lens corner [m]
+LensUpperRight = 4.0 3.0 # coordinates of the upper right lens corner [m]
 
 [Vtk]
 OutputLevel = 1
diff --git a/test/common/generalproblem/test_generalproblem2p_reference.input b/test/common/generalproblem/test_generalproblem2p_reference.input
index 2a70f32c81..28b4611882 100644
--- a/test/common/generalproblem/test_generalproblem2p_reference.input
+++ b/test/common/generalproblem/test_generalproblem2p_reference.input
@@ -7,10 +7,8 @@ UpperRight = 6 4 # upper right corner coordinates [m]
 Cells = 48 32    # number of cells in (x, y)-direction [-]
 
 [SpatialParams]
-LensLowerLeftX = 1.0 # [m] x-coordinate of the lower left lens corner
-LensLowerLeftY = 2.0 # [m] y-coordinate of the lower left lens corner
-LensUpperRightX = 4.0 # [m] x-coordinate of the upper right lens corner
-LensUpperRightY = 3.0 # [m] y-coordinate of the upper right lens corner
+LensLowerLeft = 1.0 2.0  # coordinates of the lower left lens corner [m]
+LensUpperRight = 4.0 3.0 # coordinates of the upper right lens corner [m]
 
 [Vtk]
 OutputLevel = 1
-- 
GitLab