Skip to content
Snippets Groups Projects
Commit 52a8f11d authored by Dennis Gläser's avatar Dennis Gläser
Browse files

Merge branch 'cleanup/replace-ifelse-by-ifconstexpr' into 'master'

[evalsolution] Use if constexpr

See merge request !1958
parents 4f1814fc cd233d7a
No related branches found
No related tags found
1 merge request!1958[evalsolution] Use if constexpr
......@@ -28,7 +28,6 @@
#include <algorithm>
#include <type_traits>
#include <dune/common/hybridutilities.hh>
#include <dune/localfunctions/lagrange/pqkfactory.hh>
#include <dumux/common/typetraits/state.hh>
......@@ -124,10 +123,9 @@ PrimaryVariables evalSolution(const Element& element,
}
// set an arbitrary state if the model requires a state (models constexpr if)
Dune::Hybrid::ifElse(HasState{}, [&](auto&& evalLazy){
if constexpr (HasState{})
if (!ignoreState)
evalLazy(result).setState(evalLazy(elemSol)[0].state());
});
result.setState(elemSol[0].state());
return result;
}
......@@ -199,10 +197,9 @@ PrimaryVariables evalSolution(const Element& element,
}
// set an arbitrary state if the model requires a state (models constexpr if)
Dune::Hybrid::ifElse(HasState{}, [&](auto&& evalLazy){
if constexpr (HasState{})
if (!ignoreState)
evalLazy(result).setState(evalLazy(elemSol)[0].state());
});
result.setState(elemSol[0].state());
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment