Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux-course
Commits
d00ca742
Commit
d00ca742
authored
Dec 20, 2018
by
Felix Weinhardt
Browse files
[exercise runtimeparams]
removed TypeTag ending
parent
742999c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
exercises/exercise-runtimeparams/exercise_runtimeparams.cc
View file @
d00ca742
...
...
@@ -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
::
Injection2pCC
TypeTag
;
using
TypeTag
=
Properties
::
TTag
::
Injection2pCC
;
// initialize MPI, finalize is done automatically on exit
const
auto
&
mpiHelper
=
Dune
::
MPIHelper
::
instance
(
argc
,
argv
);
...
...
exercises/exercise-runtimeparams/injection2pproblem.hh
View file @
d00ca742
...
...
@@ -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
Injection2p
TypeTag
{
using
InheritsFrom
=
std
::
tuple
<
TwoP
>
;
};
struct
Injection2pCC
TypeTag
{
using
InheritsFrom
=
std
::
tuple
<
Injection2p
TypeTag
,
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
::
Injection2p
TypeTag
>
{
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
::
Injection2p
TypeTag
>
{
using
type
=
InjectionProblem2P
<
TypeTag
>
;
};
struct
Problem
<
TypeTag
,
TTag
::
Injection2p
>
{
using
type
=
InjectionProblem2P
<
TypeTag
>
;
};
// Set the spatial parameters
SET_TYPE_PROP
(
Injection2p
TypeTag
,
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
::
Injection2p
TypeTag
>
{
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
/*!
...
...
exercises/solution/exercise-runtimeparams/exercise_runtimeparams_solution.cc
View file @
d00ca742
...
...
@@ -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
::
Injection2pCC
TypeTag
;
using
TypeTag
=
Properties
::
TTag
::
Injection2pCC
;
// initialize MPI, finalize is done automatically on exit
const
auto
&
mpiHelper
=
Dune
::
MPIHelper
::
instance
(
argc
,
argv
);
...
...
exercises/solution/exercise-runtimeparams/injection2pproblem.hh
View file @
d00ca742
...
...
@@ -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
Injection2p
TypeTag
{
using
InheritsFrom
=
std
::
tuple
<
TwoP
>
;
};
struct
Injection2pCC
TypeTag
{
using
InheritsFrom
=
std
::
tuple
<
Injection2p
TypeTag
,
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
::
Injection2p
TypeTag
>
{
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
::
Injection2p
TypeTag
>
{
using
type
=
InjectionProblem2P
<
TypeTag
>
;
};
struct
Problem
<
TypeTag
,
TTag
::
Injection2p
>
{
using
type
=
InjectionProblem2P
<
TypeTag
>
;
};
// Set the spatial parameters
SET_TYPE_PROP
(
Injection2p
TypeTag
,
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
::
Injection2p
TypeTag
>
{
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
/*!
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment