diff --git a/dune/gfe/tensor3.hh b/dune/gfe/tensor3.hh index fa18c10c04aa5106ae68681615a0a86b60d6108a..61531f7dfd70a6d0b70a4c9486bb1c9397e5f487 100644 --- a/dune/gfe/tensor3.hh +++ b/dune/gfe/tensor3.hh @@ -147,6 +147,16 @@ class Tensor3 } + Tensor3<T,N1,N2,N3>& operator*=(const T& scalar) + { + for (int i=0; i<N1; i++) + for (int j=0; j<N2; j++) + for (int k=0; k<N3; k++) + (*this)[i][j][k] *= scalar; + + return *this; + } + }; //! Output operator for array