From e3c984865da8b55976a778e1c079888914752af1 Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Mon, 19 Feb 2018 13:49:01 +0100 Subject: [PATCH] Minor c++11-ification --- test/rotationtest.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/rotationtest.cc b/test/rotationtest.cc index 5208d348..5f3dc553 100644 --- a/test/rotationtest.cc +++ b/test/rotationtest.cc @@ -98,9 +98,9 @@ void testDerivativeOfInterpolatedPosition() { std::array<Rotation<double,3>, 6> q; - FieldVector<double,3> xAxis(0); xAxis[0] = 1; - FieldVector<double,3> yAxis(0); yAxis[1] = 1; - FieldVector<double,3> zAxis(0); zAxis[2] = 1; + FieldVector<double,3> xAxis = {1,0,0}; + FieldVector<double,3> yAxis = {0,1,0}; + FieldVector<double,3> zAxis = {0,0,1}; q[0] = Rotation<double,3>(xAxis, 0); q[1] = Rotation<double,3>(xAxis, M_PI/2); @@ -156,9 +156,8 @@ void testDerivativeOfInterpolatedPosition() // Second: test the interpolated velocity vector // /////////////////////////////////////////////////////////// - for (int l=1; l<7; l++) { - - double intervalLength = l/(double(3)); + for (const double intervalLength : {1.0/3, 2.0/3, 3.0/3, 4.0/3, 5.0/3, 6.0/3, 7.0/3}) + { Dune::FieldVector<double,3> variation; for (int m=0; m<3; m++) { -- GitLab