]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use GeometryInfo<dim>::d_linear_shape_function in two places. 4524/head
authorDavid Wells <wellsd2@rpi.edu>
Mon, 19 Jun 2017 00:23:23 +0000 (20:23 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Mon, 19 Jun 2017 00:45:10 +0000 (20:45 -0400)
source/grid/tria_accessor.cc
source/grid/tria_boundary.cc

index e23ed92602251ee3eb581a4960ec19f20d079027..5ec673b029f5487436a80e557f2560a24f6dbc30 100644 (file)
@@ -1205,10 +1205,6 @@ template <int structdim, int dim, int spacedim>
 Point<spacedim>
 TriaAccessor<structdim, dim, spacedim>::intermediate_point (const Point<structdim> &coordinates) const
 {
-  // We use an FE_Q<structdim>(1) to extract the "weights" of each
-  // vertex, used to get a point from the manifold.
-  static FE_Q<structdim> fe(1);
-
   // Surrounding points and weights.
   std::vector<Point<spacedim> > p(GeometryInfo<structdim>::vertices_per_cell);
   std::vector<double>   w(GeometryInfo<structdim>::vertices_per_cell);
@@ -1216,7 +1212,7 @@ TriaAccessor<structdim, dim, spacedim>::intermediate_point (const Point<structdi
   for (unsigned int i=0; i<GeometryInfo<structdim>::vertices_per_cell; ++i)
     {
       p[i] = this->vertex(i);
-      w[i] = fe.shape_value(i, coordinates);
+      w[i] = GeometryInfo<structdim>::d_linear_shape_function(coordinates, i);
     }
 
   return this->get_manifold().get_new_point(p, w);
index 5daf316f909ed4d4a8c29b188c955fc8e22b3f1a..d4c169a8584891282195f77814df9246857b0b63 100644 (file)
@@ -537,8 +537,6 @@ normal_vector (const typename Triangulation<dim,spacedim>::face_iterator &face,
   for (unsigned int i=0; i<facedim; ++i)
     xi[i] = 1./2;
 
-  FE_Q<facedim> 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<dim,spacedim>::face_iterator &face,
     {
       Point<spacedim> F;
       for (unsigned int v=0; v<GeometryInfo<facedim>::vertices_per_cell; ++v)
-        F += face->vertex(v) * linear_fe.shape_value(v, xi);
+        F += face->vertex(v) * GeometryInfo<facedim>::d_linear_shape_function(xi, v);
 
       for (unsigned int i=0; i<facedim; ++i)
         {
           grad_F[i] = 0;
           for (unsigned int v=0; v<GeometryInfo<facedim>::vertices_per_cell; ++v)
-            grad_F[i] += face->vertex(v) * linear_fe.shape_grad(v, xi)[i];
+            grad_F[i] += face->vertex(v) *
+                         GeometryInfo<facedim>::d_linear_shape_function_gradient(xi, v)[i];
         }
 
       Tensor<1,facedim> J;
@@ -879,4 +878,3 @@ project_to_surface (const typename Triangulation<dim, spacedim>::hex_iterator &,
 #include "tria_boundary.inst"
 
 DEAL_II_NAMESPACE_CLOSE
-

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.