Commit 7b05d402 authored by Timo Koch's avatar Timo Koch

Merge branch 'exercise-basic_remove-TypeTag-ending' into 'master'

[exercise-basic]

See merge request !58
parents 742999c2 c91350a6
Pipeline #745 passed with stage
in 50 seconds
......@@ -60,7 +60,7 @@ paraview injection-2p2c.pvd
* Copy the main file `exercise_basic_2p.cc` and rename it to `exercise_basic_2pni.cc`
* In `exercise_basic_2pni.cc`, include the header `injection2pniproblem.hh` instead of `injection2pproblem.hh`.
* In `exercise_basic_2pni.cc`, change `Injection2pCCTypeTag` to `Injection2pNICCTypeTag` in the line `using TypeTag = Properties::TTag::Injection2pNICCTypeTag;`
* In `exercise_basic_2pni.cc`, change `Injection2pCC` to `Injection2pNICC` in the line `using TypeTag = Properties::TTag::Injection2pNICC;`
* Add a new executable in `CMakeLists.txt` by adding the lines
```cmake
......
......@@ -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);
......
......@@ -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::Injection2p2cCCTypeTag;
using TypeTag = Properties::TTag::Injection2p2cCC;
// initialize MPI, finalize is done automatically on exit
const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv);
......
......@@ -40,30 +40,30 @@ class Injection2p2cProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct Injection2p2cTypeTag { using InheritsFrom = std::tuple<TwoPTwoC>; };
struct Injection2p2cCCTypeTag { using InheritsFrom = std::tuple<CCTpfaModel, Injection2p2cTypeTag>; };
struct Injection2p2c { using InheritsFrom = std::tuple<TwoPTwoC>; };
struct Injection2p2cCC { using InheritsFrom = std::tuple<CCTpfaModel, Injection2p2c>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::Injection2p2cTypeTag> { using type = Dune::YaspGrid<2>; };
struct Grid<TypeTag, TTag::Injection2p2c> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::Injection2p2cTypeTag> { using type = Injection2p2cProblem<TypeTag>; };
struct Problem<TypeTag, TTag::Injection2p2c> { using type = Injection2p2cProblem<TypeTag>; };
// Set the spatial parameters
SET_TYPE_PROP(Injection2p2cTypeTag, SpatialParams,
SET_TYPE_PROP(Injection2p2c, SpatialParams,
InjectionSpatialParams<GetPropType<TypeTag, Properties::FVGridGeometry>,
GetPropType<TypeTag, Properties::Scalar>>);
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Injection2p2cTypeTag> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; };
struct FluidSystem<TypeTag, TTag::Injection2p2c> { using type = FluidSystems::H2ON2<GetPropType<TypeTag, Properties::Scalar>, FluidSystems::H2ON2DefaultPolicy</*fastButSimplifiedRelations=*/ true>>; };
// Define whether mole(true) or mass (false) fractions are used
template<class TypeTag>
struct UseMoles<TypeTag, TTag::Injection2p2cTypeTag> { static constexpr bool value = true; };
struct UseMoles<TypeTag, TTag::Injection2p2c> { static constexpr bool value = true; };
} // end namespace Properties
/*!
......
......@@ -47,7 +47,7 @@ namespace Properties
// Create new type tags
namespace TTag {
struct Injection2pNITypeTag { using InheritsFrom = std::tuple<TwoP>; };
struct Injection2pNICCTypeTag { using InheritsFrom = std::tuple<Injection2pNITypeTag, CCTpfaModel>; };
struct Injection2pNICC { using InheritsFrom = std::tuple<Injection2pNITypeTag, CCTpfaModel>; };
} // end namespace TTag
// Set the grid type
......
......@@ -42,26 +42,26 @@ 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>; };
// 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
/*!
......
......@@ -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::Injection2pNICCTypeTag;
using TypeTag = Properties::TTag::Injection2pNICC;
// initialize MPI, finalize is done automatically on exit
const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv);
......
......@@ -42,7 +42,7 @@ namespace Properties {
// Create new type tags
namespace TTag {
struct Injection2pNITypeTag { using InheritsFrom = std::tuple<TwoPNI>; };
struct Injection2pNICCTypeTag { using InheritsFrom = std::tuple<Injection2pNITypeTag, CCTpfaModel>; };
struct Injection2pNICC { using InheritsFrom = std::tuple<Injection2pNITypeTag, CCTpfaModel>; };
} // end namespace TTag
// Set the grid type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment