From 637a42230253747b85a1fbedf37341d25806134d Mon Sep 17 00:00:00 2001
From: Eric Bechet <eric.bechet@ulg.ac.be>
Date: Thu, 19 Jan 2012 08:16:29 +0000
Subject: [PATCH]

---
 Geo/STensor3.h       | 9 +++++++++
 Numeric/fullMatrix.h | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Geo/STensor3.h b/Geo/STensor3.h
index 42a8eb82bb..ed8ccdaab9 100644
--- a/Geo/STensor3.h
+++ b/Geo/STensor3.h
@@ -245,6 +245,15 @@ class STensor3 {
     ithis.setMat(m);
     return ithis;
   }
+  STensor3 transpose () const
+  {
+    STensor3 ithis;
+    for (int i = 0; i < 3; i++)
+      for (int j = 0; j < 3; j++)
+        ithis(i,j) = (*this)(j,i);
+    return ithis;
+  }
+
   STensor3 operator + (const STensor3 &other) const
   {
     STensor3 res(*this);
diff --git a/Numeric/fullMatrix.h b/Numeric/fullMatrix.h
index cd3ea275b5..cd2126a9e4 100644
--- a/Numeric/fullMatrix.h
+++ b/Numeric/fullMatrix.h
@@ -84,12 +84,12 @@ class fullVector
       _data = new scalar[_r];
       _own_data = true;
       if(resetValue)
-        setAll(0.);
+        setAll(scalar());
       return true;
     }
     _r = r;
     if(resetValue)
-      setAll(0.);
+      setAll(scalar());
     return false;
   }
   void setAsProxy(const fullVector<scalar> &original, int r_start, int r)
-- 
GitLab