diff --git a/dune/gfe/unitvector.hh b/dune/gfe/unitvector.hh index d71aaf0994c3606a20e97af197ba62ea6368f00b..4251dae81bf494904a4dd93aa04d8c2f632cb209 100644 --- a/dune/gfe/unitvector.hh +++ b/dune/gfe/unitvector.hh @@ -325,6 +325,10 @@ public: if (data_[N-1] > 0) for (size_t j=0; j<N-1; j++) result[j][N-1] *= -1; + + // normalize the rows to make the orthogonal basis orthonormal + for (size_t i=0; i<N-1; i++) + result[i] /= result[i].two_norm(); return result; }