]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not use "contract" in the tests.
authorMatthias Maier <tamiko@43-1.org>
Tue, 15 Sep 2015 20:33:16 +0000 (15:33 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 15 Sep 2015 22:21:26 +0000 (17:21 -0500)
source/fe/mapping_fe_field.cc
source/fe/mapping_q1.cc
tests/base/tensor.cc
tests/base/tensor_complex.cc
tests/base/tensor_float.cc
tests/codim_one/gradients.cc

index 15deaa1aa79b1e8a9a9b2ba7ddff444797f86e63..8460d67c5e809c10939055a11f6c8a8d6d814b1e 100644 (file)
@@ -1785,7 +1785,8 @@ transform_real_to_unit_cell_internal
             df[j][l] = -DF[j] * DF[l];
         }
       // Solve  [f'(x)]d=f(x)
-      Tensor<1, dim> delta = invert(df) * static_cast<const Tensor<1,dim>&>(f);
+      const Tensor<1, dim> delta =
+        invert(df) * static_cast<const Tensor<1, dim> &>(f);
       // do a line search
       double step_length = 1;
       do
index 4e6e0a69fc6e6f611a22e7347a9850da390162fa..6f4cfe9b8612d743a173e88d8a0305b06b192346 100644 (file)
@@ -607,8 +607,8 @@ transform_real_to_unit_cell_internal
 
       // Solve  [f'(x)]d=f(x)
       Tensor<2,spacedim> df_inverse = invert(df);
-      Tensor<1, spacedim> delta =
-          df_inverse * static_cast<const Tensor<1, spacedim> &>(f);
+      const Tensor<1, spacedim> delta =
+        df_inverse * static_cast<const Tensor<1, spacedim> &>(f);
 
 #ifdef DEBUG_TRANSFORM_REAL_TO_UNIT_CELL
       std::cout << "   delta=" << delta  << std::endl;
index c230cf1089e58ec64b558741fc9231afe2d4e65e..fb2b32301cf87ad4b8f0f0adf2938d50daf55826 100644 (file)
@@ -56,7 +56,7 @@ int main ()
       deallog << std::endl;
     };
 
-  contract (tt,t,t);
+  tt = t * t;
 
   deallog << "tt=" << std::endl;
   for (unsigned int i=0; i<dim; ++i)
index 4c28b99cd0954fba1d3b7118a6fc913e36cba47a..1f8dbcb2584bffa44e6313a97a96ab8551c6eb4f 100644 (file)
@@ -77,7 +77,7 @@ int main ()
 
   deallog << "norm(t)=" << t.norm() << std::endl;
 
-  contract (tt,t,t);
+  tt = t * t;
 
   deallog << "tt=" << std::endl;
   for (unsigned int i=0; i<dim; ++i)
index 4b617969f1824309f34307e15ac7d9e31b9d54f1..ee2fa3da2d32a47092b0dfaac3f5b112c67451d4 100644 (file)
@@ -61,7 +61,7 @@ int main ()
 
   deallog << "norm(t)=" << t.norm() << std::endl;
 
-  contract (tt,t,t);
+  tt = t * t;
 
   deallog << "tt=" << std::endl;
   for (unsigned int i=0; i<dim; ++i)
index 45b51788e646afe08f758ca05d2f92aa97b309e4..242779fb13506b621298f0f1f01a7cb828caaeb6 100644 (file)
@@ -157,10 +157,8 @@ void test(std::string filename)
 
       for (unsigned int i=0; i<dofs_per_cell; ++i)
         {
-          shape_directional_derivative[i]=
-            contract(
-              fe_values.shape_grad(i,0),
-              cell_tangentials[0]);
+          shape_directional_derivative[i] =
+            fe_values.shape_grad(i, 0) * cell_tangentials[0];
 
           // notice that the dof_index for
           // fe_dgq(0) is the same as that of

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.