From: Wolfgang Bangerth Date: Fri, 6 Feb 2015 03:16:48 +0000 (-0600) Subject: Either make implicit casts from Tensor<1,dim> to Point explicit, or correct... X-Git-Tag: v8.3.0-rc1~492^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89b47374f13bd1e18447f1b24378b9af03d9ab97;p=dealii.git Either make implicit casts from Tensor<1,dim> to Point explicit, or correct the data type of where we store the result. --- 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