From b6dee7d55ddf417129a7d1fb1d8ff83e057a0b99 Mon Sep 17 00:00:00 2001
From: Alexander Kissinger <alexander.kissinger@iws.uni-stuttgart.de>
Date: Tue, 15 Oct 2013 07:37:23 +0000
Subject: [PATCH] - Included error message for co2 and co2ni tests if
 experimental grid   extensions are not used. They are necessary for the
 boundaryId() function - Updated the documentation in the .cc files - Added
 some comments for the above flags in optim.opts and debug.opts. - el2p:
 Removed the *.input file argument for make dist command in Makefile.am   for
 el2p, as this test does not have any input file. Reviewed by Christoph and
 Bernd.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11655 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 debug.opts                           |  5 ++++
 optim.opts                           |  4 +++
 test/geomechanics/el2p/Makefile.am   |  2 +-
 test/implicit/co2/test_boxco2.cc     | 43 +++++++++++++++-----------
 test/implicit/co2/test_ccco2.cc      | 42 +++++++++++++++-----------
 test/implicit/co2ni/test_boxco2ni.cc | 44 ++++++++++++++++-----------
 test/implicit/co2ni/test_ccco2ni.cc  | 45 +++++++++++++++++-----------
 7 files changed, 112 insertions(+), 73 deletions(-)

diff --git a/debug.opts b/debug.opts
index 1987557acf..428a496c69 100644
--- a/debug.opts
+++ b/debug.opts
@@ -26,3 +26,8 @@ CONFIGURE_FLAGS="\
   --disable-documentation \
   --disable-parallel \
   --disable-mpiruntest"
+
+# for CO2 and CO2ni tests
+# --enable-experimental-grid-extensions \
+# --with-alugrid=PATH_TO_ALUGrid \
+# need to be set in the configure flags
\ No newline at end of file
diff --git a/optim.opts b/optim.opts
index 2a2fc3e545..c66227bac2 100644
--- a/optim.opts
+++ b/optim.opts
@@ -32,3 +32,7 @@ CONFIGURE_FLAGS=" \
   --disable-parallel \
   --disable-mpiruntest"
 
+# for CO2 and CO2ni tests
+# --enable-experimental-grid-extensions \
+# --with-alugrid=PATH_TO_ALUGrid \
+# need to be set in the configure flags
\ No newline at end of file
diff --git a/test/geomechanics/el2p/Makefile.am b/test/geomechanics/el2p/Makefile.am
index dd111fdbbb..329f13ab40 100644
--- a/test/geomechanics/el2p/Makefile.am
+++ b/test/geomechanics/el2p/Makefile.am
@@ -1,7 +1,7 @@
 check_PROGRAMS = test_el2p
 
 noinst_HEADERS = *.hh
