diff --git a/exercises/exercise-grids/exercise_grids.cc b/exercises/exercise-grids/exercise_grids.cc index 5f57026c15a0284cef6834d618cb1e84a513c623..1a5d205626c7d73c5081050bfa074ce3932865fe 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 209e9f50def2618920204576d99f6c1c5b8128ad..c5dcc7838b74bd5e439ca25d3be6a7a47895f989 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 0f5ba9852fdad06cca4524bc93a6eff681db6008..ecd02eeb078bd5bdf66a40179444db8ff6eb3167 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 a18e2f4892fe371cf8824f7cd13a5f32a6f87efb..0d9c8ba23e4f90620ae0eebce00824a7bc94b3e6 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 /*!