From f1d777604e847194c107c79a98531d8bb4bd8d52 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Sun, 4 Apr 2021 20:26:18 +0000 Subject: [PATCH] [navierstokes] Add outflow to Navier-Stokes boundary types --- dumux/freeflow/navierstokes/boundarytypes.hh | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dumux/freeflow/navierstokes/boundarytypes.hh b/dumux/freeflow/navierstokes/boundarytypes.hh index 1f58045f1a..c5fc86f1c1 100644 --- a/dumux/freeflow/navierstokes/boundarytypes.hh +++ b/dumux/freeflow/navierstokes/boundarytypes.hh @@ -54,6 +54,7 @@ public: boundaryInfo_[eqIdx].isSymmetry = false; boundaryInfo_[eqIdx].isBeaversJoseph = false; + boundaryInfo_[eqIdx].isOutflow = false; } /*! @@ -123,11 +124,39 @@ public: return false; } + /*! + * \brief Set an outflow boundary condition + */ + void setOutflow(const int eqIdx) + { + resetEq(eqIdx); + boundaryInfo_[eqIdx].isOutflow = true; + } + + /*! + * \brief Returns true if an outflow boundary condition was set + * \param eqIdx The index of the equation + */ + bool isOutflow(const int eqIdx) const + { return boundaryInfo_[eqIdx].isOutflow; } + + /*! + * \brief Returns true if some equation has an outflow boundary condition + */ + bool hasOutflow() const + { + for (int i = 0; i < numEq; ++i) + if (boundaryInfo_[i].isOutflow) + return true; + return false; + } + protected: //! use bitfields to minimize the size struct NavierStokesBoundaryInfo { bool isSymmetry : 1; + bool isOutflow : 1; bool isBeaversJoseph : 1; }; -- GitLab