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
c4b29ffe
Commit
c4b29ffe
authored
May 31, 2019
by
Dennis Gläser
Committed by
Kilian Weishaupt
Aug 29, 2019
Browse files
[deprecated] add check for deprecated neumann() interface
parent
a4f41830
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/common/deprecated.hh
View file @
c4b29ffe
...
...
@@ -76,6 +76,49 @@ auto effectiveThermalConductivity(const VV& volVars,
{
return
ETC
::
effectiveThermalConductivity
(
volVars
);
}
// support old interface of the neumann() function on problems
template
<
class
E
,
class
FVEG
,
class
EVV
,
class
EFVC
>
class
HasNewNeumannIF
{
using
SCVF
=
typename
FVEG
::
SubControlVolumeFace
;
public:
template
<
class
P
>
auto
operator
()(
P
&&
p
)
->
decltype
(
p
.
neumann
(
std
::
declval
<
const
E
&>
(),
std
::
declval
<
const
FVEG
&>
(),
std
::
declval
<
const
EVV
&>
(),
std
::
declval
<
const
EFVC
&>
(),
std
::
declval
<
const
SCVF
&>
()))
{}
};
template
<
class
P
,
class
E
,
class
FVEG
,
class
EVV
,
class
EFVC
,
typename
std
::
enable_if_t
<!
decltype
(
isValid
(
HasNewNeumannIF
<
E
,
FVEG
,
EVV
,
EFVC
>()).
template
check
<
P
>())
::
value
,
int
>
=
0
>
auto
DUNE_DEPRECATED_MSG
(
"Use new neumann() interface (see common/fvproblem.hh) that additionally receives the element flux variables cache in your problem!. Will be removed after 3.1 release"
)
neumann
(
const
P
&
problem
,
const
E
&
element
,
const
FVEG
&
fvGeometry
,
const
EVV
&
elemVolVars
,
const
EFVC
&
elemFluxVarsCache
,
const
typename
FVEG
::
SubControlVolumeFace
&
scvf
)
{
return
problem
.
neumann
(
element
,
fvGeometry
,
elemVolVars
,
scvf
);
}
template
<
class
P
,
class
E
,
class
FVEG
,
class
EVV
,
class
EFVC
,
typename
std
::
enable_if_t
<
decltype
(
isValid
(
HasNewNeumannIF
<
E
,
FVEG
,
EVV
,
EFVC
>()).
template
check
<
P
>())
::
value
,
int
>
=
0
>
auto
neumann
(
const
P
&
problem
,
const
E
&
element
,
const
FVEG
&
fvGeometry
,
const
EVV
&
elemVolVars
,
const
EFVC
&
elemFluxVarsCache
,
const
typename
FVEG
::
SubControlVolumeFace
&
scvf
)
{
return
problem
.
neumann
(
element
,
fvGeometry
,
elemVolVars
,
elemFluxVarsCache
,
scvf
);
}
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
...
...
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