From 7d47eba131c5701a3bdb3b6436d58766117e75a6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 17 Sep 2015 12:42:14 -0500 Subject: [PATCH] Simplify some code. --- source/fe/mapping_q1.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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 -- 2.39.5