From 31658f4a6e7a2a4aaebcdaa729a7854326b2dbfc Mon Sep 17 00:00:00 2001
From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de>
Date: Thu, 22 Sep 2016 14:33:08 +0200
Subject: [PATCH] [2p][test] Clean-up implicit tests

* Get rid of lowerLeftX, etc
---
 test/porousmediumflow/2p/implicit/lensspatialparams.hh    | 8 ++++----
 .../implicit/pointsources/test_ccadaptive2ppointsource.cc | 6 ++----
 .../pointsources/test_ccadaptive2ppointsource.input       | 6 ++----
 test/porousmediumflow/2p/implicit/test_box2p.cc           | 6 ++----
 test/porousmediumflow/2p/implicit/test_box2p.input        | 6 ++----
 test/porousmediumflow/2p/implicit/test_box2pni.cc         | 6 ++----
 test/porousmediumflow/2p/implicit/test_boxadaptive2p.cc   | 6 ++----
 .../porousmediumflow/2p/implicit/test_boxadaptive2p.input | 6 ++----
 test/porousmediumflow/2p/implicit/test_cc2p.cc            | 6 ++----
 test/porousmediumflow/2p/implicit/test_cc2p.input         | 6 ++----
 test/porousmediumflow/2p/implicit/test_cc2pni.cc          | 6 ++----
 test/porousmediumflow/2p/implicit/test_ccadaptive2p.cc    | 6 ++----
 test/porousmediumflow/2p/implicit/test_ccadaptive2p.input | 6 ++----
 .../2p/implicit/test_generalizeddirichlet.cc              | 4 ++--
 14 files changed, 30 insertions(+), 54 deletions(-)

