diff --git a/dune/gfe/tensorssd.hh b/dune/gfe/tensorssd.hh index 356de74cb9b74b80caa1211cefcaaed73202f9de..5064611bf9fd4b3c479cfb070dad8979dbb618bd 100644 --- a/dune/gfe/tensorssd.hh +++ b/dune/gfe/tensorssd.hh @@ -40,17 +40,21 @@ public: default: assert(false); } + // Make compiler happy even if NDEBUG is set + return 0; } /** \brief Direct access to individual entries */ T& operator()(size_t i, size_t j, size_t k) { + assert(i<N1 && j<N2 && k<N3_); return data_[i][j][k]; } /** \brief Direct const access to individual entries */ const T& operator()(size_t i, size_t j, size_t k) const { + assert(i<N1 && j<N2 && k<N3_); return data_[i][j][k]; }