]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed comments. 11514/head
authorLuca Heltai <luca.heltai@sissa.it>
Thu, 14 Jan 2021 18:28:31 +0000 (19:28 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Thu, 14 Jan 2021 18:35:33 +0000 (19:35 +0100)
include/deal.II/fe/mapping_fe.h
source/fe/mapping_fe.cc

index 0865491ee0c5db86344e60643f47a9306395c9b7..cfc328a31f9bcdaefaeb8f06fe251bec8aa523c6 100644 (file)
@@ -97,11 +97,7 @@ public:
     const typename Triangulation<dim, spacedim>::cell_iterator &cell,
     const Point<dim> &p) const override;
 
-  /**
-   * for documentation, see the Mapping base class
-   *
-   * note: not implemented yet
-   */
+  // for documentation, see the Mapping base class
   virtual Point<dim>
   transform_real_to_unit_cell(
     const typename Triangulation<dim, spacedim>::cell_iterator &cell,
index 7a3822b5e0ee81e16b16651a408691abf0ac3ac1..0c9097a8c61ea34010081a49129282a53ff2e3a7 100644 (file)
@@ -175,6 +175,7 @@ MappingFE<dim, spacedim>::InternalData::initialize_face(
 }
 
 
+
 template <int dim, int spacedim>
 void
 MappingFE<dim, spacedim>::InternalData::compute_shape_function_values(
@@ -931,8 +932,6 @@ MappingFE<dim, spacedim>::transform_real_to_unit_cell(
 
       // Transpose of the gradient map
       DerivativeForm<1, spacedim, dim> grad_FT;
-      Tensor<1, dim>                   grad_FT_residual;
-      Tensor<2, dim>                   corrected_metric_tensor;
       DerivativeForm<2, spacedim, dim> hess_FT;
 
       for (unsigned int i = 0; i < this->fe->n_dofs_per_cell(); ++i)
@@ -949,24 +948,25 @@ MappingFE<dim, spacedim>::transform_real_to_unit_cell(
         }
 
       // Residual
-      auto residual = p - mapped_point;
+      const auto residual = p - mapped_point;
       // Project the residual on the reference coordinate system
       // to compute the error, and to filter components orthogonal to the
       // manifold, and compute a 2nd order correction of the metric tensor
-      grad_FT_residual = apply_transformation(grad_FT, residual);
+      const auto grad_FT_residual = apply_transformation(grad_FT, residual);
 
       // Do not invert nor compute the metric if not necessary.
       if (grad_FT_residual.norm() <= eps)
         break;
 
       // Now compute the (corrected) metric tensor
+      Tensor<2, dim> corrected_metric_tensor;
       for (unsigned int j = 0; j < dim; ++j)
         for (unsigned int l = 0; l < dim; ++l)
           corrected_metric_tensor[j][l] =
             -grad_FT[j] * grad_FT[l] + hess_FT[j][l] * residual;
 
       // And compute the update
-      auto g_inverse = invert(corrected_metric_tensor);
+      const auto g_inverse = invert(corrected_metric_tensor);
       p_unit -= Point<dim>(g_inverse * grad_FT_residual);
 
       ++loop;

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.