diff --git a/dune/gfe/realtuple.hh b/dune/gfe/realtuple.hh index 5d47b0d178b959b9b8465589e8b66b5a66042ff0..c1f52db2e40acabdc6345ae94e88ed3beddf0616 100644 --- a/dune/gfe/realtuple.hh +++ b/dune/gfe/realtuple.hh @@ -66,6 +66,17 @@ public: return *this; } + RealTuple& operator-=(const Dune::FieldVector<T,N>& other) { + data_ -= other; + return *this; + } + + template <class T2> + RealTuple& operator-=(const RealTuple<T2,N>& other) { + data_ -= other.data_; + return *this; + } + /** \brief Assigment from RealTuple with different type -- used for automatic differentiation with ADOL-C */ template <class T2> RealTuple& operator <<= (const RealTuple<T2,N>& other) { @@ -74,6 +85,11 @@ public: return *this; } + /** \brief Const random-access operator*/ + T operator[] (const size_t indexVariable ) const { + return data_[indexVariable]; + } + /** \brief Rebind the RealTuple to another coordinate type */ template<class U> struct rebind