From 46cd470199a2cc3cd65beafff4adcf0b8ea7b8fa Mon Sep 17 00:00:00 2001
From: Markus Wolff <markus.wolff@twt-gmbh.de>
Date: Tue, 21 Aug 2012 10:12:54 +0000
Subject: [PATCH] moved decoupled 2padaptive test to test/decoupled/2p and
 removed test/decoupled/2padaptive folder, changed grid from UG to ALU

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8917 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 CMakeLists.txt                                |  6 ++---
 configure.ac                                  |  1 -
 test/decoupled/2p/CMakeLists.txt              |  3 +++
 test/decoupled/2p/Makefile.am                 |  4 +++-
 .../test_2padaptive-reference.vtu             |  0
 .../{2padaptive => 2p}/test_impesadaptive.cc  | 23 ++++++++++---------
 .../test_impesadaptive.input                  |  0
 .../test_impesadaptiveproblem.hh              |  9 ++------
 .../test_impesadaptivespatialparams.hh        |  0
 test/decoupled/2padaptive/CMakeLists.txt      | 21 -----------------
 test/decoupled/2padaptive/Makefile.am         |  8 -------
 .../decoupled/2padaptive/grids/refinegrid.dgf | 21 -----------------
 test/decoupled/CMakeLists.txt                 |  1 -
 test/decoupled/Makefile.am                    |  1 -
 14 files changed, 23 insertions(+), 75 deletions(-)
 rename test/decoupled/{2padaptive => 2p}/test_2padaptive-reference.vtu (100%)
 rename test/decoupled/{2padaptive => 2p}/test_impesadaptive.cc (95%)
 rename test/decoupled/{2padaptive => 2p}/test_impesadaptive.input (100%)
 rename test/decoupled/{2padaptive => 2p}/test_impesadaptiveproblem.hh (98%)
 rename test/decoupled/{2padaptive => 2p}/test_impesadaptivespatialparams.hh (100%)
 delete mode 100644 test/decoupled/2padaptive/CMakeLists.txt
 delete mode 100644 test/decoupled/2padaptive/Makefile.am
 delete mode 100644 test/decoupled/2padaptive/grids/refinegrid.dgf

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d1f43c6041..75a6f00600 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,8 +402,8 @@ file(COPY test/decoupled/2p/test_impes-reference.vtu DESTINATION references)
 file(COPY test/decoupled/2p/test_impes.input DESTINATION test/decoupled/2p)
 file(COPY test/decoupled/2p/test_mpfa2p-reference.vtu DESTINATION references)
 file(COPY test/decoupled/2p/test_mpfa2p.input DESTINATION test/decoupled/2p)
-file(COPY test/decoupled/2padaptive/test_2padaptive-reference.vtu DESTINATION references)
-file(COPY test/decoupled/2padaptive/test_impesadaptive.input DESTINATION test/decoupled/2padaptive)
+file(COPY test/decoupled/2p/test_2padaptive-reference.vtu DESTINATION references)
+file(COPY test/decoupled/2p/test_impesadaptive.input DESTINATION test/decoupled/2p)
 file(COPY test/decoupled/2p2c/test_dec2p2c-reference.vtu DESTINATION references)
 file(COPY test/decoupled/2p2c/test_dec2p2c.input DESTINATION test/decoupled/2p2c)
 file(COPY test/decoupled/2p2c/test_multiphysics2p2c-reference.vtu DESTINATION references)
