diff --git a/dumux/common/boundaryflag.hh b/dumux/common/boundaryflag.hh index abbda33247c7462401c27906df17c6c7d5d392a3..c8a46e5615887412e22f0c502952478065f626f1 100644 --- a/dumux/common/boundaryflag.hh +++ b/dumux/common/boundaryflag.hh @@ -31,6 +31,12 @@ #include <dune/alugrid/grid.hh> #endif +// dune-subgrid specific includes +#if HAVE_DUNE_SUBGRID +#include <dune/subgrid/subgrid.hh> +#endif + + namespace Dumux { /*! @@ -85,6 +91,27 @@ private: }; #endif +#if HAVE_DUNE_SUBGRID +//! dune-subgrid doesn't have this implemented +template<int dim, class HostGrid> +class BoundaryFlag<Dune::SubGrid<dim, HostGrid>> +{ +public: + BoundaryFlag() : flag_(-1) {} + + template<class Intersection> + BoundaryFlag(const Intersection& i) : flag_(-1) {} + + using value_type = int; + + value_type get() const + { DUNE_THROW(Dune::NotImplemented, "Sub-grid doesn't implement boundary segment indices!"); } + +private: + int flag_; +}; +#endif + } // end namespace Dumux #endif