]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed name, fixed bug.
authorLuca Heltai <luca.heltai@sissa.it>
Thu, 3 Mar 2016 13:58:53 +0000 (14:58 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Wed, 6 Apr 2016 11:00:14 +0000 (13:00 +0200)
include/deal.II/fe/mapping_manifold.h
source/fe/mapping_manifold.cc
tests/fe/mapping_manifold_02.cc

index b7b7b26dfedc296da5ded0f225fd23426c853cc6..ccf5ea2c6d2a33e496e5f426eafb906d55ab6e31 100644 (file)
@@ -222,7 +222,7 @@ public:
      *
      * Computed once.
      */
-    std::vector<std::vector<double> > cell_manifold_quadratures_weights;
+    std::vector<std::vector<double> > cell_manifold_quadrature_weights;
 
     // /**
     //  * Values of shape function derivatives. Access by function @p derivative.
@@ -582,13 +582,13 @@ inline
 void
 MappingManifold<dim,spacedim>::InternalData::compute_manifold_quadrature_weights (const Quadrature<dim> &quad)
 {
-  static FE_Q<dim> fe_q(1);
-  cell_manifold_quadratures_weights.resize(quad.size(), std::vector<double>(GeometryInfo<dim>::vertices_per_cell));
+  FE_Q<dim> fe_q(1);
+  cell_manifold_quadrature_weights.resize(quad.size(), std::vector<double>(GeometryInfo<dim>::vertices_per_cell));
   for (unsigned int q=0; q<quad.size(); ++q)
     {
       for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
         {
-          cell_manifold_quadratures_weights[q][i] = fe_q.shape_value(i, quad.point(q));
+          cell_manifold_quadrature_weights[q][i] = fe_q.shape_value(i, quad.point(q));
         }
     }
 }
index 2ae478fe977a76c23c83ba68aae28156aac7a4d5..ba3eff3796a5d7cc60c13243f53b78a56b0849ec 100644 (file)
@@ -380,19 +380,22 @@ namespace internal
     {
       const UpdateFlags update_flags = data.update_each;
 
-      AssertDimension(quadrature_points.size(),
-                      data.cell_manifold_quadratures_weights.size());
-
-      std::vector<Point<spacedim> > vertices;
-      for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v)
-        vertices[v] = cell->vertex(v);
 
       if (update_flags & update_quadrature_points)
         {
+
+          AssertDimension(quadrature_points.size(),
+                          data.cell_manifold_quadrature_weights.size());
+
+          std::vector<Point<spacedim> > vertices;
+          for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v)
+            vertices.push_back(cell->vertex(v));
+
           for (unsigned int point=0; point<quadrature_points.size(); ++point)
             {
               quadrature_points[point] = cell->get_manifold().
-                                         get_new_point(Quadrature<spacedim>(vertices, data.cell_manifold_quadratures_weights[point]));
+                                         get_new_point(Quadrature<spacedim>(vertices,
+                                                       data.cell_manifold_quadrature_weights[point]));
             }
         }
     }
index 4fc61bb5179e549be0c079bb6ec996abfe904298..9ef5c321ba36c97d1d6b07286e4483cf947fd8a6 100644 (file)
@@ -76,6 +76,7 @@ void test()
 
   cell = triangulation.begin_active();
 
+  std::ofstream two_be_plotted("plot.txt");
   for (; cell!=endc; ++cell)
     {
       fe_values.reinit(cell);
@@ -89,6 +90,7 @@ void test()
               deallog << "Expected: " << pq << ", got: "
                       << q_points_from_fe_values[q] << std::endl;
             }
+          two_be_plotted << pq <<  " " << q_points_from_fe_values[q] << std::endl;
         }
     }
   deallog << "OK" << std::endl;

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.