From 270c411b2c5282e666997312cf2f2b36ac10a1b2 Mon Sep 17 00:00:00 2001
From: Klaus <klaus.boehnlein@tu-dresden.de>
Date: Tue, 26 Jul 2022 14:21:45 +0200
Subject: [PATCH] Fix wrong crossSectionDirectionScaling

---
 dune/microstructure/matrix_operations.hh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/dune/microstructure/matrix_operations.hh b/dune/microstructure/matrix_operations.hh
index 98c16502..35b80833 100644
--- a/dune/microstructure/matrix_operations.hh
+++ b/dune/microstructure/matrix_operations.hh
@@ -67,8 +67,15 @@ namespace MatrixOperations {
 	    return rankoneTensorproduct(U_plus_k_x_ecs, e_1);
 	}
 
-	static MatrixRT crossSectionDirectionScaling(double w, MatrixRT M){
-		return {M[0], M[1], w*M[2]};
+// 	static MatrixRT crossSectionDirectionScaling(double w, MatrixRT M){
+// 		return {M[0], M[1], w*M[2]};
+// 	}
+	
+    static MatrixRT crossSectionDirectionScaling(double w, MatrixRT M){
+		return {{M[0][0], M[0][1], w*M[0][2]},
+                {M[1][0], M[1][1], w*M[1][2]},
+                {M[2][0], M[2][1], w*M[2][2]}
+               };
 	}
 
 	static double trace (MatrixRT M){ 
-- 
GitLab