From 47457d861fca9f99d57ac9dfc4d54c54a6e1b106 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Fri, 17 Aug 2007 14:54:40 +0000
Subject: [PATCH] compute average orientation

[[Imported from SVN: r1535]]
---
 src/averageinterface.hh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/averageinterface.hh b/src/averageinterface.hh
index 761804dd..baafb000 100644
--- a/src/averageinterface.hh
+++ b/src/averageinterface.hh
@@ -199,16 +199,16 @@ void computeAverageInterface(const BoundaryPatch<GridType>& interface,
     // polar composition.
     FieldVector<double,dim> W;
     FieldMatrix<double,dim,dim> VT;
+
+    // returns a decomposition U W VT, where U is returned in the first argument
     svdcmp<double,dim,dim>(deformationGradient, W, VT);
 
     deformationGradient.rightmultiply(VT);
 
+    // deformationGradient now contains the orthogonal part of the polar decomposition
     assert( std::abs(1-deformationGradient.determinant()) < 1e-3);
-    //std::cout << "determinant: " << deformationGradient.determinant() << "  (should be 1)\n";
-    
 
-    // average orientation not implemented yet
-    average.q = Quaternion<double>::identity();
+    average.q.set(deformationGradient);
 }
 
 #endif
-- 
GitLab