Skip to content
Snippets Groups Projects
Commit 50da2fb9 authored by Robert K's avatar Robert K
Browse files

[feature][GridFunction] Allow to evaluate with only an element assuming

evaluation at local center.
parent 2749fc2f
Branches
Tags
No related merge requests found
Pipeline #76819 failed
......@@ -149,6 +149,14 @@ namespace Dune
pybind11::keep_alive< 0, 1 >(),
pybind11::keep_alive< 0, 2 >() );
cls.def( "__call__", [] ( const GridFunction &self, const Element &element ) {
LocalCoordinate x ( 0.5 );
auto lf = localFunction(self);
lf.bind(element);
auto y = detail::callLocalFunction< LocalCoordinate >( lf, x, PriorityTag<2>() );
lf.unbind();
return int(y);
}, "element"_a );
cls.def( "__call__", [] ( const GridFunction &self, const Element &element, LocalCoordinate &x ) {
auto lf = localFunction(self);
lf.bind(element);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment