Commit 9df7f08c authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Ned Coltman
Browse files

[staggered][freeflow] Replace isBJS with isBeaversJoseph and deprecate old interface

parent fea3993e
...@@ -31,7 +31,7 @@ namespace Dumux { ...@@ -31,7 +31,7 @@ namespace Dumux {
/*! /*!
* \ingroup StaggeredDiscretization * \ingroup StaggeredDiscretization
* \brief Class to specify the type of a boundary for the staggered Navier-Stokes model. * \brief Class to specify the type of a boundary condition for the staggered Navier-Stokes model.
*/ */
template <int numEq> template <int numEq>
class StaggeredFreeFlowBoundaryTypes : public Dumux::BoundaryTypes<numEq> class StaggeredFreeFlowBoundaryTypes : public Dumux::BoundaryTypes<numEq>
...@@ -41,7 +41,6 @@ class StaggeredFreeFlowBoundaryTypes : public Dumux::BoundaryTypes<numEq> ...@@ -41,7 +41,6 @@ class StaggeredFreeFlowBoundaryTypes : public Dumux::BoundaryTypes<numEq>
public: public:
StaggeredFreeFlowBoundaryTypes() StaggeredFreeFlowBoundaryTypes()
{ {
for (int eqIdx=0; eqIdx < numEq; ++eqIdx) for (int eqIdx=0; eqIdx < numEq; ++eqIdx)
resetEq(eqIdx); resetEq(eqIdx);
} }
...@@ -55,7 +54,7 @@ public: ...@@ -55,7 +54,7 @@ public:
boundaryInfo_[eqIdx].visited = false; boundaryInfo_[eqIdx].visited = false;
boundaryInfo_[eqIdx].isSymmetry = false; boundaryInfo_[eqIdx].isSymmetry = false;
boundaryInfo_[eqIdx].isBJS = false; boundaryInfo_[eqIdx].isBeaversJoseph = false;
} }
/*! /*!
...@@ -99,11 +98,19 @@ public: ...@@ -99,11 +98,19 @@ public:
* \brief Set a boundary condition for a single equation to * \brief Set a boundary condition for a single equation to
* Beavers-Joseph-Saffman (special case of Dirichlet b.c.). * Beavers-Joseph-Saffman (special case of Dirichlet b.c.).
*/ */
[[deprecated("Use setBeaversJoseph instead. Will be removed after 3.2")]]
void setBJS(int eqIdx) void setBJS(int eqIdx)
{ setBeaversJoseph(eqIdx); }
/*!
* \brief Set a boundary condition for a single equation to
* Beavers-Joseph(-Saffmann) (special case of Dirichlet b.c.).
*/
void setBeaversJoseph(unsigned eqIdx)
{ {
resetEq(eqIdx); resetEq(eqIdx);
boundaryInfo_[eqIdx].visited = true; boundaryInfo_[eqIdx].visited = true;
boundaryInfo_[eqIdx].isBJS = true; boundaryInfo_[eqIdx].isBeaversJoseph = true;
} }
/*! /*!
...@@ -112,28 +119,45 @@ public: ...@@ -112,28 +119,45 @@ public:
* *
* \param eqIdx The index of the equation * \param eqIdx The index of the equation
*/ */
[[deprecated("Use isBeaversJoseph instead. Will be removed after 3.2")]]
bool isBJS(unsigned eqIdx) const bool isBJS(unsigned eqIdx) const
{ { return isBeaversJoseph(eqIdx); }
return boundaryInfo_[eqIdx].isBJS;
} /*!
* \brief Returns true if an equation is used to specify a
* Beavers-Joseph(-Saffman) boundary condition.
*
* \param eqIdx The index of the equation
*/
bool isBeaversJoseph(unsigned eqIdx) const
{ return boundaryInfo_[eqIdx].isBeaversJoseph; }
/*! /*!
* \brief Returns true if some equation is used to specify a * \brief Returns true if some equation is used to specify a
* Beavers-Joseph-Saffman boundary condition. * Beavers-Joseph-Saffman boundary condition.
*/ */
[[deprecated("Use hasBeaversJoseph instead. Will be removed after 3.2")]]
bool hasBJS() const bool hasBJS() const
{ return hasBeaversJoseph(); }
/*!
* \brief Returns true if some equation is used to specify a
* Beavers-Joseph(-Saffman) boundary condition.
*/
bool hasBeaversJoseph() const
{ {
for (int i = 0; i < numEq; ++i) for (int i = 0; i < numEq; ++i)
if (boundaryInfo_[i].isBJS) if (boundaryInfo_[i].isBeaversJoseph)
return true; return true;
return false; return false;
} }
protected: protected:
struct StaggeredFreeFlowBoundaryInfo { struct StaggeredFreeFlowBoundaryInfo
{
bool visited; bool visited;
bool isSymmetry; bool isSymmetry;
bool isBJS; bool isBeaversJoseph;
}; };
std::array<StaggeredFreeFlowBoundaryInfo, numEq> boundaryInfo_; std::array<StaggeredFreeFlowBoundaryInfo, numEq> boundaryInfo_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment