diff --git a/dune/gfe/embeddedglobalgfefunction.hh b/dune/gfe/embeddedglobalgfefunction.hh index 724d82595ce82fd10e640958e4a6bfa38059857a..863f0d375e78818137e6de13edeb382d462b0a34 100644 --- a/dune/gfe/embeddedglobalgfefunction.hh +++ b/dune/gfe/embeddedglobalgfefunction.hh @@ -53,6 +53,18 @@ public: out = this->operator()(element,local); } + /** \brief Global evaluation */ + typename TargetSpace::CoordinateType operator()(const Dune::FieldVector<ctype,gridDim>& global) const + { + HierarchicSearch<typename GridView::Grid,typename GridView::IndexSet> hierarchicSearch(basis_.gridView().grid(), + basis_.gridView().indexSet()); + + auto element = hierarchicSearch.findEntity(global); + auto localPos = element.geometry().local(global); + + return this->operator()(element,localPos); + } + /** \brief Evaluate the function at local coordinates. */ typename TargetSpace::CoordinateType operator()(const Element& element, const Dune::FieldVector<ctype,gridDim>& local) const {