From 80efd0d6c9c4f608028c7c8e26e25c21c11640b0 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Mon, 2 Feb 2009 10:09:52 +0000 Subject: [PATCH] use Rotation class instead of Quaternion [[Imported from SVN: r3489]] --- dirneucoupling.cc | 12 ++++++------ rod3d.cc | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dirneucoupling.cc b/dirneucoupling.cc index a576f940..0ee5f82c 100644 --- a/dirneucoupling.cc +++ b/dirneucoupling.cc @@ -54,7 +54,7 @@ void makeStraightRod(RodSolutionType& rod, int n, const FieldVector<double,3>& beginning, const FieldVector<double,3>& end) { // Compute the correct orientation - Quaternion<double> orientation = Quaternion<double>::identity(); + Rotation<3,double> orientation = Rotation<3,double>::identity(); FieldVector<double,3> zAxis(0); zAxis[2] = 1; @@ -69,7 +69,7 @@ void makeStraightRod(RodSolutionType& rod, int n, double angle = std::acos(zAxis * d3); if (angle != 0) - orientation = Quaternion<double>(axis, angle); + orientation = Rotation<3,double>(axis, angle); // Set the values rod.resize(n); @@ -195,7 +195,7 @@ int main (int argc, char *argv[]) try axis[2] = parameterSet.get("dirichletAxisZ", double(0)); double angle = parameterSet.get("dirichletAngle", double(0)); - rodX.back().q = Quaternion<double>(axis, M_PI*angle/180); + rodX.back().q = Rotation<3,double>(axis, M_PI*angle/180); // Backup initial rod iterate for later reference RodSolutionType initialIterateRod = rodX; @@ -451,7 +451,7 @@ int main (int argc, char *argv[]) try lambda.r[j] = (1-damping) * lambda.r[j] + damping * (referenceInterface.r[j] + averageInterface.r[j]); - lambda.q = Quaternion<double>::interpolate(lambda.q, + lambda.q = Rotation<3,double>::interpolate(lambda.q, referenceInterface.q.mult(averageInterface.q), damping); @@ -709,11 +709,11 @@ int main (int argc, char *argv[]) try // Output result // ////////////////////////////// LeafAmiraMeshWriter<GridType> amiraMeshWriter(grid); - amiraMeshWriter.addVertexData(x3d, grid.leafIndexSet()); + amiraMeshWriter.addVertexData(x3d, grid.leafView()); BlockVector<FieldVector<double,1> > stress; Stress<GridType,dim>::getStress(grid, x3d, stress, E, nu); - amiraMeshWriter.addVertexData(stress, grid.leafIndexSet()); + amiraMeshWriter.addVertexData(stress, grid.leafView()); amiraMeshWriter.write(resultPath + "grid.result"); diff --git a/rod3d.cc b/rod3d.cc index b7ea688c..103ff2cb 100644 --- a/rod3d.cc +++ b/rod3d.cc @@ -14,7 +14,7 @@ #include "src/configuration.hh" #include "src/roddifference.hh" #include "src/rodwriter.hh" -#include "src/quaternion.hh" +#include "src/rotation.hh" #include "src/rodassembler.hh" #include "src/rodsolver.hh" @@ -86,7 +86,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 = Quaternion<double>::identity(); + x[i].q = Rotation<3,double>::identity(); } // ///////////////////////////////////////// @@ -102,7 +102,7 @@ int main (int argc, char *argv[]) try axis[2] = parameterSet.get("dirichletAxisZ", double(0)); double angle = parameterSet.get("dirichletAngle", double(0)); - x.back().q = Quaternion<double>(axis, M_PI*angle/180); + x.back().q = Rotation<3,double>(axis, M_PI*angle/180); // backup for error measurement later SolutionType initialIterate = x; -- GitLab