Skip to content
Snippets Groups Projects
Commit 1211f9f3 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[freeflow][boundarytypes] Forbid setting everything to Dirichlet/Neumann

* not a valid combination
parent 6a3e6015
No related branches found
No related tags found
1 merge request!953Feature/improve ff boundary
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
#ifndef STAGGERED_FREEFLOW_BOUNDARY_TYPES_HH #ifndef STAGGERED_FREEFLOW_BOUNDARY_TYPES_HH
#define STAGGERED_FREEFLOW_BOUNDARY_TYPES_HH #define STAGGERED_FREEFLOW_BOUNDARY_TYPES_HH
#include <dumux/common/properties.hh>
#include <dumux/common/boundarytypes.hh> #include <dumux/common/boundarytypes.hh>
#include <dumux/common/typetraits/typetraits.hh>
namespace Dumux namespace Dumux
{ {
...@@ -102,6 +102,23 @@ public: ...@@ -102,6 +102,23 @@ public:
bool isSymmetry() const bool isSymmetry() const
{ return boundaryInfo_[0].isSymmetry; } { return boundaryInfo_[0].isSymmetry; }
/*!
* \brief Prevent setting all boundary conditions to Dirichlet.
*/
template<class T = void>
void setAllDirichlet()
{
static_assert(AlwaysFalse<T>::value, "Setting all boundary types to Dirichlet not permitted!");
}
/*!
* \brief Prevent setting all boundary conditions to Neumann.
*/
template<class T = void>
void setAllNeumann()
{
static_assert(AlwaysFalse<T>::value, "Setting all boundary types to Neumann not permitted!");
}
protected: protected:
struct StaggeredFreeFlowBoundaryInfo { struct StaggeredFreeFlowBoundaryInfo {
......
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