From bb611a1dd1300b0dedf10fba8304017ddeae9fe5 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Wed, 16 Nov 2011 14:48:35 +0000
Subject: [PATCH] adapt to the new template parameters of the
 Rotation/RigidBodyMotion classes

[[Imported from SVN: r8206]]
---
 rod3d.cc       | 10 +++++-----
 rodobstacle.cc |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/rod3d.cc b/rod3d.cc
index 64edfae5..7626f6be 100644
--- a/rod3d.cc
+++ b/rod3d.cc
@@ -19,7 +19,7 @@
 #include <dune/gfe/rodassembler.hh>
 #include <dune/gfe/riemanniantrsolver.hh>
 
-typedef RigidBodyMotion<3> TargetSpace;
+typedef RigidBodyMotion<double,3> TargetSpace;
 
 const int blocksize = TargetSpace::TangentVector::dimension;
 
@@ -28,7 +28,7 @@ using std::string;
 
 int main (int argc, char *argv[]) try
 {
-    typedef std::vector<RigidBodyMotion<3> > SolutionType;
+    typedef std::vector<RigidBodyMotion<double,3> > SolutionType;
 
     // parse data file
     ParameterTree parameterSet;
@@ -78,7 +78,7 @@ int main (int argc, char *argv[]) try
         x[i].r[0] = 0;
         x[i].r[1] = 0;
         x[i].r[2] = double(i)/(x.size()-1);
-        x[i].q    = Rotation<3,double>::identity();
+        x[i].q    = Rotation<double,3>::identity();
     }
 
     // /////////////////////////////////////////
@@ -94,7 +94,7 @@ int main (int argc, char *argv[]) try
     axis[2] = parameterSet.get<double>("dirichletAxisZ");
     double angle = parameterSet.get<double>("dirichletAngle");
 
-    x.back().q = Rotation<3,double>(axis, M_PI*angle/180);
+    x.back().q = Rotation<double,3>(axis, M_PI*angle/180);
 
     // backup for error measurement later
     SolutionType initialIterate = x;
@@ -124,7 +124,7 @@ int main (int argc, char *argv[]) try
 
     RodAssembler<GridType::LeafGridView,3> rodAssembler(grid.leafView(), &localStiffness);
 
-    RiemannianTrustRegionSolver<GridType,RigidBodyMotion<3> > rodSolver;
+    RiemannianTrustRegionSolver<GridType,RigidBodyMotion<double,3> > rodSolver;
 #if 1
     rodSolver.setup(grid, 
                     &rodAssembler,
diff --git a/rodobstacle.cc b/rodobstacle.cc
index a7020306..07d8e88d 100644
--- a/rodobstacle.cc
+++ b/rodobstacle.cc
@@ -71,7 +71,7 @@ int main (int argc, char *argv[]) try
     // Some types that I need
     typedef BCRSMatrix<FieldMatrix<double, blocksize, blocksize> > MatrixType;
     typedef BlockVector<FieldVector<double, blocksize> >           CorrectionType;
-    typedef std::vector<RigidBodyMotion<2> >                       SolutionType;
+    typedef std::vector<RigidBodyMotion<double,2> >                SolutionType;
 
     // parse data file
     ParameterTree parameterSet;
@@ -155,7 +155,7 @@ int main (int argc, char *argv[]) try
     for (int i=0; i<x.size(); i++) {
         x[i].r[0] = 0;
         x[i].r[1] = i;//double(i)/(x.size()-1);
-        x[i].q    = Rotation<2,double>::identity();
+        x[i].q    = Rotation<double,2>::identity();
     }
 
     x.back().r[1] += 1;
@@ -293,7 +293,7 @@ int main (int argc, char *argv[]) try
 
              SolutionType newIterate = x;
              for (int j=0; j<newIterate.size(); j++) 
-                 newIterate[j] = RigidBodyMotion<2>::exp(newIterate[j], corr[j]);
+                 newIterate[j] = RigidBodyMotion<double,2>::exp(newIterate[j], corr[j]);
 
              /** \todo Don't always recompute oldEnergy */
              double oldEnergy = rodAssembler.computeEnergy(x); 
@@ -304,7 +304,7 @@ int main (int argc, char *argv[]) try
                  
              //  Add correction to the current solution
              for (int j=0; j<x.size(); j++) 
-                 x[j] = RigidBodyMotion<2>::exp(x[j], corr[j]);
+                 x[j] = RigidBodyMotion<double,2>::exp(x[j], corr[j]);
 
              // Subtract correction from the current obstacle
              for (int k=0; k<corr.size(); k++)
-- 
GitLab