Skip to content
Snippets Groups Projects
Commit 9c436724 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Make EmbeddedGlobalGFEFunction a callable (accepting global coordinates)

parent c3c21530
No related branches found
No related tags found
No related merge requests found
......@@ -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
{
......
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