From cc854d964f4d4f766d538fd0d9c5178ec4feff18 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Tue, 8 Jun 2021 13:30:39 +0000
Subject: [PATCH] Merge branch 'cleanup/unify-guards-for-uggrid' into 'master'

Resolve "Unify guards for uggrid"

Closes #1043

See merge request dumux-repositories/dumux!2676

(cherry picked from commit 56a0c6601452407dde7eab41a2ddaaf98df78278)

0e1233b4 [cleanup] Remove HAVE_UG, unify guards for ug grid
---
 dumux/common/gridcapabilities.hh                          | 8 ++++----
 dumux/io/grid/gmshgriddatahandle.hh                       | 6 +++---
 dumux/io/grid/griddata.hh                                 | 4 ++--
 dumux/io/grid/gridmanager_ug.hh                           | 6 +++---
 .../sequential/cellcentered/mpfa/properties.hh            | 4 ++--
 test/freeflow/shallowwater/poiseuilleflow/properties.hh   | 2 +-
 test/io/gridmanager/test_gridmanager_cake.cc              | 4 ++--
 .../embedded/1d3d/1p2c_richards2c/CMakeLists.txt          | 2 +-
 .../embedded/1d3d/1p2c_richards2c/properties.hh           | 2 +-
 .../1p/convergence/analyticsolution/properties.hh         | 2 +-
 test/porousmediumflow/1p/incompressible/properties.hh     | 2 +-
 .../1p/pointsources/timeindependent/properties.hh         | 2 +-
 test/porousmediumflow/1pnc/1p2c/isothermal/properties.hh  | 4 ++--
 .../1pnc/1p2c/nonisothermal/conduction/properties.hh      | 4 ++--
 .../1pnc/1p2c/nonisothermal/convection/properties.hh      | 4 ++--
 .../1pnc/1p2c/nonisothermal/transientbc/properties.hh     | 4 ++--
 test/porousmediumflow/1pnc/1p3c/properties.hh             | 4 ++--
 test/porousmediumflow/1pnc/nonequilibrium/properties.hh   | 2 +-
 test/porousmediumflow/2p/boxdfm/properties.hh             | 2 +-
 test/porousmediumflow/2p/cornerpoint/main.cc              | 6 +++---
 test/porousmediumflow/2p/nonisothermal/properties.hh      | 2 +-
 test/porousmediumflow/richards/lens/properties.hh         | 2 +-
 test/porousmediumflow/sequential/1p/test_diffusion3d.cc   | 4 ++--
 test/porousmediumflow/sequential/2p/test_mpfa2p.cc        | 2 +-
 test/porousmediumflow/sequential/2p/test_mpfa2pproblem.hh | 4 ++--
 .../sequential/2p2c/test_adaptive2p2c2d.cc                | 2 +-
 .../sequential/2p2c/test_adaptive2p2c2dproblem.hh         | 4 ++--
 .../sequential/2p2c/test_adaptive2p2c3d.cc                | 4 ++--
 .../sequential/2p2c/test_adaptive2p2c3dproblem.hh         | 4 ++--
 29 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/dumux/common/gridcapabilities.hh b/dumux/common/gridcapabilities.hh
index be3ba8c49c..1ed27e7dea 100644
--- a/dumux/common/gridcapabilities.hh
+++ b/dumux/common/gridcapabilities.hh
@@ -31,12 +31,12 @@
 // (https://gitlab.dune-project.org/core/dune-grid/issues/78),
 // it should be guarded by a DUNE_VERSION macro and removed later.
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 namespace Dune {
 template<int dim>
 class UGGrid;
 } // end namespace Dumux
-#endif // HAVE_UG
+#endif // HAVE_DUNE_UGGRID
 
 namespace Dumux::Temp::Capabilities {
 
@@ -46,13 +46,13 @@ struct canCommunicate
   static const bool v = false;
 };
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<int dim, int codim>
 struct canCommunicate<Dune::UGGrid<dim>, codim>
 {
   static const bool v = true;
 };
