From 26091daff022ccd14276c7b95aa327dd9e3b39eb Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Mon, 2 Feb 2009 10:09:01 +0000
Subject: [PATCH] use Rotation class instead of Quaternion

[[Imported from SVN: r3488]]
---
 src/configuration.hh | 4 ++--
 src/rodassembler.hh  | 4 ++--
 src/rodsolver.cc     | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/configuration.hh b/src/configuration.hh
index 0b23bda1..2f7081ce 100644
--- a/src/configuration.hh
+++ b/src/configuration.hh
@@ -2,7 +2,7 @@
 #define CONFIGURATION_HH
 
 #include <dune/common/fvector.hh>
-#include "quaternion.hh"
+#include "rotation.hh"
 
 /** \brief Configuration of a nonlinear rod in 3d */
 struct Configuration 
@@ -11,7 +11,7 @@ struct Configuration
     Dune::FieldVector<double,3> r;
 
     // Rotational part
-    Quaternion<double> q;
+    Rotation<3,double> q;
 
 };
 
diff --git a/src/rodassembler.hh b/src/rodassembler.hh
index f5eb9767..40300061 100644
--- a/src/rodassembler.hh
+++ b/src/rodassembler.hh
@@ -167,7 +167,7 @@ public:
             if (i<3)
                 c.r[i] += eps;
             else
-                c.q = c.q.mult(Quaternion<double>::exp((i==3)*eps, 
+                c.q = c.q.mult(Rotation<3,double>::exp((i==3)*eps, 
                                                        (i==4)*eps, 
                                                        (i==5)*eps));
         }
@@ -194,7 +194,7 @@ public:
                 referenceConfiguration_[idx].r[0] = 0;
                 referenceConfiguration_[idx].r[1] = 0;
                 referenceConfiguration_[idx].r[2] = it->geometry().corner(0)[0];
-                referenceConfiguration_[idx].q = Quaternion<double>::identity();
+                referenceConfiguration_[idx].q = Rotation<3,double>::identity();
             }
 
         }
diff --git a/src/rodsolver.cc b/src/rodsolver.cc
index 23868b61..fc0cc387 100644
--- a/src/rodsolver.cc
+++ b/src/rodsolver.cc
@@ -70,7 +70,7 @@ void RodSolver<GridType>::setup(const GridType& grid,
 
     EnergyNorm<MatrixType, CorrectionType>* baseEnergyNorm = new EnergyNorm<MatrixType, CorrectionType>(*baseSolverStep);
 
-    LoopSolver<CorrectionType>* baseSolver = new LoopSolver<CorrectionType>(baseSolverStep,
+    ::LoopSolver<CorrectionType>* baseSolver = new ::LoopSolver<CorrectionType>(baseSolverStep,
                                                                             baseIt_,
                                                                             baseTolerance_,
                                                                             baseEnergyNorm,
@@ -106,7 +106,7 @@ void RodSolver<GridType>::setup(const GridType& grid,
 
     h1SemiNorm_ = new H1SemiNorm<CorrectionType>(**A);
 
-    mmgSolver_ = new LoopSolver<CorrectionType>(mmgStep,
+    mmgSolver_ = new ::LoopSolver<CorrectionType>(mmgStep,
                                                      multigridIterations_,
                                                      qpTolerance_,
                                                      h1SemiNorm_,
@@ -318,7 +318,7 @@ void RodSolver<GridType>::solve()
                 newIterate[j].r[k] += corr[j][k];
             
             // Add rotational correction
-            Quaternion<double> qCorr = Quaternion<double>::exp(corr[j][3], corr[j][4], corr[j][5]);
+            Rotation<3,double> qCorr = Rotation<3,double>::exp(corr[j][3], corr[j][4], corr[j][5]);
             newIterate[j].q = newIterate[j].q.mult(qCorr);
             
         }
-- 
GitLab