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
de9cfc6f
Commit
de9cfc6f
authored
May 07, 2020
by
Ned Coltman
Browse files
[test][rans][ransnc] add maybe_unused to appease compiler warnings
parent
fc941467
Changes
2
Hide whitespace changes
Inline
Side-by-side
test/freeflow/rans/problem.hh
View file @
de9cfc6f
...
...
@@ -268,7 +268,7 @@ public:
* \param scv the sub control volume
* \note used for cell-centered discretization schemes
*/
PrimaryVariables
dirichlet
(
const
Element
&
element
,
const
SubControlVolume
&
scv
)
const
PrimaryVariables
dirichlet
(
[[
maybe_unused
]]
const
Element
&
element
,
const
SubControlVolume
&
scv
)
const
{
if
constexpr
(
ModelTraits
::
turbulenceModel
()
==
TurbulenceModel
::
kepsilon
||
ModelTraits
::
turbulenceModel
()
==
TurbulenceModel
::
komega
)
...
...
@@ -320,7 +320,8 @@ private:
{
return
globalPos
[
0
]
>
this
->
gridGeometry
().
bBoxMax
()[
0
]
-
eps_
;
}
//! Initial conditions for the komega, kepsilon and lowrekepsilon turbulence models
void
setInitialAtPos_
(
PrimaryVariables
&
values
,
const
GlobalPosition
&
globalPos
)
const
void
setInitialAtPos_
([[
maybe_unused
]]
PrimaryVariables
&
values
,
[[
maybe_unused
]]
const
GlobalPosition
&
globalPos
)
const
{
if
constexpr
(
numTurbulenceEq
(
ModelTraits
::
turbulenceModel
())
==
0
)
// zero equation models
return
;
...
...
@@ -344,7 +345,8 @@ private:
}
//! Boundary condition types for the one-eq turbulence model
void
setBcTypes_
(
BoundaryTypes
&
values
,
const
GlobalPosition
&
pos
)
const
void
setBcTypes_
([[
maybe_unused
]]
BoundaryTypes
&
values
,
[[
maybe_unused
]]
const
GlobalPosition
&
pos
)
const
{
if
constexpr
(
numTurbulenceEq
(
ModelTraits
::
turbulenceModel
())
==
0
)
// zero equation models
return
;
...
...
@@ -373,14 +375,14 @@ private:
}
template
<
class
Element
,
class
FVElementGeometry
,
class
SubControlVolume
>
bool
isDirichletCell_
(
const
Element
&
element
,
bool
isDirichletCell_
(
[[
maybe_unused
]]
const
Element
&
element
,
const
FVElementGeometry
&
fvGeometry
,
const
SubControlVolume
&
scv
,
[[
maybe_unused
]]
const
SubControlVolume
&
scv
,
const
int
&
pvIdx
)
const
{
if
constexpr
(
ModelTraits
::
turbulenceModel
()
==
TurbulenceModel
::
kepsilon
)
{
const
auto
eIdx
=
this
->
gridGeometry
().
elementMapper
().
index
(
element
);
const
auto
eIdx
=
fvGeometry
.
gridGeometry
().
elementMapper
().
index
(
element
);
// For the kepsilon model we set fixed values within the matching point and at the wall
if
(
this
->
inNearWallRegion
(
eIdx
))
return
pvIdx
==
Indices
::
turbulentKineticEnergyEqIdx
||
pvIdx
==
Indices
::
dissipationEqIdx
;
...
...
test/freeflow/ransnc/problem.hh
View file @
de9cfc6f
...
...
@@ -288,7 +288,7 @@ public:
* \param scv the sub control volume
* \note used for cell-centered discretization schemes
*/
PrimaryVariables
dirichlet
(
const
Element
&
element
,
const
SubControlVolume
&
scv
)
const
PrimaryVariables
dirichlet
(
[[
maybe_unused
]]
const
Element
&
element
,
const
SubControlVolume
&
scv
)
const
{
if
constexpr
(
ModelTraits
::
turbulenceModel
()
==
TurbulenceModel
::
kepsilon
||
ModelTraits
::
turbulenceModel
()
==
TurbulenceModel
::
komega
)
...
...
@@ -341,7 +341,8 @@ private:
{
return
globalPos
[
0
]
>
this
->
gridGeometry
().
bBoxMax
()[
0
]
-
eps_
;
}
//! Initial conditions for the komega, kepsilon and lowrekepsilon turbulence models
void
setInitialAtPos_
(
PrimaryVariables
&
values
,
const
GlobalPosition
&
globalPos
)
const
void
setInitialAtPos_
([[
maybe_unused
]]
PrimaryVariables
&
values
,
[[
maybe_unused
]]
const
GlobalPosition
&
globalPos
)
const
{
if
constexpr
(
numTurbulenceEq
(
ModelTraits
::
turbulenceModel
())
==
0
)
// zero equation models
return
;
...
...
@@ -365,7 +366,8 @@ private:
}
//! Boundary condition types for the one-eq turbulence model
void
setBcTypes_
(
BoundaryTypes
&
values
,
const
GlobalPosition
&
pos
)
const
void
setBcTypes_
([[
maybe_unused
]]
BoundaryTypes
&
values
,
[[
maybe_unused
]]
const
GlobalPosition
&
pos
)
const
{
if
constexpr
(
numTurbulenceEq
(
ModelTraits
::
turbulenceModel
())
==
0
)
// zero equation models
return
;
...
...
@@ -394,14 +396,14 @@ private:
}
template
<
class
Element
,
class
FVElementGeometry
,
class
SubControlVolume
>
bool
isDirichletCell_
(
const
Element
&
element
,
bool
isDirichletCell_
(
[[
maybe_unused
]]
const
Element
&
element
,
const
FVElementGeometry
&
fvGeometry
,
const
SubControlVolume
&
scv
,
[[
maybe_unused
]]
const
SubControlVolume
&
scv
,
const
int
&
pvIdx
)
const
{
if
constexpr
(
ModelTraits
::
turbulenceModel
()
==
TurbulenceModel
::
kepsilon
)
{
const
auto
eIdx
=
this
->
gridGeometry
().
elementMapper
().
index
(
element
);
const
auto
eIdx
=
fvGeometry
.
gridGeometry
().
elementMapper
().
index
(
element
);
// For the kepsilon model we set fixed values within the matching point and at the wall
if
(
this
->
inNearWallRegion
(
eIdx
))
return
pvIdx
==
Indices
::
turbulentKineticEnergyEqIdx
||
pvIdx
==
Indices
::
dissipationEqIdx
;
...
...
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