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
04ac52fb
Commit
04ac52fb
authored
Oct 21, 2021
by
Ivan Buntic
Committed by
Timo Koch
Oct 26, 2021
Browse files
[disc][porousmediumflow][co2] Use discretization tag instead of enum as template argument.
parent
ed5e9bcc
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/box/scvftoscvboundarytypes.hh
View file @
04ac52fb
...
...
@@ -34,7 +34,7 @@ namespace Dumux {
* \ingroup BoxDiscretization
* \brief Convert intersection boundary types to vertex boundary types
*/
template
<
class
BoundaryTypes
,
DiscretizationMethod
discMethod
>
template
<
class
BoundaryTypes
,
class
DiscretizationMethod
>
class
ScvfToScvBoundaryTypes
{
public:
...
...
@@ -44,7 +44,7 @@ public:
void
computeBoundaryTypes
(
const
Problem
&
problem
)
{
// only do something for box
if
(
d
iscMethod
==
DiscretizationMethods
::
box
)
if
(
D
isc
retization
Method
{}
==
DiscretizationMethods
::
box
)
{
const
auto
&
gridGeometry
=
problem
.
gridGeometry
();
scvBoundaryTypes
.
resize
(
gridGeometry
.
vertexMapper
().
size
());
...
...
@@ -81,7 +81,7 @@ public:
template
<
class
SubControlVolume
>
const
BoundaryTypes
&
boundaryTypes
(
const
SubControlVolume
&
scv
)
const
{
if
(
d
iscMethod
==
DiscretizationMethods
::
box
)
if
(
D
isc
retization
Method
{}
==
DiscretizationMethods
::
box
)
return
scvBoundaryTypes
[
scv
.
dofIndex
()];
else
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Only use this for the box discretization!"
);
...
...
test/porousmediumflow/co2/problem.hh
View file @
04ac52fb
...
...
@@ -128,7 +128,8 @@ class HeterogeneousProblem : public PorousMediumFlowProblem<TypeTag>
static
constexpr
bool
useMoles
=
ModelTraits
::
useMoles
();
// the discretization method we are using
static
constexpr
auto
discMethod
=
GetPropType
<
TypeTag
,
Properties
::
GridGeometry
>::
discMethod
;
using
DiscretizationMethod
=
DiscretizationMethods
::
Box
;
static
constexpr
DiscretizationMethod
discMethod
{};
static
constexpr
bool
isBox
=
GridGeometry
::
discMethod
==
DiscretizationMethods
::
box
;
// world dimension to access gravity vector
...
...
@@ -445,7 +446,7 @@ private:
// vtk output
std
::
vector
<
Scalar
>
vtkKxx_
,
vtkPorosity_
,
vtkBoxVolume_
,
vtkTemperature_
;
ScvfToScvBoundaryTypes
<
BoundaryTypes
,
d
iscMethod
>
scvfToScvBoundaryTypes_
;
ScvfToScvBoundaryTypes
<
BoundaryTypes
,
D
isc
retization
Method
>
scvfToScvBoundaryTypes_
;
};
}
// 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