]> https://gitweb.dealii.org/ - dealii.git/commitdiff
workaround compiler bug gcc 3.4.3 on Opteron
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 6 Apr 2005 11:20:21 +0000 (11:20 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Wed, 6 Apr 2005 11:20:21 +0000 (11:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@10380 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/symmetric_tensor_06.cc

index 2426bc54154bdcf487aefa1a42a58ffaa7ddc8ca..d50bab2f6e792573562a284a8da130431dd8db69 100644 (file)
@@ -29,14 +29,19 @@ void test ()
               mu     = 7;
   SymmetricTensor<4,dim> ts;
   Tensor<4,dim>          ta;
+  for (unsigned int i=0; i<dim; ++i)
+    for (unsigned int j=0; j<dim; ++j)
+      {
+       ta[i][j][i][j] += mu;
+       ta[i][j][j][i] += mu;
+       ta[i][i][j][j] += lambda;
+      }
   for (unsigned int i=0; i<dim; ++i)
     for (unsigned int j=0; j<dim; ++j)
       for (unsigned int k=0; k<dim; ++k)
        for (unsigned int l=0; l<dim; ++l)
-         ts[i][j][k][l] = ta[i][j][k][l] = (((i==k) && (j==l) ? mu : 0) +
-                                            ((i==l) && (j==k) ? mu : 0) +
-                                            ((i==j) && (k==l) ? lambda : 0));
-         
+         ts[i][j][k][l] = ta[i][j][k][l];
+  
   SymmetricTensor<2,dim> as, bs;
   Tensor<2,dim>          aa, ba;
 

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.