Skip to content
Snippets Groups Projects
Commit 0b14598f authored by Ned Coltman's avatar Ned Coltman
Browse files

[freeflow][staggeredupwindfluxvars] replace enable_if_t with static assert

parent de347d82
No related branches found
No related tags found
2 merge requests!2134WIP Feature/timestepper test,!2127cleanup/staggeredupwindfluxvars ifconstexpr
...@@ -232,10 +232,10 @@ private: ...@@ -232,10 +232,10 @@ private:
* \param ownScvf The sub control volume face * \param ownScvf The sub control volume face
* \param selfIsUpstream bool describing upstream face. * \param selfIsUpstream bool describing upstream face.
*/ */
template<bool enable = useHigherOrder, std::enable_if_t<enable, int> = 0>
static std::array<Scalar, 3> getFrontalDistances_(const SubControlVolumeFace& ownScvf, static std::array<Scalar, 3> getFrontalDistances_(const SubControlVolumeFace& ownScvf,
const bool selfIsUpstream) const bool selfIsUpstream)
{ {
static_assert(useHigherOrder, "Should only be reached if higher order methods are enabled");
// Depending on selfIsUpstream the downstream and the (up)upstream distances are saved. // Depending on selfIsUpstream the downstream and the (up)upstream distances are saved.
// distances {upstream to downstream distance, up-upstream to upstream distance, downstream staggered cell size} // distances {upstream to downstream distance, up-upstream to upstream distance, downstream staggered cell size}
std::array<Scalar, 3> distances; std::array<Scalar, 3> distances;
...@@ -469,11 +469,11 @@ private: ...@@ -469,11 +469,11 @@ private:
* \param localSubFaceIdx The local index of the subface * \param localSubFaceIdx The local index of the subface
* \param selfIsUpstream bool describing upstream face. * \param selfIsUpstream bool describing upstream face.
*/ */
template<bool enable = useHigherOrder, std::enable_if_t<enable, int> = 0>
static std::array<Scalar, 3> getLateralDistances_(const SubControlVolumeFace& ownScvf, static std::array<Scalar, 3> getLateralDistances_(const SubControlVolumeFace& ownScvf,
const int localSubFaceIdx, const int localSubFaceIdx,
const bool selfIsUpstream) const bool selfIsUpstream)
{ {
static_assert(useHigherOrder, "Should only be reached if higher order methods are enabled");
// distances {upstream to downstream distance, up-upstream to upstream distance, downstream staggered cell size} // distances {upstream to downstream distance, up-upstream to upstream distance, downstream staggered cell size}
std::array<Scalar, 3> distances; std::array<Scalar, 3> distances;
......
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