Commit 72137036 authored by Beatrix Becker's avatar Beatrix Becker
Browse files

[exercise-fluidsystem solution] make TypeTags for problems easier

parent 2b87c983
......@@ -45,8 +45,7 @@ template <class TypeTag> class ExerciseFluidsystemProblemTwoPTwoC;
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC));
NEW_TYPE_TAG(ExerciseFluidsystemBoxTwoPTwoCTypeTag, INHERITS_FROM(BoxModel, ExerciseFluidsystemTwoPTwoCTypeTag));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTwoCTypeTag, INHERITS_FROM(TwoPTwoC, BoxModel));
// Set the "Problem" property
SET_TYPE_PROP(ExerciseFluidsystemTwoPTwoCTypeTag, Problem, ExerciseFluidsystemProblemTwoPTwoC<TypeTag>);
......
......@@ -65,8 +65,7 @@ template <class TypeTag> class ExerciseFluidsystemProblemTwoP;
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTypeTag, INHERITS_FROM(TwoP));
NEW_TYPE_TAG(ExerciseFluidsystemBoxTwoPTypeTag, INHERITS_FROM(BoxModel, ExerciseFluidsystemTwoPTypeTag));
NEW_TYPE_TAG(ExerciseFluidsystemTwoPTypeTag, INHERITS_FROM(TwoP, BoxModel));
// Set the "Problem" property
SET_TYPE_PROP(ExerciseFluidsystemTwoPTypeTag, Problem, ExerciseFluidsystemProblemTwoP<TypeTag>);
......
......@@ -2,13 +2,13 @@
#part a: 2pproblem
dune_add_test(NAME exercise-fluidsystem_a_solution
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemBoxTwoPTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoPTypeTag
CMD_ARGS exercise-fluidsystem_a.input)
#part b: 2p2cproblem
dune_add_test(NAME exercise-fluidsystem_b_solution
SOURCES exercise-fluidsystem.cc
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemBoxTwoPTwoCTypeTag
COMPILE_DEFINITIONS TYPETAG=ExerciseFluidsystemTwoPTwoCTypeTag
CMD_ARGS exercise-fluidsystem_b.input)
# add exercises to the common target
......
......@@ -61,8 +61,8 @@ int main(int argc, char** argv) try
// define the type tag for this problem
// TYPETAG is set in CMakeLists.txt as compile time definition
// alternatively you could write `using TypeTag = TTAG(ExerciseFluidsystemBoxTwoPTypeTag);`
// then, for the 2p2c problem you have to change this line to `using TypeTag = TTAG(ExerciseFluidsystemBoxTwoPTwoCTypeTag);`
// alternatively you could write `using TypeTag = TTAG(ExerciseFluidsystemTwoPTypeTag);`
// then, for the 2p2c problem you have to change this line to `using TypeTag = TTAG(ExerciseFluidsystemTwoPTwoCTypeTag);`
// and recompile the executable
using TypeTag = TTAG(TYPETAG);
......
Supports Markdown
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