From: Wolfgang Bangerth Date: Thu, 17 Sep 2015 17:42:14 +0000 (-0500) Subject: Simplify some code. X-Git-Tag: v8.4.0-rc2~398^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1597%2Fhead;p=dealii.git Simplify some code. --- diff --git a/source/fe/mapping_q1.cc b/source/fe/mapping_q1.cc index c4684cd5c3..a1ab7c72f0 100644 --- a/source/fe/mapping_q1.cc +++ b/source/fe/mapping_q1.cc @@ -433,23 +433,14 @@ transform_real_to_unit_cell (const typename Triangulation::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::InternalData> - mdata (new typename MappingQGeneric::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::vertices_per_cell, ExcInternalError()); - // Ignore non vertex support points. - mdata->mapping_support_points.resize(GeometryInfo::vertices_per_cell); // perform the Newton iteration and // return the result. note that this