-#endif // HAVE_UG
+#endif // HAVE_DUNE_UGGRID
 
 } // namespace Dumux::Temp::Capabilities
 // end workaround
diff --git a/dumux/io/grid/gmshgriddatahandle.hh b/dumux/io/grid/gmshgriddatahandle.hh
index fcdf4cf899..b8af221b7c 100644
--- a/dumux/io/grid/gmshgriddatahandle.hh
+++ b/dumux/io/grid/gmshgriddatahandle.hh
@@ -34,7 +34,7 @@
 #include <dune/grid/common/datahandleif.hh>
 
 // UGGrid specific includes
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 
@@ -124,7 +124,7 @@ private:
     mutable std::map< typename IdSet::IdType, typename Data::value_type> data_;
 };
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 
 /*!
  * \ingroup InputOutput
@@ -202,7 +202,7 @@ private:
     mutable std::map< typename IdSet::IdType, typename Data::value_type> data_;
 };
 
-#endif // HAVE_UG
+#endif // HAVE_DUNE_UGGRID
 
 } // namespace Dumux
 
diff --git a/dumux/io/grid/griddata.hh b/dumux/io/grid/griddata.hh
index c36c776271..e871b29a8f 100644
--- a/dumux/io/grid/griddata.hh
+++ b/dumux/io/grid/griddata.hh
@@ -37,7 +37,7 @@
 #include <dumux/io/vtk/vtkreader.hh>
 
 // UGGrid specific includes
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 
@@ -50,7 +50,7 @@ namespace Detail {
 template<class Grid>
 struct isUG : public std::false_type {};
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<int dim>
 struct isUG<Dune::UGGrid<dim>> : public std::true_type {};
 #endif
diff --git a/dumux/io/grid/gridmanager_ug.hh b/dumux/io/grid/gridmanager_ug.hh
index a112d97c53..ab9b043c5b 100644
--- a/dumux/io/grid/gridmanager_ug.hh
+++ b/dumux/io/grid/gridmanager_ug.hh
@@ -24,7 +24,7 @@
 #ifndef DUMUX_IO_GRID_MANAGER_UG_HH
 #define DUMUX_IO_GRID_MANAGER_UG_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #include <dune/grid/io/file/dgfparser/dgfug.hh>
 #endif
@@ -35,7 +35,7 @@
 
 namespace Dumux {
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 
 /*!
  * \ingroup InputOutput
@@ -175,7 +175,7 @@ private:
     }
 };
 
-#endif // HAVE_UG
+#endif // HAVE_DUNE_UGGRID
 
 } // end namespace Dumux
 
diff --git a/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh b/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh
index 03f5bea27f..db50d17519 100644
--- a/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh
+++ b/dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh
@@ -34,7 +34,7 @@
 #if HAVE_DUNE_ALUGRID
 #include <dune/alugrid/grid.hh>
 #endif
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 
@@ -78,7 +78,7 @@ struct GridImp<Dune::ALUGrid<dim, dim, Dune::cube, Dune::nonconforming>, dim>
 };
 #endif
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<int dim>
 struct GridImp<Dune::UGGrid<dim>, dim>
 {
diff --git a/test/freeflow/shallowwater/poiseuilleflow/properties.hh b/test/freeflow/shallowwater/poiseuilleflow/properties.hh
index 3b919b83dd..0097bb0154 100644
--- a/test/freeflow/shallowwater/poiseuilleflow/properties.hh
+++ b/test/freeflow/shallowwater/poiseuilleflow/properties.hh
@@ -23,7 +23,7 @@
 #include <dumux/freeflow/shallowwater/model.hh>
 #include <dumux/discretization/cctpfa.hh>
 #include <dune/grid/yaspgrid.hh>
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 
diff --git a/test/io/gridmanager/test_gridmanager_cake.cc b/test/io/gridmanager/test_gridmanager_cake.cc
index afdd70bce1..729834e529 100644
--- a/test/io/gridmanager/test_gridmanager_cake.cc
+++ b/test/io/gridmanager/test_gridmanager_cake.cc
@@ -32,7 +32,7 @@
 #include <dumux/io/grid/gridmanager.hh>
 #include <dumux/io/grid/cakegridmanager.hh>
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 
@@ -45,7 +45,7 @@
 #endif
 
 // The grid type
-#if HAVE_UG && USEUG==1
+#if HAVE_DUNE_UGGRID && USEUG==1
 template<int dim>
 using Grid = Dune::UGGrid<dim>;
 #elif HAVE_DUNE_ALUGRID
diff --git a/test/multidomain/embedded/1d3d/1p2c_richards2c/CMakeLists.txt b/test/multidomain/embedded/1d3d/1p2c_richards2c/CMakeLists.txt
index 7e811c8799..237ec5e832 100644
--- a/test/multidomain/embedded/1d3d/1p2c_richards2c/CMakeLists.txt
+++ b/test/multidomain/embedded/1d3d/1p2c_richards2c/CMakeLists.txt
@@ -1,7 +1,7 @@
 dumux_add_test(NAME test_md_embedded_1d3d_1p2c_richards2c
               LABELS multidomain multidomain_embedded 1pnc richardsnc
               SOURCES main.cc
-              CMAKE_GUARD "( dune-foamgrid_FOUND AND HAVE_UG )"
+              CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-uggrid_FOUND )"
               TIMEOUT 1500
               COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
               CMD_ARGS  --script fuzzy
diff --git a/test/multidomain/embedded/1d3d/1p2c_richards2c/properties.hh b/test/multidomain/embedded/1d3d/1p2c_richards2c/properties.hh
index 0097559513..30736ee640 100644
--- a/test/multidomain/embedded/1d3d/1p2c_richards2c/properties.hh
+++ b/test/multidomain/embedded/1d3d/1p2c_richards2c/properties.hh
@@ -55,7 +55,7 @@ struct Soil { using InheritsFrom = std::tuple<RichardsNC, CCTpfaModel>; };
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::Soil> { using type = Dune::UGGrid<3>; };
 #else
diff --git a/test/porousmediumflow/1p/convergence/analyticsolution/properties.hh b/test/porousmediumflow/1p/convergence/analyticsolution/properties.hh
index 46048a9b9d..5db8dbaeb7 100644
--- a/test/porousmediumflow/1p/convergence/analyticsolution/properties.hh
+++ b/test/porousmediumflow/1p/convergence/analyticsolution/properties.hh
@@ -25,7 +25,7 @@
 #define DUMUX_CONVERGENCE_TEST_ONEP_PROPERTIES_HH
 
 #include <dune/grid/yaspgrid.hh>
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 
diff --git a/test/porousmediumflow/1p/incompressible/properties.hh b/test/porousmediumflow/1p/incompressible/properties.hh
index 7df2043848..b0d26c4f52 100644
--- a/test/porousmediumflow/1p/incompressible/properties.hh
+++ b/test/porousmediumflow/1p/incompressible/properties.hh
@@ -25,7 +25,7 @@
 #ifndef DUMUX_INCOMPRESSIBLE_ONEP_TEST_PROBLEM_PROPERTIES_HH
 #define DUMUX_INCOMPRESSIBLE_ONEP_TEST_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
diff --git a/test/porousmediumflow/1p/pointsources/timeindependent/properties.hh b/test/porousmediumflow/1p/pointsources/timeindependent/properties.hh
index efd3e803b7..5c83226a52 100644
--- a/test/porousmediumflow/1p/pointsources/timeindependent/properties.hh
+++ b/test/porousmediumflow/1p/pointsources/timeindependent/properties.hh
@@ -25,7 +25,7 @@
 #ifndef DUMUX_1P_SINGULARITY_PROBLEM_PROPERTIES_HH
 #define DUMUX_1P_SINGULARITY_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
diff --git a/test/porousmediumflow/1pnc/1p2c/isothermal/properties.hh b/test/porousmediumflow/1pnc/1p2c/isothermal/properties.hh
index 2fd26f1f43..b9c82ed595 100644
--- a/test/porousmediumflow/1pnc/1p2c/isothermal/properties.hh
+++ b/test/porousmediumflow/1pnc/1p2c/isothermal/properties.hh
@@ -26,7 +26,7 @@
 #ifndef DUMUX_1P2C_TEST_PROBLEM_PROPERTIES_HH
 #define DUMUX_1P2C_TEST_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -58,7 +58,7 @@ struct OnePTwoCTestCCMpfa { using InheritsFrom = std::tuple<OnePTwoCTest, CCMpfa
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::OnePTwoCTest> { using type = Dune::UGGrid<2>; };
 #else
diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/properties.hh b/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/properties.hh
index 44d2d9327d..637bb9e71c 100644
--- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/properties.hh
+++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/conduction/properties.hh
@@ -26,7 +26,7 @@
 #ifndef DUMUX_1P2CNI_CONDUCTION_TEST_PROBLEM_PROPERTIES_HH
 #define DUMUX_1P2CNI_CONDUCTION_TEST_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -54,7 +54,7 @@ struct OnePTwoCNIConductionBox { using InheritsFrom = std::tuple<OnePTwoCNICondu
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::OnePTwoCNIConduction> { using type = Dune::UGGrid<2>; };
 #else
diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/properties.hh b/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/properties.hh
index 39847e5108..d3dbae65b1 100644
--- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/properties.hh
+++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/convection/properties.hh
@@ -27,7 +27,7 @@
 #ifndef DUMUX_1P2CNI_CONVECTION_TEST_PROBLEM_PROPERTIES_HH
 #define DUMUX_1P2CNI_CONVECTION_TEST_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -58,7 +58,7 @@ struct OnePTwoCNIConvectionBox { using InheritsFrom = std::tuple<OnePTwoCNIConve
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::OnePTwoCNIConvection> { using type = Dune::UGGrid<2>; };
 #else
diff --git a/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/properties.hh b/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/properties.hh
index 6805c4ccec..4caa53d4b1 100644
--- a/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/properties.hh
+++ b/test/porousmediumflow/1pnc/1p2c/nonisothermal/transientbc/properties.hh
@@ -26,7 +26,7 @@
 #ifndef DUMUX_1P2CNI_TRANSIENT_BC_TEST_PROBLEM_PROPERTIES_HH
 #define DUMUX_1P2CNI_TRANSIENT_BC_TEST_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -54,7 +54,7 @@ struct OnePTwoCNITransientBCBox { using InheritsFrom = std::tuple<OnePTwoCNITran
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::OnePTwoCNITransientBC> { using type = Dune::UGGrid<2>; };
 #else
diff --git a/test/porousmediumflow/1pnc/1p3c/properties.hh b/test/porousmediumflow/1pnc/1p3c/properties.hh
index b35bcbf1bd..744314f60d 100644
--- a/test/porousmediumflow/1pnc/1p3c/properties.hh
+++ b/test/porousmediumflow/1pnc/1p3c/properties.hh
@@ -26,7 +26,7 @@
 #ifndef DUMUX_1P3C_TEST_PROBLEM_PROPERTIES_HH
 #define DUMUX_1P3C_TEST_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -56,7 +56,7 @@ struct MaxwellStefanOnePThreeCTestCCTpfa { using InheritsFrom = std::tuple<Maxwe
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::MaxwellStefanOnePThreeCTest> { using type = Dune::UGGrid<2>; };
 #else
diff --git a/test/porousmediumflow/1pnc/nonequilibrium/properties.hh b/test/porousmediumflow/1pnc/nonequilibrium/properties.hh
index f4844af927..bf1f1989d0 100644
--- a/test/porousmediumflow/1pnc/nonequilibrium/properties.hh
+++ b/test/porousmediumflow/1pnc/nonequilibrium/properties.hh
@@ -26,7 +26,7 @@
 #ifndef DUMUX_1P2CNI_CONDUCTION_TEST_PROBLEM_PROPERTIES_HH
 #define DUMUX_1P2CNI_CONDUCTION_TEST_PROBLEM_PROPERTIES_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
diff --git a/test/porousmediumflow/2p/boxdfm/properties.hh b/test/porousmediumflow/2p/boxdfm/properties.hh
index f5e4e093cc..5c3978aeab 100644
--- a/test/porousmediumflow/2p/boxdfm/properties.hh
+++ b/test/porousmediumflow/2p/boxdfm/properties.hh
@@ -27,7 +27,7 @@
 #if HAVE_DUNE_ALUGRID
 #include <dune/alugrid/grid.hh>
 #endif
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
diff --git a/test/porousmediumflow/2p/cornerpoint/main.cc b/test/porousmediumflow/2p/cornerpoint/main.cc
index e8eabba321..53f526a8b4 100644
--- a/test/porousmediumflow/2p/cornerpoint/main.cc
+++ b/test/porousmediumflow/2p/cornerpoint/main.cc
@@ -25,9 +25,9 @@
 // As of versions Opm 2018.04 and Dune 2.6, using opm-grid and dune-uggrid
 // together results in a compiler error. The following lines enforce that
 // dune-uggrid isn't considered.
-#if HAVE_UG
-#undef HAVE_UG
-#define HAVE_UG 0
+#if HAVE_DUNE_UGGRID
+#undef HAVE_DUNE_UGGRID
+#define HAVE_DUNE_UGGRID 0
 #endif
 
 #include <iostream>
diff --git a/test/porousmediumflow/2p/nonisothermal/properties.hh b/test/porousmediumflow/2p/nonisothermal/properties.hh
index f308f42870..caba88abbe 100644
--- a/test/porousmediumflow/2p/nonisothermal/properties.hh
+++ b/test/porousmediumflow/2p/nonisothermal/properties.hh
@@ -31,7 +31,7 @@
 #if HAVE_DUNE_ALUGRID
 #include <dune/alugrid/grid.hh>
 #endif
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
diff --git a/test/porousmediumflow/richards/lens/properties.hh b/test/porousmediumflow/richards/lens/properties.hh
index e5a75fb3e9..8966d7e863 100644
--- a/test/porousmediumflow/richards/lens/properties.hh
+++ b/test/porousmediumflow/richards/lens/properties.hh
@@ -30,7 +30,7 @@
 #if HAVE_DUNE_ALUGRID
 #include <dune/alugrid/grid.hh>
 #endif
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 
diff --git a/test/porousmediumflow/sequential/1p/test_diffusion3d.cc b/test/porousmediumflow/sequential/1p/test_diffusion3d.cc
index eda76e7779..6bea86af68 100644
--- a/test/porousmediumflow/sequential/1p/test_diffusion3d.cc
+++ b/test/porousmediumflow/sequential/1p/test_diffusion3d.cc
@@ -25,7 +25,7 @@
 #include <config.h>
 #include <iostream>
 
-#if HAVE_DUNE_ALUGRID || HAVE_UG
+#if HAVE_DUNE_ALUGRID || HAVE_DUNE_UGGRID
 
 #include <dune/common/exceptions.hh>
 #include <dune/common/parallel/mpihelper.hh>
@@ -252,4 +252,4 @@ int main()
     std::cerr << "You need to have dune-ALUGrid or UG installed to run this test\n";
     return 77;
 }
-#endif // HAVE_DUNE_ALUGRID || HAVE_UG
+#endif // HAVE_DUNE_ALUGRID || HAVE_DUNE_UGGRID
diff --git a/test/porousmediumflow/sequential/2p/test_mpfa2p.cc b/test/porousmediumflow/sequential/2p/test_mpfa2p.cc
index 8b79a207fe..1c05acb8e0 100644
--- a/test/porousmediumflow/sequential/2p/test_mpfa2p.cc
+++ b/test/porousmediumflow/sequential/2p/test_mpfa2p.cc
@@ -23,7 +23,7 @@
 
 #include <config.h>
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 
 #include <dumux/common/start.hh>
 #include <dumux/common/properties.hh>
diff --git a/test/porousmediumflow/sequential/2p/test_mpfa2pproblem.hh b/test/porousmediumflow/sequential/2p/test_mpfa2pproblem.hh
index 7f7598a1d9..d01f487fe6 100644
--- a/test/porousmediumflow/sequential/2p/test_mpfa2pproblem.hh
+++ b/test/porousmediumflow/sequential/2p/test_mpfa2pproblem.hh
@@ -24,7 +24,7 @@
 #ifndef DUMUX_TEST_MPFA2P_PROBLEM_HH
 #define DUMUX_TEST_MPFA2P_PROBLEM_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -75,7 +75,7 @@ struct MPFALAdaptiveTwoPTest { using InheritsFrom = std::tuple<MPFATwoPTest, IMP
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::MPFATwoPTest> { using type = Dune::UGGrid<2>; };
 #else
diff --git a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2d.cc b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2d.cc
index f3f59bf05d..0aa6f8e2c1 100644
--- a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2d.cc
+++ b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2d.cc
@@ -23,7 +23,7 @@
  */
 #include <config.h>
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 
 #include "test_adaptive2p2c2dproblem.hh"
 #include <dumux/common/start.hh>
