From 0a5fb2b8bc312d36c171a8b7178c61d266a61b39 Mon Sep 17 00:00:00 2001
From: Lina Homsy <lanloun84@hotmail.com>
Date: Mon, 17 Mar 2014 08:18:49 +0000
Subject: [PATCH] need modfinig --This line, and those below, will be ignored--

M    Geo/STensor3.h
---
 Geo/STensor3.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Geo/STensor3.h b/Geo/STensor3.h
index f4afda115f..2be7571fa0 100644
--- a/Geo/STensor3.h
+++ b/Geo/STensor3.h
@@ -339,6 +339,15 @@ class STensor3 {
           val = fabs(_val[i]);
     return val;
   };
+  double norm2()const{
+    double sqr = 0;
+    for (int i=0; i<3; i++){
+      for (int j =0; j<3; j++){
+	sqr += this->operator()(i,j)*this->operator()(i,j);
+      }
+    }
+    return sqrt(sqr);
+  }
 };
 
 // tensor product
-- 
GitLab