]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify some code. 1597/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 17 Sep 2015 17:42:14 +0000 (12:42 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 17 Sep 2015 19:45:32 +0000 (14:45 -0500)
source/fe/mapping_q1.cc

index c4684cd5c35263f4a47eadc6eef0e0820ceedd21..a1ab7c72f0ebb434dae64fa356fb2152c93901f4 100644 (file)
@@ -433,23 +433,14 @@ transform_real_to_unit_cell (const typename Triangulation<dim,spacedim>::cell_it
       if (spacedim>dim)
         update_flags |= update_jacobian_grads;
 
-      //TODO: Use get_data() here once MappingQ is no longer derived from
-      //MappingQ1. this doesn't currently work because we here really need
-      //a Q1 InternalData, but MappingQGeneric produces one with the
-      //polynomial degree of the MappingQ
       std_cxx11::unique_ptr<typename MappingQGeneric<dim,spacedim>::InternalData>
-      mdata (new typename MappingQGeneric<dim,spacedim>::InternalData(1));
-      mdata->initialize (this->requires_update_flags (update_flags), point_quadrature, 1);
+      mdata (this->get_data(update_flags,
+                            point_quadrature));
 
       compute_mapping_support_points (cell, mdata->mapping_support_points);
-      // The support points have to be at
-      // least as many as there are
-      // vertices.
-      Assert(mdata->mapping_support_points.size() >=
+      Assert(mdata->mapping_support_points.size() ==
              GeometryInfo<dim>::vertices_per_cell,
              ExcInternalError());
-      // Ignore non vertex support points.
-      mdata->mapping_support_points.resize(GeometryInfo<dim>::vertices_per_cell);
 
       // perform the Newton iteration and
       // return the result. note that this

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.