]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove unused variables in the SymmetricTensor headers 8324/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 20 Jun 2019 14:03:56 +0000 (10:03 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 20 Jun 2019 14:06:59 +0000 (10:06 -0400)
include/deal.II/base/symmetric_tensor.h
include/deal.II/base/symmetric_tensor.templates.h

index 4cd72680c1b9a3e4fbce748d1f42653cec00898d..84a967aca04ad128325984481aa1b23d7859eacd 100644 (file)
@@ -4056,10 +4056,6 @@ inline DEAL_II_ALWAYS_INLINE
   operator*(const Tensor<rank_1, dim, Number> &              src1,
             const SymmetricTensor<rank_2, dim, OtherNumber> &src2s)
 {
-  typename Tensor<rank_1 + rank_2 - 2,
-                  dim,
-                  typename ProductType<Number, OtherNumber>::type>::tensor_type
-                                         result;
   const Tensor<rank_2, dim, OtherNumber> src2(src2s);
   return src1 * src2;
 }
@@ -4098,10 +4094,6 @@ inline DEAL_II_ALWAYS_INLINE
   operator*(const SymmetricTensor<rank_1, dim, Number> &src1s,
             const Tensor<rank_2, dim, OtherNumber> &    src2)
 {
-  typename Tensor<rank_1 + rank_2 - 2,
-                  dim,
-                  typename ProductType<Number, OtherNumber>::type>::tensor_type
-                                         result;
   const Tensor<rank_2, dim, OtherNumber> src1(src1s);
   return src1 * src2;
 }
index fd458b050cc80153bfb42dd5979ef867061c7fd2..64c1886d260918ae0c84d5f5c2c6a7fb4be3e6cf 100644 (file)
@@ -924,7 +924,6 @@ eigenvectors(const SymmetricTensor<2, dim, Number> &T,
           const double delta = sf * std::numeric_limits<scalar_type>::epsilon();
           const double rotation_angle = delta * numbers::PI / 180.0;
 
-          Tensor<2, dim, Number> T_prime_ns;
           if (dim == 2)
             {
               const Tensor<2, dim, Number> T_prime_ns =
@@ -935,9 +934,8 @@ eigenvectors(const SymmetricTensor<2, dim, Number> &T,
               // cancel out. So we take the upper triangle as an approximation
               // instead.
               // TODO[JPP]: Perform the eigen-decomposition on the non-symmetric
-              // T_prime_ns.
-              //            This is, however, nontrivial to implement in this
-              //            context. See:
+              //            T_prime_ns. This is, however, nontrivial to
+              //            implement in this context. See:
               //            http://www.alglib.net/eigen/nonsymmetric/nonsymmetricevd.php
               //            https://groups.google.com/forum/#!topic/stan-users/QJe1TNioiyg
               SymmetricTensor<2, dim, Number> T_prime;
@@ -958,16 +956,16 @@ eigenvectors(const SymmetricTensor<2, dim, Number> &T,
                 {
                   // This is a little bit hacky, so here's a brief explanation
                   // as to what the principal of this operation is: What we're
-                  // trying to do here is perturb our tenosr such that the
-                  // sensitivity of the eigen-vectors with respect to each other
+                  // trying to do here is perturb our tensor such that the
+                  // sensitivity of the eigenvectors with respect to each other
                   // can be established. So, one at a time, we compute the
                   // perturbation of the input tensor such that the maximal
                   // number of off-diagonal entries are non-zero for any given
                   // "i". This means that we rotation not about the "ith" axis,
                   // but rather some offset of it. Note: This does NOT lead to
-                  // an exact value or derivative of the eigen-data being
+                  // an exact value or derivative of the eigendata being
                   // computed, so one should be aware that for this case (where
-                  // the eigen-values are equal), the linearisation of any
+                  // the eigenvalues are equal), the linearization of any
                   // resulting quantities is only approximate.
                   const unsigned int axis = (i + 2) % 3;
                   T_prime_ns = internal::SymmetricTensorImplementation::
@@ -977,9 +975,9 @@ eigenvectors(const SymmetricTensor<2, dim, Number> &T,
                   // cancel out. So we take the upper triangle as an
                   // approximation instead.
                   // TODO[JPP]: Keep the full row and perform the
-                  // eigen-decomposition on the
-                  //            non-symmetric T_prime_ns. See related comment
-                  //            above in 2d case.
+                  //            eigen-decomposition on the
+                  //            non-symmetric T_prime_ns. See the related
+                  //            comment above in the 2d case.
                   for (unsigned int j = i; j < dim; ++j)
                     T_prime[i][j] = T_prime_ns[i][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.