Skip to content
GitLab
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
Commits
b77d0030
Commit
b77d0030
authored
Nov 17, 2018
by
Bernd Flemisch
Browse files
[propertysystem] replace macro calls in md tracer test
parent
c40c3585
Changes
6
Hide whitespace changes
Inline
Side-by-side
test/multidomain/facet/tracer_tracer/main.cc
View file @
b77d0030
...
...
@@ -60,8 +60,8 @@
template
<
class
BulkTypeTag
,
class
LowDimTypeTag
>
class
TestTraits
{
using
BulkFVGridGeometry
=
typename
GET_PROP_TYPE
(
BulkTypeTag
,
FVGridGeometry
)
;
using
LowDimFVGridGeometry
=
typename
GET_PROP_TYPE
(
LowDimTypeTag
,
FVGridGeometry
)
;
using
BulkFVGridGeometry
=
Dumux
::
GetPropType
<
BulkTypeTag
,
Dumux
::
Properties
::
FVGridGeometry
>
;
using
LowDimFVGridGeometry
=
Dumux
::
GetPropType
<
LowDimTypeTag
,
Dumux
::
Properties
::
FVGridGeometry
>
;
public:
using
MDTraits
=
Dumux
::
MultiDomainTraits
<
BulkTypeTag
,
LowDimTypeTag
>
;
using
CouplingMapper
=
Dumux
::
FacetCouplingMapper
<
BulkFVGridGeometry
,
LowDimFVGridGeometry
>
;
...
...
@@ -73,20 +73,28 @@ namespace Dumux {
namespace
Properties
{
// set cm property for the box test
using
BoxTraits
=
TestTraits
<
TTAG
(
OnePBulkBox
),
TTAG
(
OnePLowDimBox
)
>
;
using
BoxTracerTraits
=
TestTraits
<
TTAG
(
TracerBulkBox
),
TTAG
(
TracerLowDimBox
)
>
;
SET_TYPE_PROP
(
OnePBulkBox
,
CouplingManager
,
typename
BoxTraits
::
CouplingManager
);
SET_TYPE_PROP
(
OnePLowDimBox
,
CouplingManager
,
typename
BoxTraits
::
CouplingManager
);
SET_TYPE_PROP
(
TracerBulkBox
,
CouplingManager
,
typename
BoxTracerTraits
::
CouplingManager
);
SET_TYPE_PROP
(
TracerLowDimBox
,
CouplingManager
,
typename
BoxTracerTraits
::
CouplingManager
);
using
BoxTraits
=
TestTraits
<
Properties
::
TTag
::
OnePBulkBox
,
Properties
::
TTag
::
OnePLowDimBox
>
;
using
BoxTracerTraits
=
TestTraits
<
Properties
::
TTag
::
TracerBulkBox
,
Properties
::
TTag
::
TracerLowDimBox
>
;
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
OnePBulkBox
>
{
using
type
=
typename
BoxTraits
::
CouplingManager
;
};
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
OnePLowDimBox
>
{
using
type
=
typename
BoxTraits
::
CouplingManager
;
};
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
TracerBulkBox
>
{
using
type
=
typename
BoxTracerTraits
::
CouplingManager
;
};
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
TracerLowDimBox
>
{
using
type
=
typename
BoxTracerTraits
::
CouplingManager
;
};
// set cm property for the tpfa test
using
TpfaTraits
=
TestTraits
<
TTAG
(
OnePBulkTpfa
),
TTAG
(
OnePLowDimTpfa
)
>
;
using
TpfaTracerTraits
=
TestTraits
<
TTAG
(
TracerBulkTpfa
),
TTAG
(
TracerLowDimTpfa
)
>
;
SET_TYPE_PROP
(
OnePBulkTpfa
,
CouplingManager
,
typename
TpfaTraits
::
CouplingManager
);
SET_TYPE_PROP
(
OnePLowDimTpfa
,
CouplingManager
,
typename
TpfaTraits
::
CouplingManager
);
SET_TYPE_PROP
(
TracerBulkTpfa
,
CouplingManager
,
typename
TpfaTracerTraits
::
CouplingManager
);
SET_TYPE_PROP
(
TracerLowDimTpfa
,
CouplingManager
,
typename
TpfaTracerTraits
::
CouplingManager
);
using
TpfaTraits
=
TestTraits
<
Properties
::
TTag
::
OnePBulkTpfa
,
Properties
::
TTag
::
OnePLowDimTpfa
>
;
using
TpfaTracerTraits
=
TestTraits
<
Properties
::
TTag
::
TracerBulkTpfa
,
Properties
::
TTag
::
TracerLowDimTpfa
>
;
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
OnePBulkTpfa
>
{
using
type
=
typename
TpfaTraits
::
CouplingManager
;
};
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
OnePLowDimTpfa
>
{
using
type
=
typename
TpfaTraits
::
CouplingManager
;
};
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
TracerBulkTpfa
>
{
using
type
=
typename
TpfaTracerTraits
::
CouplingManager
;
};
template
<
class
TypeTag
>
struct
CouplingManager
<
TypeTag
,
TTag
::
TracerLowDimTpfa
>
{
using
type
=
typename
TpfaTracerTraits
::
CouplingManager
;
};
}
// end namespace Properties
}
// end namespace Dumux
...
...
@@ -206,10 +214,10 @@ int main(int argc, char** argv) try
//////////////////////////////////////////////////////
// try to create the grids (from the given grid file)
//////////////////////////////////////////////////////
using
BulkOnePTypeTag
=
TTAG
(
ONEPBULKTYPETAG
)
;
using
LowDimOnePTypeTag
=
TTAG
(
ONEPLOWDIMTYPETAG
)
;
using
BulkGrid
=
typename
GET_PROP_TYPE
(
BulkOnePTypeTag
,
Grid
)
;
using
LowDimGrid
=
typename
GET_PROP_TYPE
(
LowDimOnePTypeTag
,
Grid
)
;
using
BulkOnePTypeTag
=
Properties
::
TTag
::
ONEPBULKTYPETAG
;
using
LowDimOnePTypeTag
=
Properties
::
TTag
::
ONEPLOWDIMTYPETAG
;
using
BulkGrid
=
GetPropType
<
BulkOnePTypeTag
,
Properties
::
Grid
>
;
using
LowDimGrid
=
GetPropType
<
LowDimOnePTypeTag
,
Properties
::
Grid
>
;
using
GridManager
=
FacetCouplingGridManager
<
BulkGrid
,
LowDimGrid
>
;
GridManager
gridManager
;
...
...
@@ -225,8 +233,8 @@ int main(int argc, char** argv) try
std
::
vector
<
std
::
vector
<
double
>
>
lowDimVolumeFluxes
;
// create the finite volume grid geometries
using
BulkFVGridGeometry
=
typename
GET_PROP_TYPE
(
BulkOnePTypeTag
,
FVGridGeometry
)
;
using
LowDimFVGridGeometry
=
typename
GET_PROP_TYPE
(
LowDimOnePTypeTag
,
FVGridGeometry
)
;
using
BulkFVGridGeometry
=
GetPropType
<
BulkOnePTypeTag
,
Properties
::
FVGridGeometry
>
;
using
LowDimFVGridGeometry
=
GetPropType
<
LowDimOnePTypeTag
,
Properties
::
FVGridGeometry
>
;
auto
bulkFvGridGeometry
=
std
::
make_shared
<
BulkFVGridGeometry
>
(
bulkGridView
);
auto
lowDimFvGridGeometry
=
std
::
make_shared
<
LowDimFVGridGeometry
>
(
lowDimGridView
);
updateBulkFVGridGeometry
(
*
bulkFvGridGeometry
,
gridManager
,
lowDimGridView
);
...
...
@@ -256,8 +264,8 @@ int main(int argc, char** argv) try
auto
couplingManager
=
std
::
make_shared
<
CouplingManager
>
();
// the problems (boundary conditions)
using
BulkProblem
=
typename
GET_PROP_TYPE
(
BulkOnePTypeTag
,
Problem
)
;
using
LowDimProblem
=
typename
GET_PROP_TYPE
(
LowDimOnePTypeTag
,
Problem
)
;
using
BulkProblem
=
GetPropType
<
BulkOnePTypeTag
,
Properties
::
Problem
>
;
using
LowDimProblem
=
GetPropType
<
LowDimOnePTypeTag
,
Properties
::
Problem
>
;
auto
bulkSpatialParams
=
std
::
make_shared
<
typename
BulkProblem
::
SpatialParams
>
(
bulkFvGridGeometry
,
"Bulk.OneP"
);
auto
bulkProblem
=
std
::
make_shared
<
BulkProblem
>
(
bulkFvGridGeometry
,
bulkSpatialParams
,
couplingManager
,
"Bulk.OneP"
);
auto
lowDimSpatialParams
=
std
::
make_shared
<
typename
LowDimProblem
::
SpatialParams
>
(
lowDimFvGridGeometry
,
"LowDim.OneP"
);
...
...
@@ -274,8 +282,8 @@ int main(int argc, char** argv) try
couplingManager
->
init
(
bulkProblem
,
lowDimProblem
,
couplingMapper
,
x
);
// the grid variables
using
BulkGridVariables
=
typename
GET_PROP_TYPE
(
BulkOnePTypeTag
,
GridVariables
)
;
using
LowDimGridVariables
=
typename
GET_PROP_TYPE
(
LowDimOnePTypeTag
,
GridVariables
)
;
using
BulkGridVariables
=
GetPropType
<
BulkOnePTypeTag
,
Properties
::
GridVariables
>
;
using
LowDimGridVariables
=
GetPropType
<
LowDimOnePTypeTag
,
Properties
::
GridVariables
>
;
auto
bulkGridVariables
=
std
::
make_shared
<
BulkGridVariables
>
(
bulkProblem
,
bulkFvGridGeometry
);
auto
lowDimGridVariables
=
std
::
make_shared
<
LowDimGridVariables
>
(
lowDimProblem
,
lowDimFvGridGeometry
);
bulkGridVariables
->
init
(
x
[
bulkId
]);
...
...
@@ -289,8 +297,8 @@ int main(int argc, char** argv) try
VtkOutputModule
<
LowDimGridVariables
,
LowDimSolutionVector
>
lowDimVtkWriter
(
*
lowDimGridVariables
,
x
[
lowDimId
],
lowDimProblem
->
name
(),
"LowDim.OneP"
);
// Add model specific output fields
using
BulkIOFields
=
typename
GET_PROP_TYPE
(
BulkOnePTypeTag
,
IOFields
)
;
using
LowDimIOFields
=
typename
GET_PROP_TYPE
(
LowDimOnePTypeTag
,
IOFields
)
;
using
BulkIOFields
=
GetPropType
<
BulkOnePTypeTag
,
Properties
::
IOFields
>
;
using
LowDimIOFields
=
GetPropType
<
LowDimOnePTypeTag
,
Properties
::
IOFields
>
;
BulkIOFields
::
initOutputModule
(
bulkVtkWriter
);
LowDimIOFields
::
initOutputModule
(
lowDimVtkWriter
);
...
...
@@ -321,8 +329,8 @@ int main(int argc, char** argv) try
lowDimVtkWriter
.
write
(
1.0
);
// compute the volume fluxes and store them in the arrays
using
BulkFluxVariables
=
typename
GET_PROP_TYPE
(
BulkOnePTypeTag
,
FluxVariables
)
;
using
LowDimFluxVariables
=
typename
GET_PROP_TYPE
(
LowDimOnePTypeTag
,
FluxVariables
)
;
using
BulkFluxVariables
=
GetPropType
<
BulkOnePTypeTag
,
Properties
::
FluxVariables
>
;
using
LowDimFluxVariables
=
GetPropType
<
LowDimOnePTypeTag
,
Properties
::
FluxVariables
>
;
computeVolumeFluxes
<
BulkFluxVariables
>
(
bulkVolumeFluxes
,
*
couplingManager
,
*
assembler
,
*
bulkProblem
,
*
bulkFvGridGeometry
,
*
bulkGridVariables
,
x
[
bulkId
],
bulkId
);
computeVolumeFluxes
<
LowDimFluxVariables
>
(
lowDimVolumeFluxes
,
*
couplingManager
,
*
assembler
,
...
...
@@ -334,8 +342,8 @@ int main(int argc, char** argv) try
////////////////////////////////////////////////////////////////////////////
//! the problem (initial and boundary conditions)
using
BulkTracerTypeTag
=
TTAG
(
TRACERBULKTYPETAG
)
;
using
LowDimTracerTypeTag
=
TTAG
(
TRACERLOWDIMTYPETAG
)
;
using
BulkTracerTypeTag
=
Properties
::
TTag
::
TRACERBULKTYPETAG
;
using
LowDimTracerTypeTag
=
Properties
::
TTag
::
TRACERLOWDIMTYPETAG
;
// instantiate coupling manager
using
TracerTestTraits
=
TestTraits
<
BulkTracerTypeTag
,
LowDimTracerTypeTag
>
;
...
...
@@ -343,8 +351,8 @@ int main(int argc, char** argv) try
auto
couplingManager
=
std
::
make_shared
<
CouplingManager
>
();
// instantiate the tracer problems reusing the fv grid geometries
using
TracerBulkProblem
=
typename
GET_PROP_TYPE
(
BulkTracerTypeTag
,
Problem
)
;
using
TracerLowDimProblem
=
typename
GET_PROP_TYPE
(
LowDimTracerTypeTag
,
Problem
)
;
using
TracerBulkProblem
=
GetPropType
<
BulkTracerTypeTag
,
Properties
::
Problem
>
;
using
TracerLowDimProblem
=
GetPropType
<
LowDimTracerTypeTag
,
Properties
::
Problem
>
;
using
TracerBulkSpatialParams
=
typename
TracerBulkProblem
::
SpatialParams
;
using
TracerLowDimSpatialParams
=
typename
TracerLowDimProblem
::
SpatialParams
;
auto
bulkSpatialParams
=
std
::
make_shared
<
TracerBulkSpatialParams
>
(
bulkFvGridGeometry
,
bulkVolumeFluxes
,
"Bulk.Tracer"
);
...
...
@@ -368,8 +376,8 @@ int main(int argc, char** argv) try
couplingManager
->
init
(
bulkProblem
,
lowDimProblem
,
couplingMapper
,
x
);
// the grid variables
using
BulkGridVariables
=
typename
GET_PROP_TYPE
(
BulkTracerTypeTag
,
GridVariables
)
;
using
LowDimGridVariables
=
typename
GET_PROP_TYPE
(
LowDimTracerTypeTag
,
GridVariables
)
;
using
BulkGridVariables
=
GetPropType
<
BulkTracerTypeTag
,
Properties
::
GridVariables
>
;
using
LowDimGridVariables
=
GetPropType
<
LowDimTracerTypeTag
,
Properties
::
GridVariables
>
;
auto
bulkGridVariables
=
std
::
make_shared
<
BulkGridVariables
>
(
bulkProblem
,
bulkFvGridGeometry
);
auto
lowDimGridVariables
=
std
::
make_shared
<
LowDimGridVariables
>
(
lowDimProblem
,
lowDimFvGridGeometry
);
bulkGridVariables
->
init
(
x
[
bulkId
]);
...
...
@@ -383,8 +391,8 @@ int main(int argc, char** argv) try
VtkOutputModule
<
LowDimGridVariables
,
LowDimSolutionVector
>
lowDimVtkWriter
(
*
lowDimGridVariables
,
x
[
lowDimId
],
lowDimProblem
->
name
(),
"LowDim.Tracer"
);
// Add model specific output fields
using
BulkIOFields
=
typename
GET_PROP_TYPE
(
BulkTracerTypeTag
,
IOFields
)
;
using
LowDimIOFields
=
typename
GET_PROP_TYPE
(
LowDimTracerTypeTag
,
IOFields
)
;
using
BulkIOFields
=
GetPropType
<
BulkTracerTypeTag
,
Properties
::
IOFields
>
;
using
LowDimIOFields
=
GetPropType
<
LowDimTracerTypeTag
,
Properties
::
IOFields
>
;
BulkIOFields
::
initOutputModule
(
bulkVtkWriter
);
LowDimIOFields
::
initOutputModule
(
lowDimVtkWriter
);
...
...
test/multidomain/facet/tracer_tracer/problem_1p_bulk.hh
View file @
b77d0030
...
...
@@ -45,23 +45,33 @@ template<class TypeTag> class OnePBulkProblem;
namespace
Properties
{
// create the type tag nodes
NEW_TYPE_TAG
(
OnePBulk
,
INHERITS_FROM
(
OneP
));
NEW_TYPE_TAG
(
OnePBulkTpfa
,
INHERITS_FROM
(
OnePBulk
,
CCTpfaFacetCouplingModel
));
NEW_TYPE_TAG
(
OnePBulkBox
,
INHERITS_FROM
(
OnePBulk
,
BoxFacetCouplingModel
));
// Create new type tags
namespace
TTag
{
struct
OnePBulk
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePBulkTpfa
{
using
InheritsFrom
=
std
::
tuple
<
CCTpfaFacetCouplingModel
,
OnePBulk
>
;
};
struct
OnePBulkBox
{
using
InheritsFrom
=
std
::
tuple
<
BoxFacetCouplingModel
,
OnePBulk
>
;
};
}
// end namespace TTag
// Set the grid type
SET_TYPE_PROP
(
OnePBulk
,
Grid
,
Dune
::
ALUGrid
<
2
,
2
,
Dune
::
simplex
,
Dune
::
conforming
>
);
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
Dune
::
ALUGrid
<
2
,
2
,
Dune
::
simplex
,
Dune
::
conforming
>
;
};
// Set the problem type
SET_TYPE_PROP
(
OnePBulk
,
Problem
,
OnePBulkProblem
<
TypeTag
>
);
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
OnePBulkProblem
<
TypeTag
>
;
};
// set the spatial params
SET_TYPE_PROP
(
OnePBulk
,
SpatialParams
,
OnePSpatialParams
<
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
),
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
>
);
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
OnePSpatialParams
<
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>
,
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
>
;
};
// the fluid system
SET_PROP
(
OnePBulk
,
FluidSystem
)
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePBulk
>
{
private:
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
public:
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Components
::
SimpleH2O
<
Scalar
>
>
;
};
...
...
@@ -79,7 +89,7 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
{
using
ParentType
=
PorousMediumFlowProblem
<
TypeTag
>
;
using
GridVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridVariables
)
;
using
GridVariables
=
GetPropType
<
TypeTag
,
Properties
::
GridVariables
>
;
using
PrimaryVariables
=
typename
GridVariables
::
PrimaryVariables
;
using
Scalar
=
typename
GridVariables
::
Scalar
;
...
...
@@ -91,10 +101,10 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalPosition
=
typename
Element
::
Geometry
::
GlobalCoordinate
;
using
BoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
BoundaryTypes
)
;
using
CouplingManager
=
typename
GET_PROP_TYPE
(
TypeTag
,
CouplingManager
)
;
using
NumEqVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
)
;
using
Indices
=
typename
G
ET_PROP_TYPE
(
TypeTag
,
ModelTraits
)
::
Indices
;
using
BoundaryTypes
=
GetPropType
<
TypeTag
,
Properties
::
BoundaryTypes
>
;
using
CouplingManager
=
GetPropType
<
TypeTag
,
Properties
::
CouplingManager
>
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
Indices
=
typename
G
etPropType
<
TypeTag
,
Properties
::
ModelTraits
>
::
Indices
;
public:
OnePBulkProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
...
...
test/multidomain/facet/tracer_tracer/problem_1p_lowdim.hh
View file @
b77d0030
...
...
@@ -45,23 +45,33 @@ template<class TypeTag> class OnePLowDimProblem;
namespace
Properties
{
// create the type tag nodes
NEW_TYPE_TAG
(
OnePLowDim
,
INHERITS_FROM
(
OneP
));
NEW_TYPE_TAG
(
OnePLowDimTpfa
,
INHERITS_FROM
(
CCTpfaModel
,
OnePLowDim
));
NEW_TYPE_TAG
(
OnePLowDimBox
,
INHERITS_FROM
(
BoxModel
,
OnePLowDim
));
// Create new type tags
namespace
TTag
{
struct
OnePLowDim
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePLowDimTpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePLowDim
,
CCTpfaModel
>
;
};
struct
OnePLowDimBox
{
using
InheritsFrom
=
std
::
tuple
<
OnePLowDim
,
BoxModel
>
;
};
}
// end namespace TTag
// Set the grid type
SET_TYPE_PROP
(
OnePLowDim
,
Grid
,
Dune
::
FoamGrid
<
1
,
2
>
);
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
Dune
::
FoamGrid
<
1
,
2
>
;
};
// Set the problem type
SET_TYPE_PROP
(
OnePLowDim
,
Problem
,
OnePLowDimProblem
<
TypeTag
>
);
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
OnePLowDimProblem
<
TypeTag
>
;
};
// set the spatial params
SET_TYPE_PROP
(
OnePLowDim
,
SpatialParams
,
OnePSpatialParams
<
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
),
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
>
);
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
OnePSpatialParams
<
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>
,
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
>
;
};
// the fluid system
SET_PROP
(
OnePLowDim
,
FluidSystem
)
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
OnePLowDim
>
{
private:
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
public:
using
type
=
FluidSystems
::
OnePLiquid
<
Scalar
,
Components
::
SimpleH2O
<
Scalar
>
>
;
};
...
...
@@ -77,7 +87,7 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
{
using
ParentType
=
PorousMediumFlowProblem
<
TypeTag
>
;
using
GridVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridVariables
)
;
using
GridVariables
=
GetPropType
<
TypeTag
,
Properties
::
GridVariables
>
;
using
ElementVolumeVariables
=
typename
GridVariables
::
GridVolumeVariables
::
LocalView
;
using
PrimaryVariables
=
typename
GridVariables
::
PrimaryVariables
;
using
Scalar
=
typename
GridVariables
::
Scalar
;
...
...
@@ -89,10 +99,10 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalPosition
=
typename
Element
::
Geometry
::
GlobalCoordinate
;
using
BoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
BoundaryTypes
)
;
using
CouplingManager
=
typename
GET_PROP_TYPE
(
TypeTag
,
CouplingManager
)
;
using
NumEqVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
)
;
using
Indices
=
typename
G
ET_PROP_TYPE
(
TypeTag
,
ModelTraits
)
::
Indices
;
using
BoundaryTypes
=
GetPropType
<
TypeTag
,
Properties
::
BoundaryTypes
>
;
using
CouplingManager
=
GetPropType
<
TypeTag
,
Properties
::
CouplingManager
>
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
Indices
=
typename
G
etPropType
<
TypeTag
,
Properties
::
ModelTraits
>
::
Indices
;
public:
OnePLowDimProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
...
...
test/multidomain/facet/tracer_tracer/problem_tracer_bulk.hh
View file @
b77d0030
...
...
@@ -44,44 +44,55 @@ template <class TypeTag>
class
TracerBulkProblem
;
namespace
Properties
{
NEW_TYPE_TAG
(
TracerTestBulk
,
INHERITS_FROM
(
Tracer
));
// Create new type tags
namespace
TTag
{
struct
TracerTestBulk
{
using
InheritsFrom
=
std
::
tuple
<
Tracer
>
;
};
// define the type tags
NEW_TYPE_TAG
(
TracerBulkTpfa
,
INHERITS_FROM
(
TracerTestBulk
,
CCTpfaFacetCouplingModel
));
NEW_TYPE_TAG
(
TracerBulkBox
,
INHERITS_FROM
(
TracerTestBulk
,
BoxFacetCouplingModel
));
struct
TracerBulkTpfa
{
using
InheritsFrom
=
std
::
tuple
<
CCTpfaFacetCouplingModel
,
TracerTestBulk
>
;
};
struct
TracerBulkBox
{
using
InheritsFrom
=
std
::
tuple
<
BoxFacetCouplingModel
,
TracerTestBulk
>
;
};
}
// end namespace TTag
// Set the grid type
SET_TYPE_PROP
(
TracerTestBulk
,
Grid
,
Dune
::
ALUGrid
<
2
,
2
,
Dune
::
simplex
,
Dune
::
conforming
>
);
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
TracerTestBulk
>
{
using
type
=
Dune
::
ALUGrid
<
2
,
2
,
Dune
::
simplex
,
Dune
::
conforming
>
;
};
//! Overwrite the advection type property
SET_TYPE_PROP
(
TracerBulkTpfa
,
AdvectionType
,
StationaryVelocityField
<
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
>
);
SET_TYPE_PROP
(
TracerBulkBox
,
AdvectionType
,
StationaryVelocityField
<
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
>
);
template
<
class
TypeTag
>
struct
AdvectionType
<
TypeTag
,
TTag
::
TracerBulkTpfa
>
{
using
type
=
StationaryVelocityField
<
GetPropType
<
TypeTag
,
Properties
::
Scalar
>>
;
};
template
<
class
TypeTag
>
struct
AdvectionType
<
TypeTag
,
TTag
::
TracerBulkBox
>
{
using
type
=
StationaryVelocityField
<
GetPropType
<
TypeTag
,
Properties
::
Scalar
>>
;
};
// Set the problem property
SET_TYPE_PROP
(
TracerTestBulk
,
Problem
,
TracerBulkProblem
<
TypeTag
>
);
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
TracerTestBulk
>
{
using
type
=
TracerBulkProblem
<
TypeTag
>
;
};
// Set the spatial parameters
SET_PROP
(
TracerTestBulk
,
SpatialParams
)
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
TracerTestBulk
>
{
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
)
;
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
;
using
FVGridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
TracerSpatialParams
<
FVGridGeometry
,
Scalar
>
;
};
// Define whether mole(true) or mass (false) fractions are used
SET_BOOL_PROP
(
TracerTestBulk
,
UseMoles
,
false
);
template
<
class
TypeTag
>
struct
UseMoles
<
TypeTag
,
TTag
::
TracerTestBulk
>
{
static
constexpr
bool
value
=
false
;
};
//! set the model traits (with disabled diffusion)
SET_PROP
(
TracerTestBulk
,
ModelTraits
)
template
<
class
TypeTag
>
struct
ModelTraits
<
TypeTag
,
TTag
::
TracerTestBulk
>
{
private:
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
)
;
using
FluidSystem
=
GetPropType
<
TypeTag
,
Properties
::
FluidSystem
>
;
public:
using
type
=
TracerTestModelTraits
<
FluidSystem
::
numComponents
,
GET_PROP_VALUE
(
TypeTag
,
UseMoles
)
>
;
using
type
=
TracerTestModelTraits
<
FluidSystem
::
numComponents
,
getPropValue
<
TypeTag
,
Properties
::
UseMoles
>
(
)
>
;
};
// use the test-specific fluid system
SET_TYPE_PROP
(
TracerTestBulk
,
FluidSystem
,
TracerFluidSystem
<
TypeTag
>
);
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
TracerTestBulk
>
{
using
type
=
TracerFluidSystem
<
TypeTag
>
;
};
}
// end namespace Properties
...
...
@@ -95,19 +106,19 @@ class TracerBulkProblem : public PorousMediumFlowProblem<TypeTag>
{
using
ParentType
=
PorousMediumFlowProblem
<
TypeTag
>
;
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
;
using
Indices
=
typename
G
ET_PROP_TYPE
(
TypeTag
,
ModelTraits
)
::
Indices
;
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
;
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
)
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
Indices
=
typename
G
etPropType
<
TypeTag
,
Properties
::
ModelTraits
>
::
Indices
;
using
GridView
=
GetPropType
<
TypeTag
,
Properties
::
GridView
>
;
using
FVGridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>
;
using
FVElementGeometry
=
typename
FVGridGeometry
::
LocalView
;
using
BoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
BoundaryTypes
)
;
using
PrimaryVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariables
)
;
using
NumEqVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
)
;
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
)
;
using
CouplingManager
=
typename
GET_PROP_TYPE
(
TypeTag
,
CouplingManager
)
;
using
BoundaryTypes
=
GetPropType
<
TypeTag
,
Properties
::
BoundaryTypes
>
;
using
PrimaryVariables
=
GetPropType
<
TypeTag
,
Properties
::
PrimaryVariables
>
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
FluidSystem
=
GetPropType
<
TypeTag
,
Properties
::
FluidSystem
>
;
using
CouplingManager
=
GetPropType
<
TypeTag
,
Properties
::
CouplingManager
>
;
//! property that defines whether mole or mass fractions are used
static
constexpr
bool
useMoles
=
GET_PROP_VALUE
(
TypeTag
,
UseMoles
);
static
constexpr
bool
useMoles
=
getPropValue
<
TypeTag
,
Properties
::
UseMoles
>
(
);
using
Element
=
typename
FVGridGeometry
::
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalPosition
=
typename
Element
::
Geometry
::
GlobalCoordinate
;
...
...
test/multidomain/facet/tracer_tracer/problem_tracer_lowdim.hh
View file @
b77d0030
...
...
@@ -44,40 +44,49 @@ template <class TypeTag>
class
TracerLowDimProblem
;
namespace
Properties
{
NEW_TYPE_TAG
(
TracerTestLowDim
,
INHERITS_FROM
(
Tracer
));
// Create new type tags
namespace
TTag
{
struct
TracerTestLowDim
{
using
InheritsFrom
=
std
::
tuple
<
Tracer
>
;
};
// define the type tags for both bulk and lowdim type tag here
NEW_TYPE_TAG
(
TracerLowDimTpfa
,
INHERITS_FROM
(
CCTpfaModel
,
TracerTestLowDim
));
NEW_TYPE_TAG
(
TracerLowDimBox
,
INHERITS_FROM
(
BoxModel
,
TracerTestLowDim
));
struct
TracerLowDimTpfa
{
using
InheritsFrom
=
std
::
tuple
<
TracerTestLowDim
,
CCTpfaModel
>
;
};
struct
TracerLowDimBox
{
using
InheritsFrom
=
std
::
tuple
<
TracerTestLowDim
,
BoxModel
>
;
};
}
// end namespace TTag
// Set the grid type
SET_TYPE_PROP
(
TracerTestLowDim
,
Grid
,
Dune
::
FoamGrid
<
1
,
2
>
);
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
TracerTestLowDim
>
{
using
type
=
Dune
::
FoamGrid
<
1
,
2
>
;
};
// Set the problem property
SET_TYPE_PROP
(
TracerTestLowDim
,
Problem
,
TracerLowDimProblem
<
TypeTag
>
);
template
<
class
TypeTag
>
struct
Problem
<
TypeTag
,
TTag
::
TracerTestLowDim
>
{
using
type
=
TracerLowDimProblem
<
TypeTag
>
;
};
// Set the spatial parameters
SET_PROP
(
TracerTestLowDim
,
SpatialParams
)
template
<
class
TypeTag
>
struct
SpatialParams
<
TypeTag
,
TTag
::
TracerTestLowDim
>
{
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
)
;
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
;
using
FVGridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
type
=
TracerSpatialParams
<
FVGridGeometry
,
Scalar
>
;
};
// Define whether mole(true) or mass (false) fractions are used
SET_BOOL_PROP
(
TracerTestLowDim
,
UseMoles
,
false
);
template
<
class
TypeTag
>
struct
UseMoles
<
TypeTag
,
TTag
::
TracerTestLowDim
>
{
static
constexpr
bool
value
=
false
;
};
//! set the model traits (with disabled diffusion)
SET_PROP
(
TracerTestLowDim
,
ModelTraits
)
template
<
class
TypeTag
>
struct
ModelTraits
<
TypeTag
,
TTag
::
TracerTestLowDim
>
{
private:
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
)
;
using
FluidSystem
=
GetPropType
<
TypeTag
,
Properties
::
FluidSystem
>
;
public:
using
type
=
TracerTestModelTraits
<
FluidSystem
::
numComponents
,
GET_PROP_VALUE
(
TypeTag
,
UseMoles
)
>
;
using
type
=
TracerTestModelTraits
<
FluidSystem
::
numComponents
,
getPropValue
<
TypeTag
,
Properties
::
UseMoles
>
(
)
>
;
};
// use the test-specific fluid system
SET_TYPE_PROP
(
TracerTestLowDim
,
FluidSystem
,
TracerFluidSystem
<
TypeTag
>
);
template
<
class
TypeTag
>
struct
FluidSystem
<
TypeTag
,
TTag
::
TracerTestLowDim
>
{
using
type
=
TracerFluidSystem
<
TypeTag
>
;
};
}
// end namespace Properties
...
...
@@ -92,19 +101,19 @@ class TracerLowDimProblem : public PorousMediumFlowProblem<TypeTag>
{
using
ParentType
=
PorousMediumFlowProblem
<
TypeTag
>
;
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
;
using
Indices
=
typename
G
ET_PROP_TYPE
(
TypeTag
,
ModelTraits
)
::
Indices
;
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
;
using
FVGridGeometry
=
typename
GET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
)
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
Indices
=
typename
G
etPropType
<
TypeTag
,
Properties
::
ModelTraits
>
::
Indices
;
using
GridView
=
GetPropType
<
TypeTag
,
Properties
::
GridView
>
;
using
FVGridGeometry
=
GetPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>
;
using
FVElementGeometry
=
typename
FVGridGeometry
::
LocalView
;
using
BoundaryTypes
=
typename
GET_PROP_TYPE
(
TypeTag
,
BoundaryTypes
)
;
using
PrimaryVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariables
)
;
using
NumEqVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
NumEqVector
)
;
using
FluidSystem
=
typename
GET_PROP_TYPE
(
TypeTag
,
FluidSystem
)
;
using
CouplingManager
=
typename
GET_PROP_TYPE
(
TypeTag
,
CouplingManager
)
;
using
BoundaryTypes
=
GetPropType
<
TypeTag
,
Properties
::
BoundaryTypes
>
;
using
PrimaryVariables
=
GetPropType
<
TypeTag
,
Properties
::
PrimaryVariables
>
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
using
FluidSystem
=
GetPropType
<
TypeTag
,
Properties
::
FluidSystem
>
;
using
CouplingManager
=
GetPropType
<
TypeTag
,
Properties
::
CouplingManager
>
;
//! property that defines whether mole or mass fractions are used
static
constexpr
bool
useMoles
=
GET_PROP_VALUE
(
TypeTag
,
UseMoles
);
static
constexpr
bool
useMoles
=
getPropValue
<
TypeTag
,
Properties
::
UseMoles
>
(
);
using
Element
=
typename
FVGridGeometry
::
GridView
::
template
Codim
<
0
>
::
Entity
;
using
GlobalPosition
=
typename
Element
::
Geometry
::
GlobalCoordinate
;
...
...
test/multidomain/facet/tracer_tracer/tracerfluidsystem.hh
View file @
b77d0030
...
...
@@ -29,14 +29,14 @@ namespace Dumux {
//! A simple fluid system with one tracer component
template
<
class
TypeTag
>
class
TracerFluidSystem
:
public
FluidSystems
::
Base
<
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
,
class
TracerFluidSystem
:
public
FluidSystems
::
Base
<
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
,
TracerFluidSystem
<
TypeTag
>>
{
using
Scalar
=
typename
GET_PROP_TYPE
(
TypeTag
,
Scalar
)
;
using
Problem
=
typename
GET_PROP_TYPE
(
TypeTag
,
Problem
)
;
using
GridView
=
typename
GET_PROP_TYPE
(
TypeTag
,
GridView
)
;
using
Scalar
=
GetPropType
<
TypeTag
,
Properties
::
Scalar
>
;
using
Problem
=
GetPropType
<
TypeTag
,
Properties
::
Problem
>
;
using
GridView
=
GetPropType
<
TypeTag
,
Properties
::
GridView
>
;
using
Element
=
typename
GridView
::
template
Codim
<
0
>
::
Entity
;
using
FVElementGeometry
=
typename
G
ET_PROP_TYPE
(
TypeTag
,
FVGridGeometry
)
::
LocalView
;
using
FVElementGeometry
=
typename
G
etPropType
<
TypeTag
,
Properties
::
FVGridGeometry
>
::
LocalView
;
using
SubControlVolume
=
typename
FVElementGeometry
::
SubControlVolume
;
public:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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