From 766b212df53f00817b2a935318e0e3e21bea29b1 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Tue, 1 Jan 2013 16:16:03 +0000
Subject: [PATCH] properly implement the 'orthonormalFrame' method

[[Imported from SVN: r9080]]
---
 dune/gfe/hyperbolichalfspacepoint.hh | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/dune/gfe/hyperbolichalfspacepoint.hh b/dune/gfe/hyperbolichalfspacepoint.hh
index 96e9a5e8..33e6bdbf 100644
--- a/dune/gfe/hyperbolichalfspacepoint.hh
+++ b/dune/gfe/hyperbolichalfspacepoint.hh
@@ -4,6 +4,8 @@
 #include <dune/common/fvector.hh>
 #include <dune/common/fmatrix.hh>
 
+#include <dune/istl/scaledidmatrix.hh>
+
 #include <dune/gfe/tensor3.hh>
 
 /** \brief A point in the hyperbolic half-space H^N
@@ -338,15 +340,9 @@ public:
     */
     Dune::FieldMatrix<T,N,N> orthonormalFrame() const {
 
-#warning Use DiagonalMatrix instead of FieldMatrix
-        Dune::FieldMatrix<T,N,N> result(0);
+        Dune::ScaledIdentityMatrix<T,N> result( data_[N-1]*data_[N-1] );
 
-        for (size_t i=0; i<N; i++)
-            result[i][i] = 1;
-        
-        std::cout << "FIXME: normalize vectors" << std::endl;
-        
-        return result;
+        return Dune::FieldMatrix<T,N,N>(result);
     }
 
     /** \brief Write unit vector object to output stream */
-- 
GitLab