diff --git a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2dproblem.hh b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2dproblem.hh
index 0e4d313494..35af6ce2e1 100644
--- a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2dproblem.hh
+++ b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c2dproblem.hh
@@ -24,7 +24,7 @@
 #ifndef DUMUX_TEST_ADAPTIVE2D_2P2C_PROBLEM_HH
 #define DUMUX_TEST_ADAPTIVE2D_2P2C_PROBLEM_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -57,7 +57,7 @@ struct Adaptive2p2c2d { using InheritsFrom = std::tuple<Test2P2CSpatialParams, S
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::Adaptive2p2c2d> { using type = Dune::UGGrid<2>; };
 #else
diff --git a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3d.cc b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3d.cc
index cad0125147..348fea2181 100644
--- a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3d.cc
+++ b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3d.cc
@@ -23,7 +23,7 @@
  */
 #include <config.h>
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 
 #include <dumux/common/properties.hh>
 #include "test_adaptive2p2c3dproblem.hh"
@@ -70,4 +70,4 @@ int main()
     std::cerr << "You need to have UGGrid to run this test\n";
     return 77;
 }
-#endif // HAVE_UG
+#endif // HAVE_DUNE_UGGRID
diff --git a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3dproblem.hh b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3dproblem.hh
index 2bc16993b1..ab73f620bd 100644
--- a/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3dproblem.hh
+++ b/test/porousmediumflow/sequential/2p2c/test_adaptive2p2c3dproblem.hh
@@ -24,7 +24,7 @@
 #ifndef DUMUX_TEST_ADAPTIVE3D_2P2C_PROBLEM_HH
 #define DUMUX_TEST_ADAPTIVE3D_2P2C_PROBLEM_HH
 
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 #include <dune/grid/uggrid.hh>
 #endif
 #include <dune/grid/yaspgrid.hh>
@@ -55,7 +55,7 @@ struct Adaptive2p2c3d { using InheritsFrom = std::tuple<Test2P2CSpatialParams, M
 } // end namespace TTag
 
 // Set the grid type
-#if HAVE_UG
+#if HAVE_DUNE_UGGRID
 template<class TypeTag>
 struct Grid<TypeTag, TTag::Adaptive2p2c3d> { using type = Dune::UGGrid<3>; };
 #else
-- 
GitLab