From e41a36f802845cd4dc8514620abd849edd4b703d Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Thu, 14 Jan 2021 19:28:31 +0100 Subject: [PATCH] Fixed comments. --- include/deal.II/fe/mapping_fe.h | 6 +----- source/fe/mapping_fe.cc | 10 +++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/include/deal.II/fe/mapping_fe.h b/include/deal.II/fe/mapping_fe.h index 0865491ee0..cfc328a31f 100644 --- a/include/deal.II/fe/mapping_fe.h +++ b/include/deal.II/fe/mapping_fe.h @@ -97,11 +97,7 @@ public: const typename Triangulation::cell_iterator &cell, const Point &p) const override; - /** - * for documentation, see the Mapping base class - * - * note: not implemented yet - */ + // for documentation, see the Mapping base class virtual Point transform_real_to_unit_cell( const typename Triangulation::cell_iterator &cell, diff --git a/source/fe/mapping_fe.cc b/source/fe/mapping_fe.cc index 7a3822b5e0..0c9097a8c6 100644 --- a/source/fe/mapping_fe.cc +++ b/source/fe/mapping_fe.cc @@ -175,6 +175,7 @@ MappingFE::InternalData::initialize_face( } + template void MappingFE::InternalData::compute_shape_function_values( @@ -931,8 +932,6 @@ MappingFE::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::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(g_inverse * grad_FT_residual); ++loop; -- 2.39.5