diff --git a/dune/xt/grid/walker.hh b/dune/xt/grid/walker.hh index eb08e3acf4cadd2568d79af5b9712d52b758c6a8..6fea6a74b993f778c99b42b69f450af12f909a4d 100644 --- a/dune/xt/grid/walker.hh +++ b/dune/xt/grid/walker.hh @@ -302,59 +302,6 @@ public: ApplyOn::LambdaFilteredIntersections<GL>(intersection_filter)); } - /** - * \} - * \name These methods can be used to append another Walker. - * \{ - */ - - /** - * \note The other_walker will be applied on the intersection of the given element_filter (intersection_filter) and - * the filters of its ElementFunctors (IntersectionFunctors). - * \sa WalkerWrapper - */ - ThisType& append(Walker<GL>& other_walker, - const ElementFilter<GL>& element_filter = ApplyOn::AllElements<GL>(), - const IntersectionFilter<GL>& intersection_filter = ApplyOn::AllIntersections<GL>()) - { - if (&other_walker == this) - DUNE_THROW(Common::Exceptions::you_are_using_this_wrong, "Do not append a Walker to itself!"); - emplace_all(element_and_intersection_functor_wrappers_, other_walker, element_filter, intersection_filter); - return *this; - } - - /** - * \note The other_walker will be applied on the intersection of the given element_filter (intersection_filter) and - * the filters of its ElementFunctors (IntersectionFunctors). - * \sa WalkerWrapper - */ - ThisType& append(Walker<GL>& other_walker, - const IntersectionFilter<GL>& intersection_filter, - const ElementFilter<GL>& element_filter = new ApplyOn::AllElements<GL>()) - { - if (&other_walker == this) - DUNE_THROW(Common::Exceptions::you_are_using_this_wrong, "Do not append a Walker to itself!"); - emplace_all(element_and_intersection_functor_wrappers_, other_walker, element_filter, intersection_filter); - return *this; - } - - /** - * \note The other_walker will be applied on the intersection of the given element_filter (intersection_filter) and - * the filters of its ElementFunctors (IntersectionFunctors). - * \sa WalkerWrapper - */ - ThisType& - append(Walker<GL>& other_walker, ViewElementFunction element_filter, ViewIntersectionFunction intersection_filter) - { - if (&other_walker == this) - DUNE_THROW(Common::Exceptions::you_are_using_this_wrong, "Do not append a Walker to itself!"); - emplace_all(element_and_intersection_functor_wrappers_, - other_walker, - ApplyOn::LambdaFilteredElements<GL>(element_filter), - ApplyOn::LambdaFilteredIntersections<GL>(intersection_filter)); - return *this; - } - /** * \} * \name These methods are required by ElementAndIntersectionFunctor. @@ -575,8 +522,6 @@ private: } // .. walk elements } // ... walk_range(...) - friend class internal::WalkerWrapper<GridViewType>; - GridViewType grid_view_; bool user_decided_agains_clearing_of_functors_; Common::PerThreadValue<std::list<std::shared_ptr<internal::ElementFunctorWrapper<GridViewType>>>> diff --git a/dune/xt/grid/walker/wrapper.hh b/dune/xt/grid/walker/wrapper.hh index c796c0551dfe4b5df4c4dad1d1eb32e3220f0e1f..c9a5e9cbf29a4374a5a3e12d885b05c06601118a 100644 --- a/dune/xt/grid/walker/wrapper.hh +++ b/dune/xt/grid/walker/wrapper.hh @@ -189,67 +189,6 @@ private: }; // class ElementAndIntersectionFunctorWrapper -/** - * \brief To be used within the \sa Walker as internal storage type. - * \note Most likely you do not want to use this class directly, but instead append() a Walker to a Walker. - */ -template <class GL> -class WalkerWrapper : public ElementAndIntersectionFunctorWrapper<GL> -{ - using BaseType = ElementAndIntersectionFunctorWrapper<GL>; - using ThisType = WalkerWrapper<GL>; - -public: - using typename BaseType::ElementFilterType; - using typename BaseType::IntersectionFilterType; - - /** - * \attention Takes ownership of element_filtr_ptr, do not delete manually! - * \attention Takes ownership of intersection_filtr_ptr, do not delete manually! - */ - WalkerWrapper(Walker<GL>& walkr, - const ElementFilterType*&& element_filtr_ptr, - const IntersectionFilterType*&& intersection_filtr_ptr) - : BaseType(walkr, - new ApplyOn::LambdaFilteredElements<GL>([&](const auto& grid_layer, const auto& element) { - if (restriction_element_filter_.access().contains(grid_layer, element)) { - for (const auto& wrapper : walkr.element_functor_wrappers_) { - if (wrapper->filter().contains(grid_layer, element)) - return true; - } - for (const auto& wrapper : walkr.element_and_intersection_functor_wrappers_) { - if (wrapper->element_filter().contains(grid_layer, element)) - return true; - } - return false; - } else - return false; - }), - new ApplyOn::LambdaFilteredIntersections<GL>([&](const auto& grid_layer, const auto& intersection) { - if (restriction_intersection_filter_.access().contains(grid_layer, intersection)) { - for (const auto& wrapper : walkr.intersection_functor_wrappers_) { - if (wrapper->filter().contains(grid_layer, intersection)) - return true; - } - for (const auto& wrapper : walkr.element_and_intersection_functor_wrappers_) { - if (wrapper->intersection_filter().contains(grid_layer, intersection)) - return true; - } - return false; - } else - return false; - })) - , restriction_element_filter_(std::move(element_filtr_ptr)) - , restriction_intersection_filter_(std::move(intersection_filtr_ptr)) - { - } - -private: - const Common::ConstStorageProvider<ElementFilterType> restriction_element_filter_; - const Common::ConstStorageProvider<IntersectionFilterType> restriction_intersection_filter_; -}; // class WalkerWrapper - - } // namespace internal } // namespace Grid } // namespace XT