diff --git a/dune/fufem/python/function.hh b/dune/fufem/python/function.hh index 6276ce237d2f19b85f9fefc5769501dcf94c413a..ec291661dc2a74d1e41fdb7df0a4a5cf3bfc008d 100644 --- a/dune/fufem/python/function.hh +++ b/dune/fufem/python/function.hh @@ -101,6 +101,14 @@ class PythonFunction : callable_(x).toC(y); } + /** + * \brief Evaluate function + */ + RT operator()(const DT& x) const + { + return callable_(x).template toC<RT>(); + } + protected: Python::Callable callable_; @@ -172,6 +180,14 @@ class DifferentiablePythonFunction : derivative_(x).toC(y); } + /** + * \brief Evaluate function + */ + RT operator()(const DT& x) const + { + return callable_(x).template toC<RT>(); + } + protected: Python::Callable value_;