From: bangerth Date: Fri, 16 Dec 2011 15:15:06 +0000 (+0000) Subject: Slightly simplify the code. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44191e4e5e127f410dc06229ae8a58b45f5bceef;p=dealii-svn.git Slightly simplify the code. git-svn-id: https://svn.dealii.org/trunk@24835 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/fe/mapping_q.cc b/deal.II/source/fe/mapping_q.cc index 874491dd0a..4ab65f68ae 100644 --- a/deal.II/source/fe/mapping_q.cc +++ b/deal.II/source/fe/mapping_q.cc @@ -1378,9 +1378,12 @@ transform_real_to_unit_cell (const typename Triangulation::cell_it // on a Q1 mapping Point p_unit = MappingQ1::transform_real_to_unit_cell(cell, p); - // then a Newton iteration based on - // the full MappingQ if we need - // this + // then a Newton iteration based on the + // full MappingQ if we need this. note that + // for interior cells with dim==spacedim, + // the mapping used is in fact a Q1 + // mapping, so there is nothing we need to + // do if (cell->has_boundary_lines() || use_mapping_q_on_all_cells || (dim!=spacedim) ) @@ -1394,13 +1397,13 @@ transform_real_to_unit_cell (const typename Triangulation::cell_it mdata->use_mapping_q1_on_current_cell = false; - std::vector > &points = mdata->mapping_support_points; - compute_mapping_support_points (cell, points); + compute_mapping_support_points (cell, mdata->mapping_support_points); + // If this is a q1 mapping, // then only use the support // points on the vertices. - if(mdata->shape_values.size()::vertices_per_cell); + if (mdata->shape_values.size() < mdata->mapping_support_points.size()) + mdata->mapping_support_points.resize(GeometryInfo::vertices_per_cell); this->transform_real_to_unit_cell_internal(cell, p, *mdata, p_unit);