]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use the new variants of contract().
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 16 Sep 2015 14:02:40 +0000 (09:02 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 17 Sep 2015 19:45:31 +0000 (14:45 -0500)
source/fe/mapping_q_generic.cc

index 5429fc3b4f88ec80568606e9390be5319085ef20..2cc850d8ebf1b24836e4cd282ff9ac920855b20d 100644 (file)
@@ -1185,9 +1185,8 @@ namespace
           }
 
         // Solve  [f'(x)]d=f(x)
-        Tensor<1,spacedim> delta;
         Tensor<2,spacedim> df_inverse = invert(df);
-        contract (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;
@@ -1326,11 +1325,7 @@ namespace
     while (f.norm()>eps && loop++<loop_limit)
       {
         // Solve  [df(x)]d=f(x)
-        Tensor<1,dim> d;
-        Tensor<2,dim> df_1;
-
-        df_1 = invert(df);
-        contract (d, df_1, static_cast<const Tensor<1,dim>&>(f));
+        const Tensor<1,dim> d = invert(df) * static_cast<const Tensor<1,dim>&>(f);
         p_unit -= d;
 
         for (unsigned int j=0; j<dim; ++j)

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.