]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: Improve base/tensor_accessors_01
authorMatthias Maier <tamiko@43-1.org>
Sat, 12 Sep 2015 05:24:21 +0000 (00:24 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 12 Sep 2015 21:42:12 +0000 (16:42 -0500)
tests/base/tensor_accessors_01.cc

index 10342da329e7668a6f71ee2837b6af614f84b7e4..460883d8770e4d9c1c24375a6bd558ec9c58d9b9 100644 (file)
@@ -41,8 +41,11 @@ int main()
     //               0  1  2  3  5  6  7  8  4
     deallog   << foo[0][1][2][0][2][0][1][2][1] << std::endl;
 
-    int &tmp =  foo[0][1][2][0][2][0][1][2][1];
-    tmp = 2 *    foo[0][1][2][0][2][0][1][2][1];
+    int temp = foo[0][1][2][0][2][0][1][2][1];
+    int &ref = foo[0][1][2][0][2][0][1][2][1];
+    ref = temp;
+
+    foo[0][1][2][0][2][0][1][2][1] =  temp + ref;
 
     deallog   <<   t[0][1][2][0][1][2][0][1][2] << std::endl;
   }
@@ -57,8 +60,8 @@ int main()
     //                     0  1  2  3  5  6  7  8  4
     deallog   << const_foo[0][1][2][0][2][0][1][2][1] << std::endl;
 
-    int &tmp =        foo[0][1][2][0][2][0][1][2][1];
-    tmp =              foo[0][1][2][0][2][0][1][2][1] / 2;
+    int &tmp =         foo[0][1][2][0][2][0][1][2][1];
+    tmp =        const_foo[0][1][2][0][2][0][1][2][1] / 2;
     deallog   << const_foo[0][1][2][0][2][0][1][2][1] << std::endl;
   }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.