From ce7474614372b9f06a827e4b767262fd8bf5051b Mon Sep 17 00:00:00 2001
From: Jonathan Youett <youett@mi.fu-berlin.de>
Date: Tue, 18 Oct 2011 12:15:54 +0000
Subject: [PATCH] add method to embedd the skew matrix in R^3x3

[[Imported from SVN: r7942]]
---
 dune/gfe/skewmatrix.hh | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/dune/gfe/skewmatrix.hh b/dune/gfe/skewmatrix.hh
index 77eb710c..5b28a480 100644
--- a/dune/gfe/skewmatrix.hh
+++ b/dune/gfe/skewmatrix.hh
@@ -38,6 +38,22 @@ public:
     {
         return data_;
     }
+   
+    /** \brief Embedd the skey-symmetric matrix in R^3x3 */ 
+    Dune::FieldMatrix<T,3,3> toMatrix()
+    {
+        Dune::FieldMatrix<T,3,3> mat;
+        mat = 0;
+        
+        mat[0][1] = -data_[2];
+        mat[1][0] =  data_[2];
+        mat[0][2] =  data_[1];
+        mat[2][0] = -data_[1];
+        mat[1][2] = -data_[0];
+        mat[2][1] =  data_[0];
+    
+        return mat; 
+    }
     
 private:
     // we store the axial vector
@@ -45,4 +61,4 @@ private:
     
 };
 
-#endif
\ No newline at end of file
+#endif
-- 
GitLab