From 0d7749c5ba0d3514f2f3d1441e0d1e243dcba873 Mon Sep 17 00:00:00 2001 From: Sina Ackermann <sina.ackermann@iws.uni-stuttgart.de> Date: Fri, 21 Dec 2018 11:22:09 +0100 Subject: [PATCH] [exercise-fluidsystem] Use only yaspgrid --- exercises/exercise-fluidsystem/2p2cproblem.hh | 11 ---------- exercises/exercise-fluidsystem/2pproblem.hh | 19 +----------------- .../exercise-fluidsystem/2p2cproblem.hh | 12 ----------- .../exercise-fluidsystem/2pproblem.hh | 20 +------------------ 4 files changed, 2 insertions(+), 60 deletions(-) diff --git a/exercises/exercise-fluidsystem/2p2cproblem.hh b/exercises/exercise-fluidsystem/2p2cproblem.hh index d6f89ad9..1d86aada 100644 --- a/exercises/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/exercise-fluidsystem/2p2cproblem.hh @@ -60,16 +60,8 @@ SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoC, SpatialParams, GetPropType<TypeTag, Properties::Scalar>>); // Set grid and the grid creator to be used -#if HAVE_DUNE_ALUGRID -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; }; -#elif HAVE_UG -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::UGGrid<2>; }; -#else template<class TypeTag> struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // The fluid system property template<class TypeTag> @@ -115,9 +107,6 @@ public: : ParentType(fvGridGeometry) , eps_(3e-6) { -#if !(HAVE_DUNE_ALUGRID || HAVE_UG) - std::cout << "If you want to use simplices instead of cubes, install and use dune-ALUGrid or UGGrid." << std::endl; -#endif // !(HAVE_DUNE_ALUGRID || HAVE_UG) // initialize the fluid system FluidSystem::init(); diff --git a/exercises/exercise-fluidsystem/2pproblem.hh b/exercises/exercise-fluidsystem/2pproblem.hh index 2f945fab..34a0bb56 100644 --- a/exercises/exercise-fluidsystem/2pproblem.hh +++ b/exercises/exercise-fluidsystem/2pproblem.hh @@ -30,14 +30,8 @@ // The box discretization #include <dumux/discretization/box.hh> -// The grid managers -#if HAVE_DUNE_ALUGRID -#include <dune/alugrid/grid.hh> -#elif HAVE_UG -#include <dune/grid/uggrid.hh> -#else +// The grid manager #include <dune/grid/yaspgrid.hh> -#endif // The porous media base problem #include <dumux/porousmediumflow/problem.hh> @@ -83,16 +77,8 @@ SET_TYPE_PROP(ExerciseFluidsystemTwoP, SpatialParams, GetPropType<TypeTag, Properties::Scalar>>); // Set grid to be used -#if HAVE_DUNE_ALUGRID -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; }; -#elif HAVE_UG -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::UGGrid<2>; }; -#else template<class TypeTag> struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // we use the immiscible fluid system here template<class TypeTag> @@ -154,9 +140,6 @@ public: : ParentType(fvGridGeometry) , eps_(3e-6) { -#if !(HAVE_DUNE_ALUGRID || HAVE_UG) - std::cout << "If you want to use simplices instead of cubes, install and use dune-ALUGrid or UGGrid." << std::endl; -#endif // !(HAVE_DUNE_ALUGRID || HAVE_UG) // initialize the tables for the water properties Components::TabulatedComponent<Components::H2O<Scalar>>::init(/*tempMin=*/273.15, diff --git a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh index c53e9e53..08f431c3 100644 --- a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh @@ -60,16 +60,8 @@ SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoC, SpatialParams, GetPropType<TypeTag, Properties::Scalar>>); // Set grid and the grid creator to be used -#if HAVE_DUNE_ALUGRID -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; }; -#elif HAVE_UG -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::UGGrid<2>; }; -#else template<class TypeTag> struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoPTwoC> { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // The fluid system property template<class TypeTag> @@ -115,10 +107,6 @@ public: : ParentType(fvGridGeometry) , eps_(3e-6) { -#if !(HAVE_DUNE_ALUGRID || HAVE_UG) - std::cout << "If you want to use simplices instead of cubes, install and use dune-ALUGrid or UGGrid." << std::endl; -#endif // !(HAVE_DUNE_ALUGRID || HAVE_UG) - // initialize the fluid system FluidSystem::init(); diff --git a/exercises/solution/exercise-fluidsystem/2pproblem.hh b/exercises/solution/exercise-fluidsystem/2pproblem.hh index b30010a2..0fa45a4a 100644 --- a/exercises/solution/exercise-fluidsystem/2pproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2pproblem.hh @@ -30,14 +30,8 @@ // The box discretization #include <dumux/discretization/box.hh> -// The grid managers -#if HAVE_DUNE_ALUGRID -#include <dune/alugrid/grid.hh> -#elif HAVE_UG -#include <dune/grid/uggrid.hh> -#else +// The grid manager #include <dune/grid/yaspgrid.hh> -#endif // The porous media base problem #include <dumux/porousmediumflow/problem.hh> @@ -83,16 +77,8 @@ SET_TYPE_PROP(ExerciseFluidsystemTwoP, SpatialParams, GetPropType<TypeTag, Properties::Scalar>>); // Set grid to be used -#if HAVE_DUNE_ALUGRID -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::ALUGrid</*dim=*/2, 2, Dune::cube, Dune::nonconforming>; }; -#elif HAVE_UG -template<class TypeTag> -struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::UGGrid<2>; }; -#else template<class TypeTag> struct Grid<TypeTag, TTag::ExerciseFluidsystemTwoP> { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // we use the immiscible fluid system here template<class TypeTag> @@ -154,10 +140,6 @@ public: : ParentType(fvGridGeometry) , eps_(3e-6) { -#if !(HAVE_DUNE_ALUGRID || HAVE_UG) - std::cout << "If you want to use simplices instead of cubes, install and use dune-ALUGrid or UGGrid." << std::endl; -#endif // !(HAVE_DUNE_ALUGRID || HAVE_UG) - // initialize the tables for the water properties std::cout << "Initializing the tables for the water properties" << std::endl; Components::TabulatedComponent<Components::H2O<Scalar>>::init(/*tempMin=*/273.15, -- GitLab