From 57552ca57104d5329e4e5b91274373e0467543dd Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 18 Jun 2017 20:23:23 -0400 Subject: [PATCH] Use GeometryInfo::d_linear_shape_function in two places. --- source/grid/tria_accessor.cc | 6 +----- source/grid/tria_boundary.cc | 8 +++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index e23ed92602..5ec673b029 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -1205,10 +1205,6 @@ template Point TriaAccessor::intermediate_point (const Point &coordinates) const { - // We use an FE_Q(1) to extract the "weights" of each - // vertex, used to get a point from the manifold. - static FE_Q fe(1); - // Surrounding points and weights. std::vector > p(GeometryInfo::vertices_per_cell); std::vector w(GeometryInfo::vertices_per_cell); @@ -1216,7 +1212,7 @@ TriaAccessor::intermediate_point (const Point::vertices_per_cell; ++i) { p[i] = this->vertex(i); - w[i] = fe.shape_value(i, coordinates); + w[i] = GeometryInfo::d_linear_shape_function(coordinates, i); } return this->get_manifold().get_new_point(p, w); diff --git a/source/grid/tria_boundary.cc b/source/grid/tria_boundary.cc index 5daf316f90..d4c169a858 100644 --- a/source/grid/tria_boundary.cc +++ b/source/grid/tria_boundary.cc @@ -537,8 +537,6 @@ normal_vector (const typename Triangulation::face_iterator &face, for (unsigned int i=0; i linear_fe(1); - const double eps = 1e-12; Tensor<1,spacedim> grad_F[facedim]; unsigned int iteration = 0; @@ -546,13 +544,14 @@ normal_vector (const typename Triangulation::face_iterator &face, { Point F; for (unsigned int v=0; v::vertices_per_cell; ++v) - F += face->vertex(v) * linear_fe.shape_value(v, xi); + F += face->vertex(v) * GeometryInfo::d_linear_shape_function(xi, v); for (unsigned int i=0; i::vertices_per_cell; ++v) - grad_F[i] += face->vertex(v) * linear_fe.shape_grad(v, xi)[i]; + grad_F[i] += face->vertex(v) * + GeometryInfo::d_linear_shape_function_gradient(xi, v)[i]; } Tensor<1,facedim> J; @@ -879,4 +878,3 @@ project_to_surface (const typename Triangulation::hex_iterator &, #include "tria_boundary.inst" DEAL_II_NAMESPACE_CLOSE - -- 2.39.5