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
Commits
033389f9
Commit
033389f9
authored
Dec 20, 2018
by
Dennis Gläser
Browse files
[test][facet][linearprofile] do not use prop system macros
parent
cf9e6d99
Changes
3
Hide whitespace changes
Inline
Side-by-side
test/multidomain/facet/1p_1p/linearprofile/main.cc
View file @
033389f9
...
...
@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief Test for the one-phase facet coupling model.
*/
#include
<config.h>
#include
<iostream>
...
...
@@ -65,9 +64,9 @@ namespace Dumux {
namespace
Properties
{
// set cm property in the sub-problems
using
TpfaTraits
=
TestTraits
<
TT
AG
(
OnePBulkTpfa
)
,
TT
AG
(
OnePLowDimTpfa
)
>
;
SET_TYPE_PROP
(
OnePBulkTpfa
,
CouplingManager
,
typename
TpfaTraits
::
CouplingManager
)
;
SET_TYPE_PROP
(
OnePLowDimTpfa
,
CouplingManager
,
typename
TpfaTraits
::
CouplingManager
)
;
using
TpfaTraits
=
TestTraits
<
TT
ag
::
OnePBulkTpfa
,
TT
ag
::
OnePLowDimTpfa
>
;
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
;
}
;
}
// end namespace Properties
}
// end namespace Dumux
...
...
@@ -93,10 +92,10 @@ int main(int argc, char** argv) try
//////////////////////////////////////////////////////
// try to create the grids (from the given grid file)
//////////////////////////////////////////////////////
using
BulkProblemTypeTag
=
TTAG
(
BULKTYPETAG
)
;
using
LowDimProblemTypeTag
=
TTAG
(
LOWDIMTYPETAG
)
;
using
BulkGrid
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
Grid
)
;
using
LowDimGrid
=
typename
GET_PROP_TYPE
(
LowDimProblemTypeTag
,
Grid
)
;
using
BulkProblemTypeTag
=
Properties
::
TTag
::
BULKTYPETAG
;
using
LowDimProblemTypeTag
=
Properties
::
TTag
::
LOWDIMTYPETAG
;
using
BulkGrid
=
GetPropType
<
BulkProblemTypeTag
,
Properties
::
Grid
>
;
using
LowDimGrid
=
GetPropType
<
LowDimProblemTypeTag
,
Properties
::
Grid
>
;
using
GridManager
=
FacetCouplingGridManager
<
BulkGrid
,
LowDimGrid
>
;
GridManager
gridManager
;
...
...
@@ -112,8 +111,8 @@ int main(int argc, char** argv) try
const
auto
&
lowDimGridView
=
gridManager
.
template
grid
<
1
>().
leafGridView
();
// create the finite volume grid geometries
using
BulkFVGridGeometry
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
FVGridGeometry
)
;
using
LowDimFVGridGeometry
=
typename
GET_PROP_TYPE
(
LowDimProblemTypeTag
,
FVGridGeometry
)
;
using
BulkFVGridGeometry
=
GetPropType
<
BulkProblemTypeTag
,
Properties
::
FVGridGeometry
>
;
using
LowDimFVGridGeometry
=
GetPropType
<
LowDimProblemTypeTag
,
Properties
::
FVGridGeometry
>
;
auto
bulkFvGridGeometry
=
std
::
make_shared
<
BulkFVGridGeometry
>
(
bulkGridView
);
auto
lowDimFvGridGeometry
=
std
::
make_shared
<
LowDimFVGridGeometry
>
(
lowDimGridView
);
bulkFvGridGeometry
->
update
();
...
...
@@ -129,8 +128,8 @@ int main(int argc, char** argv) try
auto
couplingManager
=
std
::
make_shared
<
CouplingManager
>
();
// the problems (boundary conditions)
using
BulkProblem
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
Problem
)
;
using
LowDimProblem
=
typename
GET_PROP_TYPE
(
LowDimProblemTypeTag
,
Problem
)
;
using
BulkProblem
=
GetPropType
<
BulkProblemTypeTag
,
Properties
::
Problem
>
;
using
LowDimProblem
=
GetPropType
<
LowDimProblemTypeTag
,
Properties
::
Problem
>
;
auto
bulkSpatialParams
=
std
::
make_shared
<
typename
BulkProblem
::
SpatialParams
>
(
bulkFvGridGeometry
,
"Bulk"
);
auto
bulkProblem
=
std
::
make_shared
<
BulkProblem
>
(
bulkFvGridGeometry
,
bulkSpatialParams
,
couplingManager
,
"Bulk"
);
auto
lowDimSpatialParams
=
std
::
make_shared
<
typename
LowDimProblem
::
SpatialParams
>
(
lowDimFvGridGeometry
,
"LowDim"
);
...
...
@@ -152,8 +151,8 @@ int main(int argc, char** argv) try
couplingManager
->
init
(
bulkProblem
,
lowDimProblem
,
couplingMapper
,
x
);
// the grid variables
using
BulkGridVariables
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
GridVariables
)
;
using
LowDimGridVariables
=
typename
GET_PROP_TYPE
(
LowDimProblemTypeTag
,
GridVariables
)
;
using
BulkGridVariables
=
GetPropType
<
BulkProblemTypeTag
,
Properties
::
GridVariables
>
;
using
LowDimGridVariables
=
GetPropType
<
LowDimProblemTypeTag
,
Properties
::
GridVariables
>
;
auto
bulkGridVariables
=
std
::
make_shared
<
BulkGridVariables
>
(
bulkProblem
,
bulkFvGridGeometry
);
auto
lowDimGridVariables
=
std
::
make_shared
<
LowDimGridVariables
>
(
lowDimProblem
,
lowDimFvGridGeometry
);
bulkGridVariables
->
init
(
x
[
bulkId
]);
...
...
@@ -165,13 +164,9 @@ int main(int argc, char** argv) try
VtkOutputModule
<
BulkGridVariables
,
BulkSolutionVector
>
bulkVtkWriter
(
*
bulkGridVariables
,
x
[
bulkId
],
bulkProblem
->
name
(),
"Bulk"
);
VtkOutputModule
<
LowDimGridVariables
,
LowDimSolutionVector
>
lowDimVtkWriter
(
*
lowDimGridVariables
,
x
[
lowDimId
],
lowDimProblem
->
name
(),
"LowDim"
);
// container for the output of the exact solutions
std
::
vector
<
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
Scalar
)
>
bulkExact
;
std
::
vector
<
typename
GET_PROP_TYPE
(
LowDimProblemTypeTag
,
Scalar
)
>
lowDimExact
;
// Add model specific output fields
using
BulkIOFields
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
IOFields
)
;
using
LowDimIOFields
=
typename
GET_PROP_TYPE
(
LowDimProblemTypeTag
,
IOFields
)
;
using
BulkIOFields
=
GetPropType
<
BulkProblemTypeTag
,
Properties
::
IOFields
>
;
using
LowDimIOFields
=
GetPropType
<
LowDimProblemTypeTag
,
Properties
::
IOFields
>
;
BulkIOFields
::
initOutputModule
(
bulkVtkWriter
);
LowDimIOFields
::
initOutputModule
(
lowDimVtkWriter
);
...
...
test/multidomain/facet/1p_1p/linearprofile/problem_bulk.hh
View file @
033389f9
...
...
@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief The problem for the bulk domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_BULKPROBLEM_HH
...
...
@@ -48,23 +47,33 @@ namespace Dumux {
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
));
namespace
TTag
{
struct
OnePBulk
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePBulkTpfa
{
using
InheritsFrom
=
std
::
tuple
<
CCTpfaFacetCouplingModel
,
OnePBulk
>
;
};
}
// end namespace TTag
// Set the grid type
SET_TYPE_PROP
(
OnePBulk
,
Grid
,
BULKGRIDTYPE
);
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePBulk
>
{
using
type
=
BULKGRIDTYPE
;
};
// 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
::
Constant
<
1
,
Scalar
>
>
;
};
...
...
@@ -81,7 +90,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
;
...
...
@@ -93,9 +102,9 @@ 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
BoundaryTypes
=
GetPropType
<
TypeTag
,
Properties
::
BoundaryTypes
>
;
using
CouplingManager
=
GetPropType
<
TypeTag
,
Properties
::
CouplingManager
>
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
public:
OnePBulkProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
...
...
test/multidomain/facet/1p_1p/linearprofile/problem_lowdim.hh
View file @
033389f9
...
...
@@ -21,7 +21,6 @@
* \ingroup FacetTests
* \brief The problem for the lower-dimensional domain in the single-phase facet coupling test.
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_ONEP_LOWDIMPROBLEM_HH
...
...
@@ -48,23 +47,33 @@ namespace Dumux {
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
));
namespace
TTag
{
struct
OnePLowDim
{
using
InheritsFrom
=
std
::
tuple
<
OneP
>
;
};
struct
OnePLowDimTpfa
{
using
InheritsFrom
=
std
::
tuple
<
OnePLowDim
,
CCTpfaModel
>
;
};
}
// end namespace TTag
// Set the grid type
SET_TYPE_PROP
(
OnePLowDim
,
Grid
,
LOWDIMGRIDTYPE
);
template
<
class
TypeTag
>
struct
Grid
<
TypeTag
,
TTag
::
OnePLowDim
>
{
using
type
=
LOWDIMGRIDTYPE
;
};
// 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
::
Constant
<
1
,
Scalar
>
>
;
};
...
...
@@ -80,7 +89,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
;
...
...
@@ -92,9 +101,9 @@ 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
BoundaryTypes
=
GetPropType
<
TypeTag
,
Properties
::
BoundaryTypes
>
;
using
CouplingManager
=
GetPropType
<
TypeTag
,
Properties
::
CouplingManager
>
;
using
NumEqVector
=
GetPropType
<
TypeTag
,
Properties
::
NumEqVector
>
;
public:
OnePLowDimProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
...
...
Timo Koch
@timok
mentioned in commit
2f1dc736
·
Dec 20, 2018
mentioned in commit
2f1dc736
mentioned in commit 2f1dc7363795f015ed0a3506cf8d8300d1425b51
Toggle commit list
Timo Koch
@timok
mentioned in merge request
!1459 (merged)
·
Dec 20, 2018
mentioned in merge request
!1459 (merged)
mentioned in merge request !1459
Toggle commit list
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