diff --git a/test/porousmediumflow/2p/implicit/lensspatialparams.hh b/test/porousmediumflow/2p/implicit/lensspatialparams.hh
index 4a622dbfd6..7ae91b7828 100644
--- a/test/porousmediumflow/2p/implicit/lensspatialparams.hh
+++ b/test/porousmediumflow/2p/implicit/lensspatialparams.hh
@@ -98,10 +98,10 @@ public:
     LensSpatialParams(const GridView& gridView)
     : ParentType(gridView)
     {
-            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_[0]   = GET_RUNTIME_PARAM(TypeTag, GlobalPosition, SpatialParams.LensLowerLeft)[0];
+            lensLowerLeft_[1]   = GET_RUNTIME_PARAM(TypeTag, GlobalPosition, SpatialParams.LensLowerLeft)[1];
+            lensUpperRight_[0]  = GET_RUNTIME_PARAM(TypeTag, GlobalPosition, SpatialParams.LensUpperRight)[0];
+            lensUpperRight_[1]  = GET_RUNTIME_PARAM(TypeTag, GlobalPosition, SpatialParams.LensUpperRight)[1];
 
         // residual saturations
         lensMaterialParams_.setSwr(0.18);
diff --git a/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.cc b/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.cc
index a39ae64aa6..36c0cd2c97 100644
--- a/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.cc
+++ b/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.cc
@@ -47,10 +47,8 @@ void usage(const char *progName, const std::string &errorMsg)
                            "\t-TimeManager.DtInitial         Initial timestep size [s] \n"
                            "\t-Grid.File                     Name of the file containing the grid \n"
                            "\t                               definition in DGF format\n"
-                           "\t-SpatialParams.LensLowerLeftX  x-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensLowerLeftY  y-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n"
+                           "\t-SpatialParams.LensLowerLeft   coordinates of the lower left corner of the lens [m] \n"
+                           "\t-SpatialParams.LensUpperRight  coordinates of the upper right corner of the lens [m] \n"
                            "\t-Problem.Name                  String for naming of the output files \n"
                            "\n";
 
diff --git a/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.input b/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.input
index ff4b68feb6..1047a2871e 100644
--- a/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.input
+++ b/test/porousmediumflow/2p/implicit/pointsources/test_ccadaptive2ppointsource.input
@@ -8,10 +8,8 @@ UpperRight = 6 4
 Cells = 48 32
 
 [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 # [m] coordinates of the lower left lens corner
+LensUpperRight = 4.0 3.0 # [m] coordinate of the upper right lens corner
 
 [Problem]
 Name = lensccadaptive # name passed to the output routines
diff --git a/test/porousmediumflow/2p/implicit/test_box2p.cc b/test/porousmediumflow/2p/implicit/test_box2p.cc
index bad72c81d5..2d6beebc94 100644
--- a/test/porousmediumflow/2p/implicit/test_box2p.cc
+++ b/test/porousmediumflow/2p/implicit/test_box2p.cc
@@ -45,10 +45,8 @@ void usage(const char *progName, const std::string &errorMsg)
                            "\t-TimeManager.DtInitial         Initial timestep size [s] \n"
                            "\t-Grid.File                     Name of the file containing the grid \n"
                            "\t                               definition in DGF format\n"
-                           "\t-SpatialParams.LensLowerLeftX  x-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensLowerLeftY  y-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n"
+                           "\t-SpatialParams.LensLowerLeft   coordinates of the lower left corner of the lens [m] \n"
+                           "\t-SpatialParams.LensUpperRight  coordinates of the upper right corner of the lens [m] \n"
                            "\t-Problem.Name                  String for naming of the output files \n"
                            "\n";
 
diff --git a/test/porousmediumflow/2p/implicit/test_box2p.input b/test/porousmediumflow/2p/implicit/test_box2p.input
index fce9353e9e..95d7809362 100644
--- a/test/porousmediumflow/2p/implicit/test_box2p.input
+++ b/test/porousmediumflow/2p/implicit/test_box2p.input
@@ -8,10 +8,8 @@ UpperRight = 6 4
 Cells = 48 32
 
 [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 # [m] coordinates of the lower left lens corner
+LensUpperRight = 4.0 3.0 # [m] coordinates of the upper right lens corner
 
 [Problem]
 Name = lensbox # name passed to the output routines
diff --git a/test/porousmediumflow/2p/implicit/test_box2pni.cc b/test/porousmediumflow/2p/implicit/test_box2pni.cc
index a297ab3394..563babe94a 100644
--- a/test/porousmediumflow/2p/implicit/test_box2pni.cc
+++ b/test/porousmediumflow/2p/implicit/test_box2pni.cc
@@ -44,10 +44,8 @@ void usage(const char *progName, const std::string &errorMsg)
                     errorMessageOut += "\n\nThe list of mandatory options for this program is:\n"
                                         "\t-TimeManager.TEnd      End of the simulation [s] \n"
                                         "\t-TimeManager.DtInitial Initial timestep size [s] \n"
-                                        "\t-Grid.NumberOfCellsX   Resolution in x-direction [-]\n"
-                                        "\t-Grid.NumberOfCellsY   Resolution in y-direction [-]\n"
-                                        "\t-Grid.UpperRightX      Length of the domain [m]\n"
-                                        "\t-Grid.UpperRightY      Height of the domain [m]\n";
+                                        "\t-Grid.Cells            Number of cells in respective coordinate directions\n"
+                                        "\t-Grid.UpperRight       Upper right corner coordinates\n";
 
         std::cout << errorMessageOut
                   << "\n";
diff --git a/test/porousmediumflow/2p/implicit/test_boxadaptive2p.cc b/test/porousmediumflow/2p/implicit/test_boxadaptive2p.cc
index 50163e9002..d313a67d4e 100644
--- a/test/porousmediumflow/2p/implicit/test_boxadaptive2p.cc
+++ b/test/porousmediumflow/2p/implicit/test_boxadaptive2p.cc
@@ -45,10 +45,8 @@ void usage(const char *progName, const std::string &errorMsg)
                            "\t-TimeManager.DtInitial         Initial timestep size [s] \n"
                            "\t-Grid.File                     Name of the file containing the grid \n"
                            "\t                               definition in DGF format\n"
-                           "\t-SpatialParams.LensLowerLeftX  x-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensLowerLeftY  y-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n"
+                           "\t-SpatialParams.LensLowerLeft   coordinates of the lower left corner of the lens [m] \n"
+                           "\t-SpatialParams.LensUpperRight  coordinates of the upper right corner of the lens [m] \n"
                            "\t-Problem.Name                  String for naming of the output files \n"
                            "\n";
 
diff --git a/test/porousmediumflow/2p/implicit/test_boxadaptive2p.input b/test/porousmediumflow/2p/implicit/test_boxadaptive2p.input
index 0641558f9f..551578754f 100644
--- a/test/porousmediumflow/2p/implicit/test_boxadaptive2p.input
+++ b/test/porousmediumflow/2p/implicit/test_boxadaptive2p.input
@@ -8,10 +8,8 @@ UpperRight = 6 4
 Cells = 48 32
 
 [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 # [m] coordinates of the lower left lens corner
+LensUpperRight = 4.0 3.0 # [m] coordinates of the upper right lens corner
 
 [Problem]
 Name = lensboxadaptive # name passed to the output routines
diff --git a/test/porousmediumflow/2p/implicit/test_cc2p.cc b/test/porousmediumflow/2p/implicit/test_cc2p.cc
index cb0edbc2c6..2cb7906ea8 100644
--- a/test/porousmediumflow/2p/implicit/test_cc2p.cc
+++ b/test/porousmediumflow/2p/implicit/test_cc2p.cc
@@ -45,10 +45,8 @@ void usage(const char *progName, const std::string &errorMsg)
                            "\t-TimeManager.DtInitial         Initial timestep size [s] \n"
                            "\t-Grid.File                     Name of the file containing the grid \n"
                            "\t                               definition in DGF format\n"
-                           "\t-SpatialParams.LensLowerLeftX  x-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensLowerLeftY  y-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n"
+                           "\t-SpatialParams.LensLowerLeft   coordinates of the lower left corner of the lens [m] \n"
+                           "\t-SpatialParams.LensUpperRight  coordinates of the upper right corner of the lens [m] \n"
                            "\t-Problem.Name                  String for naming of the output files \n"
                            "\n";
 
diff --git a/test/porousmediumflow/2p/implicit/test_cc2p.input b/test/porousmediumflow/2p/implicit/test_cc2p.input
index e2162947fd..d6385b07db 100644
--- a/test/porousmediumflow/2p/implicit/test_cc2p.input
+++ b/test/porousmediumflow/2p/implicit/test_cc2p.input
@@ -8,10 +8,8 @@ UpperRight = 6 4
 Cells = 48 32
 
 [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 # [m] coordinates of the lower left lens corner
+LensUpperRight = 4.0 3.0 # [m] coordinates of the upper right lens corner
 
 [Problem]
 Name = lenscc # name passed to the output routines
diff --git a/test/porousmediumflow/2p/implicit/test_cc2pni.cc b/test/porousmediumflow/2p/implicit/test_cc2pni.cc
index bcc717c5f2..19f5d3ac3c 100644
--- a/test/porousmediumflow/2p/implicit/test_cc2pni.cc
+++ b/test/porousmediumflow/2p/implicit/test_cc2pni.cc
@@ -44,10 +44,8 @@ void usage(const char *progName, const std::string &errorMsg)
                     errorMessageOut += "\n\nThe list of mandatory options for this program is:\n"
                                         "\t-TimeManager.TEnd      End of the simulation [s] \n"
                                         "\t-TimeManager.DtInitial Initial timestep size [s] \n"
-                                        "\t-Grid.NumberOfCellsX   Resolution in x-direction [-]\n"
-                                        "\t-Grid.NumberOfCellsY   Resolution in y-direction [-]\n"
-                                        "\t-Grid.UpperRightX      Length of the domain [m]\n"
-                                        "\t-Grid.UpperRightY      Height of the domain [m]\n";
+                                        "\t-Grid.Cells            Number of cells in respective coordinate directions\n"
+                                        "\t-Grid.UpperRight       Upper right corner coordinates\n";
 
         std::cout << errorMessageOut
                   << "\n";
diff --git a/test/porousmediumflow/2p/implicit/test_ccadaptive2p.cc b/test/porousmediumflow/2p/implicit/test_ccadaptive2p.cc
index 8a32284558..0691204712 100644
--- a/test/porousmediumflow/2p/implicit/test_ccadaptive2p.cc
+++ b/test/porousmediumflow/2p/implicit/test_ccadaptive2p.cc
@@ -45,10 +45,8 @@ void usage(const char *progName, const std::string &errorMsg)
                            "\t-TimeManager.DtInitial         Initial timestep size [s] \n"
                            "\t-Grid.File                     Name of the file containing the grid \n"
                            "\t                               definition in DGF format\n"
-                           "\t-SpatialParams.LensLowerLeftX  x-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensLowerLeftY  y-coordinate of the lower left corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n"
-                           "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n"
+                           "\t-SpatialParams.LensLowerLeft   coordinates of the lower left corner of the lens [m] \n"
+                           "\t-SpatialParams.LensUpperRight  coordinates of the upper right corner of the lens [m] \n"
                            "\t-Problem.Name                  String for naming of the output files \n"
                            "\n";
 
diff --git a/test/porousmediumflow/2p/implicit/test_ccadaptive2p.input b/test/porousmediumflow/2p/implicit/test_ccadaptive2p.input
index 4af2290739..4a3dff50e7 100644
--- a/test/porousmediumflow/2p/implicit/test_ccadaptive2p.input
+++ b/test/porousmediumflow/2p/implicit/test_ccadaptive2p.input
@@ -6,10 +6,8 @@ TEnd = 3000 # [s]
 File = ./grids/rectangle-domain.msh
 
 [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 # [m] coordinates of the lower left lens corner
+LensUpperRight = 4.0 3.0 # [m] coordinates of the upper right lens corner
 
 [Problem]
 Name = lensccadaptive # name passed to the output routines
diff --git a/test/porousmediumflow/2p/implicit/test_generalizeddirichlet.cc b/test/porousmediumflow/2p/implicit/test_generalizeddirichlet.cc
index e493b3cfbf..0a822952bd 100644
--- a/test/porousmediumflow/2p/implicit/test_generalizeddirichlet.cc
+++ b/test/porousmediumflow/2p/implicit/test_generalizeddirichlet.cc
@@ -31,8 +31,8 @@ void usage(const char *progName, const std::string &errorMsg)
         << "The list of mandatory arguments for this program is:\n"
         << "\t-TEnd                The end of the simulation [s]\n"
         << "\t-DtInitial           The initial timestep size [s]\n"
-        << "\t-Grid.UpperRightX    The coordinate of the right corner [m]\n"
-        << "\t-Grid.NumberOfCellsX The grid's resolution\n"
+        << "\t-Grid.UpperRight     Upper right corner coordinates\n"
+        << "\t-Grid.Cells          Number of cells in respective coordinate directions\n"
         << "\n";
 }
 
-- 
GitLab