@@ -454,7 +454,7 @@ add_test(test_dec1p            bin/runTest.sh references/test_1p-reference.vtu
 add_test(test_transport        bin/runTest.sh references/test_transport-reference.vtu        test_transport-00006.vtu        test/decoupled/2p/test_transport -Grid.File test/decoupled/2p/grids/test_transport.dgf)
 add_test(test_impes            bin/runTest.sh references/test_impes-reference.vtu            test_impes-00013.vtu            test/decoupled/2p/test_impes)
 add_test(test_mpfa2p           bin/runTest.sh references/test_mpfa2p-reference.vtu           test_mpfa2p-00007.vtu           test/decoupled/2p/test_mpfa2p)
-add_test(test_impesadaptive    bin/runTest.sh references/test_2padaptive-reference.vtu       test_2padaptive-00007.vtu       test/decoupled/2padaptive/test_impesadaptive)
+add_test(test_impesadaptive    bin/runTest.sh references/test_2padaptive-reference.vtu       test_2padaptive-00007.vtu       test/decoupled/2p/test_impesadaptive)
 add_test(test_dec2p2c          bin/runTest.sh references/test_dec2p2c-reference.vtu          test_dec2p2c-00021.vtu          test/decoupled/2p2c/test_dec2p2c)
 add_test(test_multiphysics2p2c bin/runTest.sh references/test_multiphysics2p2c-reference.vtu test_multiphysics2p2c-00021.vtu test/decoupled/2p2c/test_multiphysics2p2c)
 
diff --git a/configure.ac b/configure.ac
index b87b65a00c..605c962961 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,7 +91,6 @@ AC_CONFIG_FILES([dumux.pc
     test/decoupled/Makefile
     test/decoupled/1p/Makefile
     test/decoupled/2p/Makefile
-    test/decoupled/2padaptive/Makefile
     test/decoupled/2p2c/Makefile
     test/freeflow/Makefile
     test/freeflow/navierstokes/Makefile
diff --git a/test/decoupled/2p/CMakeLists.txt b/test/decoupled/2p/CMakeLists.txt
index 73869c1042..15a12d39b0 100644
--- a/test/decoupled/2p/CMakeLists.txt
+++ b/test/decoupled/2p/CMakeLists.txt
@@ -2,6 +2,9 @@
 ADD_EXECUTABLE("test_impes" test_impes.cc)
 target_link_libraries("test_impes" ${DumuxLinkLibraries})
 
+add_executable("test_impesadaptive" test_impesadaptive.cc)
+target_link_libraries("test_impesadaptive" ${DumuxLinkLibraries})
+
 add_executable("test_transport" test_transport.cc)
 target_link_libraries("test_transport" ${DumuxLinkLibraries})
 
diff --git a/test/decoupled/2p/Makefile.am b/test/decoupled/2p/Makefile.am
index a74e4c9961..b943457b8e 100644
--- a/test/decoupled/2p/Makefile.am
+++ b/test/decoupled/2p/Makefile.am
@@ -1,10 +1,12 @@
-check_PROGRAMS = test_impes test_transport test_mpfa2p
+check_PROGRAMS = test_impes test_impesadaptive test_transport test_mpfa2p
 
 noinst_HEADERS = *.hh
 EXTRA_DIST=*reference.vtu *.input grids/*.dgf CMakeLists.txt
 
 test_impes_SOURCES = test_impes.cc
 
+test_impesadaptive_SOURCES = test_impesadaptive.cc
+
 test_transport_SOURCES = test_transport.cc
 
 test_mpfa2p_SOURCES = test_mpfa2p.cc
diff --git a/test/decoupled/2padaptive/test_2padaptive-reference.vtu b/test/decoupled/2p/test_2padaptive-reference.vtu
similarity index 100%
rename from test/decoupled/2padaptive/test_2padaptive-reference.vtu
rename to test/decoupled/2p/test_2padaptive-reference.vtu
diff --git a/test/decoupled/2padaptive/test_impesadaptive.cc b/test/decoupled/2p/test_impesadaptive.cc
similarity index 95%
rename from test/decoupled/2padaptive/test_impesadaptive.cc
rename to test/decoupled/2p/test_impesadaptive.cc
index 21fb3856c9..d1d9954d90 100644
--- a/test/decoupled/2padaptive/test_impesadaptive.cc
+++ b/test/decoupled/2p/test_impesadaptive.cc
@@ -29,17 +29,7 @@
  */
 #include "config.h"
 
-#if !HAVE_UG
-#warning You need to have an UGGrid installed to run this test
-
-#include <iostream>
-
-int main()
-{
-    std::cerr << "You need to have an UGGrid installed to run this test\n";
-    return 1;
-}
-#else
+#if HAVE_ALUGRID
 
 #include "test_impesadaptiveproblem.hh"
 #include <dumux/common/start.hh>
@@ -71,4 +61,15 @@ int main(int argc, char** argv)
         typedef TTAG(TestIMPESAdaptiveProblem) ProblemTypeTag;
         return Dumux::start<ProblemTypeTag>(argc, argv, usage);
 }
+#else
+
+#warning You need to have ALUGrid installed to run this test
+
+#include <iostream>
+
+int main()
+{
+    std::cerr << "You need to have ALUGrid installed to run this test\n";
+    return 1;
+}
 #endif
diff --git a/test/decoupled/2padaptive/test_impesadaptive.input b/test/decoupled/2p/test_impesadaptive.input
similarity index 100%
rename from test/decoupled/2padaptive/test_impesadaptive.input
rename to test/decoupled/2p/test_impesadaptive.input
diff --git a/test/decoupled/2padaptive/test_impesadaptiveproblem.hh b/test/decoupled/2p/test_impesadaptiveproblem.hh
similarity index 98%
rename from test/decoupled/2padaptive/test_impesadaptiveproblem.hh
rename to test/decoupled/2p/test_impesadaptiveproblem.hh
index 9def620088..211f250973 100644
--- a/test/decoupled/2padaptive/test_impesadaptiveproblem.hh
+++ b/test/decoupled/2p/test_impesadaptiveproblem.hh
@@ -29,9 +29,7 @@
 #ifndef DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
 #define DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
 
-#if HAVE_UG
-#include <dune/grid/uggrid.hh>
-#endif
+#include <dune/grid/alugrid/2d/alugrid.hh>
 #include <dumux/common/cubegridcreator.hh>
 
 #include <dumux/material/fluidsystems/liquidphase.hh>
@@ -62,9 +60,7 @@ NEW_TYPE_TAG(TestIMPESAdaptiveProblem, INHERITS_FROM(FVPressureTwoPAdaptive, FVT
 // Set the grid type
 SET_PROP(TestIMPESAdaptiveProblem, Grid)
 {
-#if HAVE_UG
-    typedef Dune::UGGrid<2> type;
-#endif
+    typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> type;
 };
 
 // set the GridCreator property
@@ -159,7 +155,6 @@ public:
     TestIMPESAdaptiveProblem(TimeManager &timeManager, const GridView &gridView) :
             ParentType(timeManager, gridView), eps_(1e-6)
     {
-        GridCreator::grid().setClosureType(Grid::ClosureType::NONE);
         GridCreator::grid().globalRefine(GET_PARAM_FROM_GROUP(TypeTag, int, GridAdapt, MaxLevel));
         this->setGrid(GridCreator::grid());
 
diff --git a/test/decoupled/2padaptive/test_impesadaptivespatialparams.hh b/test/decoupled/2p/test_impesadaptivespatialparams.hh
similarity index 100%
rename from test/decoupled/2padaptive/test_impesadaptivespatialparams.hh
rename to test/decoupled/2p/test_impesadaptivespatialparams.hh
diff --git a/test/decoupled/2padaptive/CMakeLists.txt b/test/decoupled/2padaptive/CMakeLists.txt
deleted file mode 100644
index a06be66cd8..0000000000
--- a/test/decoupled/2padaptive/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# add build targets
-add_executable("test_impesadaptive" test_impesadaptive.cc)
-if(UG_FOUND)
-  set_target_properties("test_impesadaptive"
-    PROPERTIES
-    COMPILE_FLAGS ${UG_CPPFLAGS})
-  target_link_libraries("test_impesadaptive" ${DumuxLinkLibraries} ${UG_LIBS})
-endif(UG_FOUND)
-
-# add required libraries and includes to the build flags 
-link_directories(${DumuxLinkDirectories})
-include_directories(${DumuxIncludeDirectories})
-
-# make sure the grids are present in the build directory
-add_custom_command(TARGET "test_impesadaptive"
-                   POST_BUILD
-                   COMMAND ${CMAKE_COMMAND} -E
-                        copy_directory 
-                           "${CMAKE_CURRENT_SOURCE_DIR}/grids"
-                           "${CMAKE_CURRENT_BINARY_DIR}/grids")
-
diff --git a/test/decoupled/2padaptive/Makefile.am b/test/decoupled/2padaptive/Makefile.am
deleted file mode 100644
index 274a9e2ed6..0000000000
--- a/test/decoupled/2padaptive/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-check_PROGRAMS = test_impesadaptive
-
-noinst_HEADERS = *.hh
-EXTRA_DIST=*reference.vtu *.input grids/*.dgf CMakeLists.txt
-
-test_impesadaptive_SOURCES = test_impesadaptive.cc
-
-include $(top_srcdir)/am/global-rules
diff --git a/test/decoupled/2padaptive/grids/refinegrid.dgf b/test/decoupled/2padaptive/grids/refinegrid.dgf
deleted file mode 100644
index b0dfa7804b..0000000000
--- a/test/decoupled/2padaptive/grids/refinegrid.dgf
+++ /dev/null
@@ -1,21 +0,0 @@
-DGF
-Interval
-0 0   % first corner 
-300 10   % second corner
-30 1   % cells in x and y direction
-# 
-
-GridParameter
-% set overlap to 1
-overlap 1
-% set closure to none for UGGrid 
-closure none
-% generate copies in UGGrid
-copies no
-% set heap size for UGGrid
-heapsize 1000
-
-BOUNDARYDOMAIN
-default 1    % all boundaries have id 1
-#BOUNDARYDOMAIN
-# unitcube.dgf 
diff --git a/test/decoupled/CMakeLists.txt b/test/decoupled/CMakeLists.txt
index ef8fbcc3a9..9513118d26 100644
--- a/test/decoupled/CMakeLists.txt
+++ b/test/decoupled/CMakeLists.txt
@@ -1,4 +1,3 @@
 add_subdirectory("1p")
 add_subdirectory("2p")
 add_subdirectory("2p2c")
-add_subdirectory("2padaptive")
diff --git a/test/decoupled/Makefile.am b/test/decoupled/Makefile.am
index 8ac24c502d..5a433e2dd0 100644
--- a/test/decoupled/Makefile.am
+++ b/test/decoupled/Makefile.am
@@ -1,6 +1,5 @@
 SUBDIRS = 1p \
 	  2p \
-	  2padaptive \
 	  2p2c
 
 EXTRA_DIST = CMakeLists.txt
-- 
GitLab