From 89b47374f13bd1e18447f1b24378b9af03d9ab97 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 5 Feb 2015 21:16:48 -0600 Subject: [PATCH] Either make implicit casts from Tensor<1,dim> to Point explicit, or correct the data type of where we store the result. --- source/fe/mapping_q1.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/fe/mapping_q1.cc b/source/fe/mapping_q1.cc index 8b2cdb4de9..60738e1000 100644 --- a/source/fe/mapping_q1.cc +++ b/source/fe/mapping_q1.cc @@ -1039,7 +1039,7 @@ namespace internal } if (update_flags & update_normal_vectors) - normal_vectors[i] = boundary_forms[i] / boundary_forms[i].norm(); + normal_vectors[i] = Point(boundary_forms[i] / boundary_forms[i].norm()); } if (update_flags & update_jacobians) @@ -1720,10 +1720,10 @@ transform_real_to_unit_cell_internal compute_shapes(std::vector > (1, p_unit), mdata); Point p_real = transform_unit_to_real_cell_internal(mdata); - Point f = p_real-p; + Tensor<1,spacedim> f = p_real-p; // early out if we already have our point - if (f.square() < 1e-24 * cell->diameter() * cell->diameter()) + if (f.norm_square() < 1e-24 * cell->diameter() * cell->diameter()) return p_unit; // we need to compare the position of the computed p(x) against the given @@ -1809,7 +1809,7 @@ transform_real_to_unit_cell_internal // f(x) Point p_real_trial = transform_unit_to_real_cell_internal(mdata); - const Point f_trial = p_real_trial-p; + const Tensor<1,spacedim> f_trial = p_real_trial-p; #ifdef DEBUG_TRANSFORM_REAL_TO_UNIT_CELL std::cout << " step_length=" << step_length << std::endl -- 2.39.5