-EXTRA_DIST=*.input grids/*.dgf CMakeLists.txt
+EXTRA_DIST= grids/*.dgf CMakeLists.txt
 
 test_el2p_SOURCES = test_el2p.cc
 
diff --git a/test/implicit/co2/test_boxco2.cc b/test/implicit/co2/test_boxco2.cc
index 0ad19e1095..f28fd8dbdc 100644
--- a/test/implicit/co2/test_boxco2.cc
+++ b/test/implicit/co2/test_boxco2.cc
@@ -28,7 +28,9 @@
 
 /*!
  * \brief Provides an interface for customizing error messages associated with
- *        reading in parameters.
+ *        reading in parameters. This test only works if the flags for experimental
+ *        grid extensions and ALUGrid are set. See the commented part in optim.opts and
+ *        debug.opts for reference.
  *
  * \param progName  The name of the program, that was tried to be started.
  * \param errorMsg  The error message that was issued by the start function.
@@ -42,19 +44,20 @@ void usage(const char *progName, const std::string &errorMsg)
                     errorMessageOut += " [options]\n";
                     errorMessageOut += errorMsg;
                     errorMessageOut += "\n\nThe 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-gridFile                      The file name of the file containing the grid \n"
-                                        "\t                                   definition in DGF format\n"
-                                        "\t-FluidSystem.nTemperature      Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.nPressure         Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.pressureLow       Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.pressureHigh      High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureLow    Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureHigh   High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-SimulationControl.name        The name of the output files [-] \n"
-                                        "\t-InitialConditions.temperature Initial temperature in the reservoir [K] \n"
-                                        "\t-InitialConditions.depthBOR    Depth below ground surface [m] \n";
+                            "\t-TimeManager.DtInitial          The initial timestep size. [s] \n"
+                            "\t-TimeManager.TEnd               The end of the simulation. [s] \n"
+                            "\t-Grid.GridFile                  The file name of the file containing the grid \n"
+                            "\t                                definition in DGF format\n"
+                            "\t-FluidSystem.nTemperature       Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.nPressure          Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.pressureLow        Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.pressureHigh       High end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureLow     Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureHigh    High end for tabularization of fluid properties [Pa] \n"
+                            "\t-Problem.name                   The name of the output files [-] \n"
+                            "\t-Problem.depthBOR               Depth below ground surface [m] \n"
+                            "\t-Problem.injectionRate          Injection rate in kg/(s*m^2) or mole/(m^2*s) \n"
+                            "\t-LinearSolver.ResidualReduction [-] \n";
 
         std::cout << errorMessageOut
                   << "\n";
@@ -63,12 +66,16 @@ void usage(const char *progName, const std::string &errorMsg)
 
 int main(int argc, char** argv)
 {
-#if HAVE_ALUGRID
+#if !DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
+    std::cout << "Test skipped, it needs experimental grid extensions, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#elif !HAVE_ALUGRID
+    std::cout << "Test skipped, it needs ALUGrid, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#else
     typedef TTAG(HeterogeneousBoxProblem) ProblemTypeTag;
     return Dumux::start<ProblemTypeTag>(argc, argv, usage);
-#else
-    std::cout << "Test skipped, it needs ALUGrid." << std::endl;
-    return 77;
 #endif
 
+
 }
diff --git a/test/implicit/co2/test_ccco2.cc b/test/implicit/co2/test_ccco2.cc
index a247247852..60116fd4ab 100644
--- a/test/implicit/co2/test_ccco2.cc
+++ b/test/implicit/co2/test_ccco2.cc
@@ -28,7 +28,9 @@
 
 /*!
  * \brief Provides an interface for customizing error messages associated with
- *        reading in parameters.
+ *        reading in parameters. This test only works if the flags for experimental
+ *        grid extensions and ALUGrid are set. See the commented part in optim.opts and
+ *        debug.opts for reference.
  *
  * \param progName  The name of the program, that was tried to be started.
  * \param errorMsg  The error message that was issued by the start function.
@@ -42,19 +44,20 @@ void usage(const char *progName, const std::string &errorMsg)
                     errorMessageOut += " [options]\n";
                     errorMessageOut += errorMsg;
                     errorMessageOut += "\n\nThe 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-gridFile                      The file name of the file containing the grid \n"
-                                        "\t                                   definition in DGF format\n"
-                                        "\t-FluidSystem.nTemperature      Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.nPressure         Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.pressureLow       Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.pressureHigh      High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureLow    Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureHigh   High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-SimulationControl.name        The name of the output files [-] \n"
-                                        "\t-InitialConditions.temperature Initial temperature in the reservoir [K] \n"
-                                        "\t-InitialConditions.depthBOR    Depth below ground surface [m] \n";
+                            "\t-TimeManager.DtInitial          The initial timestep size. [s] \n"
+                            "\t-TimeManager.TEnd               The end of the simulation. [s] \n"
+                            "\t-Grid.GridFile                  The file name of the file containing the grid \n"
+                            "\t                                definition in DGF format\n"
+                            "\t-FluidSystem.nTemperature       Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.nPressure          Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.pressureLow        Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.pressureHigh       High end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureLow     Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureHigh    High end for tabularization of fluid properties [Pa] \n"
+                            "\t-Problem.name                   The name of the output files [-] \n"
+                            "\t-Problem.depthBOR               Depth below ground surface [m] \n"
+                            "\t-Problem.injectionRate          Injection rate in kg/(s*m^2) or mole/(m^2*s) \n"
+                            "\t-LinearSolver.ResidualReduction [-] \n";
 
         std::cout << errorMessageOut
                   << "\n";
@@ -63,12 +66,15 @@ void usage(const char *progName, const std::string &errorMsg)
 
 int main(int argc, char** argv)
 {
-#if HAVE_ALUGRID
+#if !DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
+    std::cout << "Test skipped, it needs experimental grid extensions, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#elif !HAVE_ALUGRID
+    std::cout << "Test skipped, it needs ALUGrid, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#else
     typedef TTAG(HeterogeneousCCProblem) ProblemTypeTag;
     return Dumux::start<ProblemTypeTag>(argc, argv, usage);
-#else
-    std::cout << "Test skipped, it needs ALUGrid." << std::endl;
-    return 77;
 #endif
 
 }
diff --git a/test/implicit/co2ni/test_boxco2ni.cc b/test/implicit/co2ni/test_boxco2ni.cc
index aaf6b98076..adb41ed93d 100644
--- a/test/implicit/co2ni/test_boxco2ni.cc
+++ b/test/implicit/co2ni/test_boxco2ni.cc
@@ -27,7 +27,9 @@
 
 /*!
  * \brief Provides an interface for customizing error messages associated with
- *        reading in parameters.
+ *        reading in parameters. This test only works if the flags for experimental
+ *        grid extensions and ALUGrid are set. See the commented part in optim.opts and
+ *        debug.opts for reference.
  *
  * \param progName  The name of the program, that was tried to be started.
  * \param errorMsg  The error message that was issued by the start function.
@@ -41,19 +43,22 @@ void usage(const char *progName, const std::string &errorMsg)
                     errorMessageOut += " [options]\n";
                     errorMessageOut += errorMsg;
                     errorMessageOut += "\n\nThe 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-gridFile                      The file name of the file containing the grid \n"
-                                        "\t                                   definition in DGF format\n"
-                                        "\t-FluidSystem.nTemperature      Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.nPressure         Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.pressureLow       Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.pressureHigh      High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureLow    Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureHigh   High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-SimulationControl.name        The name of the output files [-] \n"
-                                        "\t-InitialConditions.temperature Initial temperature in the reservoir [K] \n"
-                                        "\t-InitialConditions.depthBOR    Depth below ground surface [m] \n";
+                            "\t-TimeManager.DtInitial          The initial timestep size. [s] \n"
+                            "\t-TimeManager.TEnd               The end of the simulation. [s] \n"
+                            "\t-Grid.GridFile                  The file name of the file containing the grid \n"
+                            "\t                                definition in DGF format\n"
+                            "\t-FluidSystem.nTemperature       Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.nPressure          Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.pressureLow        Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.pressureHigh       High end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureLow     Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureHigh    High end for tabularization of fluid properties [Pa] \n"
+                            "\t-Problem.name                   The name of the output files [-] \n"
+                            "\t-Problem.depthBOR               Depth below ground surface [m] \n"
+                            "\t-Problem.injectionRate          Injection rate in kg/(s*m^2) or mole/(m^2*s) \n"
+                            "\t-Problem.injectionPressure      Injection pressure [Pa] \n"
+                            "\t-Problem.injectionTemperature   Injection temperature in [K] \n"
+                            "\t-LinearSolver.ResidualReduction [-] \n";
 
         std::cout << errorMessageOut
                   << "\n";
@@ -62,12 +67,15 @@ void usage(const char *progName, const std::string &errorMsg)
 
 int main(int argc, char** argv)
 {
-#if HAVE_ALUGRID
+#if !DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
+    std::cout << "Test skipped, it needs experimental grid extensions, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#elif !HAVE_ALUGRID
+    std::cout << "Test skipped, it needs ALUGrid, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#else
     typedef TTAG(HeterogeneousNIBoxProblem) ProblemTypeTag;
     return Dumux::start<ProblemTypeTag>(argc, argv, usage);
-#else
-    std::cout << "Test skipped, it needs ALUGrid." << std::endl;
-    return 77;
 #endif
 
 }
diff --git a/test/implicit/co2ni/test_ccco2ni.cc b/test/implicit/co2ni/test_ccco2ni.cc
index 439dabde50..854c52caa5 100644
--- a/test/implicit/co2ni/test_ccco2ni.cc
+++ b/test/implicit/co2ni/test_ccco2ni.cc
@@ -27,7 +27,9 @@
 
 /*!
  * \brief Provides an interface for customizing error messages associated with
- *        reading in parameters.
+ *        reading in parameters. This test only works if the flags for experimental
+ *        grid extensions and ALUGrid are set. See the commented part in optim.opts and
+ *        debug.opts for reference.
  *
  * \param progName  The name of the program, that was tried to be started.
  * \param errorMsg  The error message that was issued by the start function.
@@ -41,19 +43,22 @@ void usage(const char *progName, const std::string &errorMsg)
                     errorMessageOut += " [options]\n";
                     errorMessageOut += errorMsg;
                     errorMessageOut += "\n\nThe 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-gridFile                      The file name of the file containing the grid \n"
-                                        "\t                                   definition in DGF format\n"
-                                        "\t-FluidSystem.nTemperature      Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.nPressure         Number of tabularization entries [-] \n"
-                                        "\t-FluidSystem.pressureLow       Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.pressureHigh      High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureLow    Low end for tabularization of fluid properties [Pa] \n"
-                                        "\t-FluidSystem.temperatureHigh   High end for tabularization of fluid properties [Pa] \n"
-                                        "\t-SimulationControl.name        The name of the output files [-] \n"
-                                        "\t-InitialConditions.temperature Initial temperature in the reservoir [K] \n"
-                                        "\t-InitialConditions.depthBOR    Depth below ground surface [m] \n";
+                            "\t-TimeManager.DtInitial          The initial timestep size. [s] \n"
+                            "\t-TimeManager.TEnd               The end of the simulation. [s] \n"
+                            "\t-Grid.GridFile                  The file name of the file containing the grid \n"
+                            "\t                                definition in DGF format\n"
+                            "\t-FluidSystem.nTemperature       Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.nPressure          Number of tabularization entries [-] \n"
+                            "\t-FluidSystem.pressureLow        Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.pressureHigh       High end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureLow     Low end for tabularization of fluid properties [Pa] \n"
+                            "\t-FluidSystem.temperatureHigh    High end for tabularization of fluid properties [Pa] \n"
+                            "\t-Problem.name                   The name of the output files [-] \n"
+                            "\t-Problem.depthBOR               Depth below ground surface [m] \n"
+                            "\t-Problem.injectionRate          Injection rate in kg/(s*m^2) or mole/(m^2*s) \n"
+                            "\t-Problem.injectionPressure      Injection pressure [Pa] \n"
+                            "\t-Problem.injectionTemperature   Injection temperature in [K] \n"
+                            "\t-LinearSolver.ResidualReduction [-] \n";
 
         std::cout << errorMessageOut
                   << "\n";
@@ -62,12 +67,16 @@ void usage(const char *progName, const std::string &errorMsg)
 
 int main(int argc, char** argv)
 {
-#if HAVE_ALUGRID
+#if !DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
+    std::cout << "Test skipped, it needs experimental grid extensions, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#elif !HAVE_ALUGRID
+    std::cout << "Test skipped, it needs ALUGrid, see optim.opts or debug.opts." << std::endl;
+    return 77;
+#else
     typedef TTAG(HeterogeneousNICCProblem) ProblemTypeTag;
     return Dumux::start<ProblemTypeTag>(argc, argv, usage);
-#else
-    std::cout << "Test skipped, it needs ALUGrid." << std::endl;
-    return 77;
 #endif
 
+
 }
-- 
GitLab