From 0d7749c5ba0d3514f2f3d1441e0d1e243dcba873 Mon Sep 17 00:00:00 2001 From: Sina Ackermann Date: Fri, 21 Dec 2018 11:22:09 +0100 Subject: [PATCH 1/3] [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 d6f89ad..1d86aad 100644 --- a/exercises/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/exercise-fluidsystem/2p2cproblem.hh @@ -60,16 +60,8 @@ SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoC, SpatialParams, GetPropType>); // Set grid and the grid creator to be used -#if HAVE_DUNE_ALUGRID -template -struct Grid { using type = Dune::ALUGrid; }; -#elif HAVE_UG -template -struct Grid { using type = Dune::UGGrid<2>; }; -#else template struct Grid { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // The fluid system property template @@ -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 2f945fa..34a0bb5 100644 --- a/exercises/exercise-fluidsystem/2pproblem.hh +++ b/exercises/exercise-fluidsystem/2pproblem.hh @@ -30,14 +30,8 @@ // The box discretization #include -// The grid managers -#if HAVE_DUNE_ALUGRID -#include -#elif HAVE_UG -#include -#else +// The grid manager #include -#endif // The porous media base problem #include @@ -83,16 +77,8 @@ SET_TYPE_PROP(ExerciseFluidsystemTwoP, SpatialParams, GetPropType>); // Set grid to be used -#if HAVE_DUNE_ALUGRID -template -struct Grid { using type = Dune::ALUGrid; }; -#elif HAVE_UG -template -struct Grid { using type = Dune::UGGrid<2>; }; -#else template struct Grid { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // we use the immiscible fluid system here template @@ -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>::init(/*tempMin=*/273.15, diff --git a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh index c53e9e5..08f431c 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>); // Set grid and the grid creator to be used -#if HAVE_DUNE_ALUGRID -template -struct Grid { using type = Dune::ALUGrid; }; -#elif HAVE_UG -template -struct Grid { using type = Dune::UGGrid<2>; }; -#else template struct Grid { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // The fluid system property template @@ -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 b30010a..0fa45a4 100644 --- a/exercises/solution/exercise-fluidsystem/2pproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2pproblem.hh @@ -30,14 +30,8 @@ // The box discretization #include -// The grid managers -#if HAVE_DUNE_ALUGRID -#include -#elif HAVE_UG -#include -#else +// The grid manager #include -#endif // The porous media base problem #include @@ -83,16 +77,8 @@ SET_TYPE_PROP(ExerciseFluidsystemTwoP, SpatialParams, GetPropType>); // Set grid to be used -#if HAVE_DUNE_ALUGRID -template -struct Grid { using type = Dune::ALUGrid; }; -#elif HAVE_UG -template -struct Grid { using type = Dune::UGGrid<2>; }; -#else template struct Grid { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID // we use the immiscible fluid system here template @@ -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>::init(/*tempMin=*/273.15, -- GitLab From 1f5ad2680b15f0d387a9097bfa91dd80e08d30b2 Mon Sep 17 00:00:00 2001 From: Sina Ackermann Date: Fri, 21 Dec 2018 11:22:34 +0100 Subject: [PATCH 2/3] [exercise-biomineralization] Use only yaspgrid --- exercises/exercise-biomineralization/biominproblem.hh | 8 -------- .../solution/exercise-biomineralization/biominproblem.hh | 8 -------- 2 files changed, 16 deletions(-) diff --git a/exercises/exercise-biomineralization/biominproblem.hh b/exercises/exercise-biomineralization/biominproblem.hh index 489d265..969deed 100644 --- a/exercises/exercise-biomineralization/biominproblem.hh +++ b/exercises/exercise-biomineralization/biominproblem.hh @@ -62,16 +62,8 @@ template struct Problem { using type = ExerciseFourBioMinProblem; }; //! Set grid and the grid creator to be used -#if HAVE_DUNE_ALUGRID -template -struct Grid { using type = Dune::ALUGrid; }; -#elif HAVE_UG -template -struct Grid { using type = Dune::UGGrid<2>; }; -#else template struct Grid { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID //! Set the fluid system type template diff --git a/exercises/solution/exercise-biomineralization/biominproblem.hh b/exercises/solution/exercise-biomineralization/biominproblem.hh index 672b544..44b05db 100644 --- a/exercises/solution/exercise-biomineralization/biominproblem.hh +++ b/exercises/solution/exercise-biomineralization/biominproblem.hh @@ -63,16 +63,8 @@ template struct Problem { using type = ExerciseFourBioMinProblem; }; //! Set grid and the grid creator to be used -#if HAVE_DUNE_ALUGRID -template -struct Grid { using type = Dune::ALUGrid; }; -#elif HAVE_UG -template -struct Grid { using type = Dune::UGGrid<2>; }; -#else template struct Grid { using type = Dune::YaspGrid<2>; }; -#endif // HAVE_DUNE_ALUGRID //! Set the fluid system type template -- GitLab From 70b3afaacb540aae157eb02c36df331f884c1e9b Mon Sep 17 00:00:00 2001 From: Sina Ackermann Date: Fri, 21 Dec 2018 12:17:31 +0100 Subject: [PATCH 3/3] Add #include yaspgrid.hh where YaspGrid is used --- exercises/exercise-basic/injection2p2cproblem.hh | 2 ++ exercises/exercise-basic/injection2pniproblem.hh | 2 ++ exercises/exercise-basic/injection2pproblem.hh | 2 ++ exercises/exercise-biomineralization/biominproblem.hh | 2 ++ exercises/exercise-fluidsystem/2p2cproblem.hh | 3 +++ exercises/exercise-fluidsystem/2pproblem.hh | 6 +++--- exercises/exercise-grids/injection2pproblem.hh | 2 ++ exercises/exercise-runtimeparams/injection2pproblem.hh | 2 ++ exercises/solution/exercise-basic/injection2pniproblem.hh | 2 ++ .../solution/exercise-biomineralization/biominproblem.hh | 2 ++ .../interface/ex_interface_coupling_ff-pm.cc | 1 + exercises/solution/exercise-fluidsystem/2p2cproblem.hh | 3 +++ exercises/solution/exercise-fluidsystem/2pproblem.hh | 6 +++--- exercises/solution/exercise-grids/injection2pproblem.hh | 2 ++ .../solution/exercise-runtimeparams/injection2pproblem.hh | 2 ++ 15 files changed, 33 insertions(+), 6 deletions(-) diff --git a/exercises/exercise-basic/injection2p2cproblem.hh b/exercises/exercise-basic/injection2p2cproblem.hh index 754e80b..7900985 100644 --- a/exercises/exercise-basic/injection2p2cproblem.hh +++ b/exercises/exercise-basic/injection2p2cproblem.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_EX_BASIC_PROBLEM_2P2C_HH #define DUMUX_EX_BASIC_PROBLEM_2P2C_HH +#include + #include #include #include diff --git a/exercises/exercise-basic/injection2pniproblem.hh b/exercises/exercise-basic/injection2pniproblem.hh index b6ccceb..8f0bd5d 100644 --- a/exercises/exercise-basic/injection2pniproblem.hh +++ b/exercises/exercise-basic/injection2pniproblem.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_EX_BASIC_PROBLEM_2PNI_HH #define DUMUX_EX_BASIC_PROBLEM_2PNI_HH +#include + #include #include #include diff --git a/exercises/exercise-basic/injection2pproblem.hh b/exercises/exercise-basic/injection2pproblem.hh index fda7446..49257b1 100644 --- a/exercises/exercise-basic/injection2pproblem.hh +++ b/exercises/exercise-basic/injection2pproblem.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_EX_BASIC_PROBLEM_2P_HH #define DUMUX_EX_BASIC_PROBLEM_2P_HH +#include + #include #include #include diff --git a/exercises/exercise-biomineralization/biominproblem.hh b/exercises/exercise-biomineralization/biominproblem.hh index 969deed..1ed4cce 100644 --- a/exercises/exercise-biomineralization/biominproblem.hh +++ b/exercises/exercise-biomineralization/biominproblem.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_EXERCISE_FOUR_PROBLEM_HH #define DUMUX_EXERCISE_FOUR_PROBLEM_HH +#include + #include #include #include diff --git a/exercises/exercise-fluidsystem/2p2cproblem.hh b/exercises/exercise-fluidsystem/2p2cproblem.hh index 1d86aad..d89d54e 100644 --- a/exercises/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/exercise-fluidsystem/2p2cproblem.hh @@ -24,6 +24,9 @@ #ifndef DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH #define DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH +// The grid manager +#include + // The numerical model #include diff --git a/exercises/exercise-fluidsystem/2pproblem.hh b/exercises/exercise-fluidsystem/2pproblem.hh index 34a0bb5..f0f2572 100644 --- a/exercises/exercise-fluidsystem/2pproblem.hh +++ b/exercises/exercise-fluidsystem/2pproblem.hh @@ -24,15 +24,15 @@ #ifndef DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH #define DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH +// The grid manager +#include + // The numerical model #include // The box discretization #include -// The grid manager -#include - // The porous media base problem #include diff --git a/exercises/exercise-grids/injection2pproblem.hh b/exercises/exercise-grids/injection2pproblem.hh index c5dcc78..b99e7eb 100644 --- a/exercises/exercise-grids/injection2pproblem.hh +++ b/exercises/exercise-grids/injection2pproblem.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_EXGRIDS_INJECTION_PROBLEM_2P_HH #define DUMUX_EXGRIDS_INJECTION_PROBLEM_2P_HH +#include + #include #include #include diff --git a/exercises/exercise-runtimeparams/injection2pproblem.hh b/exercises/exercise-runtimeparams/injection2pproblem.hh index 456a1ab..cdae77b 100644 --- a/exercises/exercise-runtimeparams/injection2pproblem.hh +++ b/exercises/exercise-runtimeparams/injection2pproblem.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_EXRUNTIMEPARAMS_INJECTION_PROBLEM_2P_HH #define DUMUX_EXRUNTIMEPARAMS_INJECTION_PROBLEM_2P_HH +#include + #include #include #include diff --git a/exercises/solution/exercise-basic/injection2pniproblem.hh b/exercises/solution/exercise-basic/injection2pniproblem.hh index 0fe71de..6c9c835 100644 --- a/exercises/solution/exercise-basic/injection2pniproblem.hh +++ b/exercises/solution/exercise-basic/injection2pniproblem.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_EX_BASIC_PROBLEM_2PNI_HH #define DUMUX_EX_BASIC_PROBLEM_2PNI_HH +#include + #include #include #include diff --git a/exercises/solution/exercise-biomineralization/biominproblem.hh b/exercises/solution/exercise-biomineralization/biominproblem.hh index 44b05db..9a75f3c 100644 --- a/exercises/solution/exercise-biomineralization/biominproblem.hh +++ b/exercises/solution/exercise-biomineralization/biominproblem.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_EXERCISE_FOUR_PROBLEM_HH #define DUMUX_EXERCISE_FOUR_PROBLEM_HH +#include + #include #include #include diff --git a/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_coupling_ff-pm.cc b/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_coupling_ff-pm.cc index 0d35dae..812cae4 100644 --- a/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_coupling_ff-pm.cc +++ b/exercises/solution/exercise-coupling-ff-pm/interface/ex_interface_coupling_ff-pm.cc @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh index 08f431c..09221c4 100644 --- a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh @@ -24,6 +24,9 @@ #ifndef DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH #define DUMUX_EXERCISE_FLUIDSYSTEM_B_PROBLEM_HH +// The grid manager +#include + // The numerical model #include diff --git a/exercises/solution/exercise-fluidsystem/2pproblem.hh b/exercises/solution/exercise-fluidsystem/2pproblem.hh index 0fa45a4..e289f9d 100644 --- a/exercises/solution/exercise-fluidsystem/2pproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2pproblem.hh @@ -24,15 +24,15 @@ #ifndef DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH #define DUMUX_EXERCISE_FLUIDSYSTEM_A_PROBLEM_HH +// The grid manager +#include + // The numerical model #include // The box discretization #include -// The grid manager -#include - // The porous media base problem #include diff --git a/exercises/solution/exercise-grids/injection2pproblem.hh b/exercises/solution/exercise-grids/injection2pproblem.hh index 0d9c8ba..91d8701 100644 --- a/exercises/solution/exercise-grids/injection2pproblem.hh +++ b/exercises/solution/exercise-grids/injection2pproblem.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_EXGRIDS_INJECTION_PROBLEM_2P_HH #define DUMUX_EXGRIDS_INJECTION_PROBLEM_2P_HH +#include + #include #include #include diff --git a/exercises/solution/exercise-runtimeparams/injection2pproblem.hh b/exercises/solution/exercise-runtimeparams/injection2pproblem.hh index 698432c..d0ca659 100644 --- a/exercises/solution/exercise-runtimeparams/injection2pproblem.hh +++ b/exercises/solution/exercise-runtimeparams/injection2pproblem.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_EXRUNTIMEPARAMS_INJECTION_PROBLEM_2P_HH #define DUMUX_EXRUNTIMEPARAMS_INJECTION_PROBLEM_2P_HH +#include + #include #include #include -- GitLab