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
a7b1ba9b
Commit
a7b1ba9b
authored
Nov 12, 2018
by
Kilian Weishaupt
Committed by
Timo Koch
Nov 13, 2018
Browse files
[test][facet] Remove setCouplingManager()
parent
ba043595
Changes
7
Hide whitespace changes
Inline
Side-by-side
test/multidomain/facet/1p_1p/analytical/main.cc
View file @
a7b1ba9b
...
...
@@ -224,16 +224,20 @@ int main(int argc, char** argv) try
updateBulkFVGridGeometry
(
*
bulkFvGridGeometry
,
gridManager
,
lowDimGridView
);
lowDimFvGridGeometry
->
update
();
// the coupling manager
using
TestTraits
=
TestTraits
<
BulkProblemTypeTag
,
LowDimProblemTypeTag
>
;
using
CouplingManager
=
typename
TestTraits
::
CouplingManager
;
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
);
auto
bulkSpatialParams
=
std
::
make_shared
<
typename
BulkProblem
::
SpatialParams
>
(
bulkFvGridGeometry
,
"Bulk"
);
auto
bulkProblem
=
std
::
make_shared
<
BulkProblem
>
(
bulkFvGridGeometry
,
bulkSpatialParams
,
"Bulk"
);
auto
bulkProblem
=
std
::
make_shared
<
BulkProblem
>
(
bulkFvGridGeometry
,
bulkSpatialParams
,
couplingManager
,
"Bulk"
);
auto
lowDimSpatialParams
=
std
::
make_shared
<
typename
LowDimProblem
::
SpatialParams
>
(
lowDimFvGridGeometry
,
"LowDim"
);
auto
lowDimProblem
=
std
::
make_shared
<
LowDimProblem
>
(
lowDimFvGridGeometry
,
lowDimSpatialParams
,
"LowDim"
);
auto
lowDimProblem
=
std
::
make_shared
<
LowDimProblem
>
(
lowDimFvGridGeometry
,
lowDimSpatialParams
,
couplingManager
,
"LowDim"
);
// the solution vector
using
TestTraits
=
TestTraits
<
BulkProblemTypeTag
,
LowDimProblemTypeTag
>
;
using
MDTraits
=
typename
TestTraits
::
MDTraits
;
using
SolutionVector
=
typename
MDTraits
::
SolutionVector
;
SolutionVector
x
;
...
...
@@ -249,15 +253,9 @@ int main(int argc, char** argv) try
auto
couplingMapper
=
std
::
make_shared
<
typename
TestTraits
::
CouplingMapper
>
();
couplingMapper
->
update
(
*
bulkFvGridGeometry
,
*
lowDimFvGridGeometry
,
gridManager
.
getEmbeddings
());
// the coupling manager
using
CouplingManager
=
typename
TestTraits
::
CouplingManager
;
auto
couplingManager
=
std
::
make_shared
<
CouplingManager
>
();
// initialize the coupling manager
couplingManager
->
init
(
bulkProblem
,
lowDimProblem
,
couplingMapper
,
x
);
// set coupling manager pointer in sub-problems
bulkProblem
->
setCouplingManager
(
couplingManager
);
lowDimProblem
->
setCouplingManager
(
couplingManager
);
// the grid variables
using
BulkGridVariables
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
GridVariables
);
using
LowDimGridVariables
=
typename
GET_PROP_TYPE
(
LowDimProblemTypeTag
,
GridVariables
);
...
...
test/multidomain/facet/1p_1p/analytical/problem_bulk.hh
View file @
a7b1ba9b
...
...
@@ -95,8 +95,10 @@ class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
public:
OnePBulkProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr
,
const
std
::
string
&
paramGroup
=
"Bulk"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
couplingManagerPtr_
(
couplingManagerPtr
)
,
lowDimPermeability_
(
getParam
<
Scalar
>
(
"LowDim.SpatialParams.Permeability"
))
,
aperture_
(
getParam
<
Scalar
>
(
"Problem.FractureAperture"
))
{
...
...
@@ -189,10 +191,6 @@ public:
Scalar
temperature
()
const
{
return
283.15
;
/*10°*/
}
//! sets the pointer to the coupling manager.
void
setCouplingManager
(
std
::
shared_ptr
<
CouplingManager
>
cm
)
{
couplingManagerPtr_
=
cm
;
}
//! returns reference to the coupling manager.
const
CouplingManager
&
couplingManager
()
const
{
return
*
couplingManagerPtr_
;
}
...
...
test/multidomain/facet/1p_1p/analytical/problem_lowdim.hh
View file @
a7b1ba9b
...
...
@@ -95,8 +95,10 @@ class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
public:
OnePLowDimProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr
,
const
std
::
string
&
paramGroup
=
"LowDim"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
couplingManagerPtr_
(
couplingManagerPtr
)
,
aperture_
(
getParam
<
Scalar
>
(
"Problem.FractureAperture"
))
{
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
...
...
@@ -158,10 +160,6 @@ public:
Scalar
temperature
()
const
{
return
283.15
;
/*10°*/
}
//! sets the pointer to the coupling manager.
void
setCouplingManager
(
std
::
shared_ptr
<
CouplingManager
>
cm
)
{
couplingManagerPtr_
=
cm
;
}
//! returns reference to the coupling manager.
const
CouplingManager
&
couplingManager
()
const
{
return
*
couplingManagerPtr_
;
}
...
...
test/multidomain/facet/1p_1p/threedomain/main.cc
View file @
a7b1ba9b
...
...
@@ -122,16 +122,20 @@ int main(int argc, char** argv) try
facetFvGridGeometry
->
update
();
edgeFvGridGeometry
->
update
();
// the coupling manager
using
CouplingManager
=
typename
TestTraits
::
CouplingManager
;
auto
couplingManager
=
std
::
make_shared
<
CouplingManager
>
();
// the problems (boundary conditions)
using
BulkProblem
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
Problem
);
using
FacetProblem
=
typename
GET_PROP_TYPE
(
FacetProblemTypeTag
,
Problem
);
using
EdgeProblem
=
typename
GET_PROP_TYPE
(
EdgeProblemTypeTag
,
Problem
);
auto
bulkSpatialParams
=
std
::
make_shared
<
typename
BulkProblem
::
SpatialParams
>
(
bulkFvGridGeometry
,
"Bulk"
);
auto
bulkProblem
=
std
::
make_shared
<
BulkProblem
>
(
bulkFvGridGeometry
,
bulkSpatialParams
,
"Bulk"
);
auto
bulkProblem
=
std
::
make_shared
<
BulkProblem
>
(
bulkFvGridGeometry
,
bulkSpatialParams
,
couplingManager
,
"Bulk"
);
auto
facetSpatialParams
=
std
::
make_shared
<
typename
FacetProblem
::
SpatialParams
>
(
facetFvGridGeometry
,
"Facet"
);
auto
facetProblem
=
std
::
make_shared
<
FacetProblem
>
(
facetFvGridGeometry
,
facetSpatialParams
,
"Facet"
);
auto
facetProblem
=
std
::
make_shared
<
FacetProblem
>
(
facetFvGridGeometry
,
facetSpatialParams
,
couplingManager
,
"Facet"
);
auto
edgeSpatialParams
=
std
::
make_shared
<
typename
EdgeProblem
::
SpatialParams
>
(
edgeFvGridGeometry
,
"Edge"
);
auto
edgeProblem
=
std
::
make_shared
<
EdgeProblem
>
(
edgeFvGridGeometry
,
edgeSpatialParams
,
"Edge"
);
auto
edgeProblem
=
std
::
make_shared
<
EdgeProblem
>
(
edgeFvGridGeometry
,
edgeSpatialParams
,
couplingManager
,
"Edge"
);
// the solution vector
using
Traits
=
typename
TestTraits
::
MDTraits
;
...
...
@@ -153,16 +157,9 @@ int main(int argc, char** argv) try
auto
couplingMapper
=
std
::
make_shared
<
CouplingMapper
>
();
couplingMapper
->
update
(
*
bulkFvGridGeometry
,
*
facetFvGridGeometry
,
*
edgeFvGridGeometry
,
gridManager
.
getEmbeddings
());
// the coupling manager
using
CouplingManager
=
typename
TestTraits
::
CouplingManager
;
auto
couplingManager
=
std
::
make_shared
<
CouplingManager
>
();
// initialize the coupling manager
couplingManager
->
init
(
bulkProblem
,
facetProblem
,
edgeProblem
,
couplingMapper
,
x
);
// set coupling manager pointer in sub-problems
bulkProblem
->
setCouplingManager
(
couplingManager
);
facetProblem
->
setCouplingManager
(
couplingManager
);
edgeProblem
->
setCouplingManager
(
couplingManager
);
// the grid variables
using
BulkGridVariables
=
typename
GET_PROP_TYPE
(
BulkProblemTypeTag
,
GridVariables
);
using
FacetGridVariables
=
typename
GET_PROP_TYPE
(
FacetProblemTypeTag
,
GridVariables
);
...
...
test/multidomain/facet/1p_1p/threedomain/problem_bulk.hh
View file @
a7b1ba9b
...
...
@@ -96,8 +96,10 @@ public:
//! The constructor
OnePBulkProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr
,
const
std
::
string
&
paramGroup
=
"Bulk"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
couplingManagerPtr_
(
couplingManagerPtr
)
{
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
}
...
...
@@ -157,10 +159,6 @@ public:
const
CouplingManager
&
couplingManager
()
const
{
return
*
couplingManagerPtr_
;
}
//! sets the pointer to the coupling manager.
void
setCouplingManager
(
std
::
shared_ptr
<
CouplingManager
>
cm
)
{
couplingManagerPtr_
=
cm
;
}
private:
std
::
string
problemName_
;
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
...
...
test/multidomain/facet/1p_1p/threedomain/problem_edge.hh
View file @
a7b1ba9b
...
...
@@ -100,8 +100,10 @@ public:
//! The constructor
OnePEdgeProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr
,
const
std
::
string
&
paramGroup
=
"Edge"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
couplingManagerPtr_
(
couplingManagerPtr
)
{
const
auto
a
=
getParam
<
Scalar
>
(
"Extrusion.Aperture"
);
exFactor_
=
a
*
a
;
...
...
@@ -155,14 +157,10 @@ public:
const
CouplingManager
&
couplingManager
()
const
{
return
*
couplingManagerPtr_
;
}
//! sets the pointer to the coupling manager.
void
setCouplingManager
(
std
::
shared_ptr
<
CouplingManager
>
cm
)
{
couplingManagerPtr_
=
cm
;
}
private:
Scalar
exFactor_
;
std
::
string
problemName_
;
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
std
::
string
problemName_
;
Scalar
exFactor_
;
};
}
// end namespace Dumux
...
...
test/multidomain/facet/1p_1p/threedomain/problem_facet.hh
View file @
a7b1ba9b
...
...
@@ -100,8 +100,10 @@ public:
//! The constructor
OnePFacetProblem
(
std
::
shared_ptr
<
const
FVGridGeometry
>
fvGridGeometry
,
std
::
shared_ptr
<
typename
ParentType
::
SpatialParams
>
spatialParams
,
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr
,
const
std
::
string
&
paramGroup
=
"Facet"
)
:
ParentType
(
fvGridGeometry
,
spatialParams
,
paramGroup
)
,
couplingManagerPtr_
(
couplingManagerPtr
)
,
aperture_
(
getParam
<
Scalar
>
(
"Extrusion.Aperture"
))
{
problemName_
=
getParam
<
std
::
string
>
(
"Vtk.OutputName"
)
+
"_"
+
getParamFromGroup
<
std
::
string
>
(
this
->
paramGroup
(),
"Problem.Name"
);
...
...
@@ -169,14 +171,10 @@ public:
const
CouplingManager
&
couplingManager
()
const
{
return
*
couplingManagerPtr_
;
}
//! sets the pointer to the coupling manager.
void
setCouplingManager
(
std
::
shared_ptr
<
CouplingManager
>
cm
)
{
couplingManagerPtr_
=
cm
;
}
private:
Scalar
aperture_
;
std
::
string
problemName_
;
std
::
shared_ptr
<
CouplingManager
>
couplingManagerPtr_
;
std
::
string
problemName_
;
Scalar
aperture_
;
};
}
// end namespace Dumux
...
...
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