From 5c1273468124d1469cf1bbb1274e212b02c9034e Mon Sep 17 00:00:00 2001 From: Felix Schindler <felix.schindler@wwu.de> Date: Wed, 15 Apr 2015 14:04:49 +0200 Subject: [PATCH] [functions.interfaces] add operator* --- dune/stuff/functions/interfaces.hh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dune/stuff/functions/interfaces.hh b/dune/stuff/functions/interfaces.hh index f2ebc5ba0..9752068f7 100644 --- a/dune/stuff/functions/interfaces.hh +++ b/dune/stuff/functions/interfaces.hh @@ -84,10 +84,11 @@ class VisualizationAdapter; template <class MinuendType, class SubtrahendType> class Difference; - template <class LeftSummandType, class RightSummandType> class Sum; +template <class LeftSummandType, class RightSummandType> +class Product; template <class FunctionImp> class Divergence; @@ -399,6 +400,13 @@ public: return SumType(*this, other); } + template <class OtherType> + typename std::enable_if<is_localizable_function<OtherType>::value, Functions::Product<ThisType, OtherType>>::type + operator*(const OtherType& other) const + { + return Functions::Product<ThisType, OtherType>(*this, other); + } + DivergenceType divergence() const { return DivergenceType(*this); -- GitLab