From bd9b5367e2ed9356d4587176f1cb0b1b56f111b9 Mon Sep 17 00:00:00 2001 From: Felix Weinhardt <felixw@picard.iws.uni-stuttgart.de> Date: Thu, 20 Dec 2018 11:31:18 +0100 Subject: [PATCH] [exercise-grids] removed TypeTag ending --- exercises/exercise-grids/exercise_grids.cc | 2 +- exercises/exercise-grids/injection2pproblem.hh | 12 ++++++------ .../exercise-grids/exercise_grids_solution.cc | 2 +- .../exercise-grids/injection2pproblem.hh | 18 +++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/exercises/exercise-grids/exercise_grids.cc b/exercises/exercise-grids/exercise_grids.cc index 5f57026c..1a5d2056 100644 --- a/exercises/exercise-grids/exercise_grids.cc +++ b/exercises/exercise-grids/exercise_grids.cc @@ -58,7 +58,7 @@ int main(int argc, char** argv) try using namespace Dumux; // define the type tag for this problem - using TypeTag = Properties::TTag::Injection2pCCTypeTag; + using TypeTag = Properties::TTag::Injection2pCC; // initialize MPI, finalize is done automatically on exit const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); diff --git a/exercises/exercise-grids/injection2pproblem.hh b/exercises/exercise-grids/injection2pproblem.hh index 209e9f50..c5dcc783 100644 --- a/exercises/exercise-grids/injection2pproblem.hh +++ b/exercises/exercise-grids/injection2pproblem.hh @@ -42,29 +42,29 @@ namespace Properties { // define the TypeTag for this problem with a cell-centered two-point flux approximation spatial discretization. // Create new type tags namespace TTag { -struct Injection2pTypeTag { using InheritsFrom = std::tuple<TwoP>; }; -struct Injection2pCCTypeTag { using InheritsFrom = std::tuple<Injection2pTypeTag, CCTpfaModel>; }; +struct Injection2p { using InheritsFrom = std::tuple<TwoP>; }; +struct Injection2pCC { using InheritsFrom = std::tuple<Injection2p, CCTpfaModel>; }; } // end namespace TTag // Set the grid type template<class TypeTag> -struct Grid<TypeTag, TTag::Injection2pTypeTag> { using type = Dune::YaspGrid<2>; }; +struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; }; // TODO: Task 2: Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) // TODO: Task 4: Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) // TODO: Task 5: Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::Injection2pTypeTag> { using type = InjectionProblem2P<TypeTag>; }; +struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2pTypeTag, SpatialParams, +SET_TYPE_PROP(Injection2p, SpatialParams, InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, GetPropType<TypeTag, Properties::Scalar>>); // Set fluid configuration template<class TypeTag> -struct FluidSystem<TypeTag, TTag::Injection2pTypeTag> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; }; +struct FluidSystem<TypeTag, TTag::Injection2p> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; }; } // end namespace Properties /*! diff --git a/exercises/solution/exercise-grids/exercise_grids_solution.cc b/exercises/solution/exercise-grids/exercise_grids_solution.cc index 0f5ba985..ecd02eeb 100644 --- a/exercises/solution/exercise-grids/exercise_grids_solution.cc +++ b/exercises/solution/exercise-grids/exercise_grids_solution.cc @@ -58,7 +58,7 @@ int main(int argc, char** argv) try using namespace Dumux; // define the type tag for this problem - using TypeTag = Properties::TTag::Injection2pCCTypeTag; + using TypeTag = Properties::TTag::Injection2pCC; // initialize MPI, finalize is done automatically on exit const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); diff --git a/exercises/solution/exercise-grids/injection2pproblem.hh b/exercises/solution/exercise-grids/injection2pproblem.hh index a18e2f48..0d9c8ba2 100644 --- a/exercises/solution/exercise-grids/injection2pproblem.hh +++ b/exercises/solution/exercise-grids/injection2pproblem.hh @@ -42,37 +42,37 @@ namespace Properties { // define the TypeTag for this problem with a cell-centered two-point flux approximation spatial discretization. // Create new type tags namespace TTag { -struct Injection2pTypeTag { using InheritsFrom = std::tuple<TwoP>; }; -struct Injection2pCCTypeTag { using InheritsFrom = std::tuple<Injection2pTypeTag, CCTpfaModel>; }; +struct Injection2p { using InheritsFrom = std::tuple<TwoP>; }; +struct Injection2pCC { using InheritsFrom = std::tuple<Injection2p, CCTpfaModel>; }; } // end namespace TTag //Set the grid type // template<class TypeTag> -// struct Grid<TypeTag, TTag::Injection2pTypeTag> { using type = Dune::YaspGrid<2>; }; +// struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2>; }; // TODO: Task 2: Replace the above Grid Property definition with a more flexible grid (Use Dune::TensorProductCoordinates) template<class TypeTag> -struct Grid<TypeTag, TTag::Injection2pTypeTag> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<double, 2> >; }; +struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::YaspGrid<2, Dune::TensorProductCoordinates<double, 2> >; }; // TODO: Task 4: Replace the above Grid Property definition to read in a external structured grid via a .msh file (Use Dune::ALUGrid and Dune:cube) // template<class TypeTag> -// struct Grid<TypeTag, TTag::Injection2pTypeTag> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; }; +// struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; }; // TODO: Task 5: Replace the above Grid Property definition to read in a external unstructured grid via a .msh file (Use Dune::ALUGrid and Dune::simplex) // template<class TypeTag> -// struct Grid<TypeTag, TTag::Injection2pTypeTag> { using type = Dune::ALUGrid<2, 2, Dune::simplex, Dune::nonconforming>; }; +// struct Grid<TypeTag, TTag::Injection2p> { using type = Dune::ALUGrid<2, 2, Dune::simplex, Dune::nonconforming>; }; // Set the problem property template<class TypeTag> -struct Problem<TypeTag, TTag::Injection2pTypeTag> { using type = InjectionProblem2P<TypeTag>; }; +struct Problem<TypeTag, TTag::Injection2p> { using type = InjectionProblem2P<TypeTag>; }; // Set the spatial parameters -SET_TYPE_PROP(Injection2pTypeTag, SpatialParams, +SET_TYPE_PROP(Injection2p, SpatialParams, InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>, GetPropType<TypeTag, Properties::Scalar>>); // Set fluid configuration template<class TypeTag> -struct FluidSystem<TypeTag, TTag::Injection2pTypeTag> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; }; +struct FluidSystem<TypeTag, TTag::Injection2p> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; }; } // end namespace Properties /*! -- GitLab