From 27e4dabe6a38383b3d671c41ea8417346e6236af Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 6 Sep 2015 18:26:09 -0500 Subject: [PATCH] Relegate getting an initial guess to StaticMappingQ1. --- source/fe/mapping_q.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/fe/mapping_q.cc b/source/fe/mapping_q.cc index d1aeb6b850..4447272c2b 100644 --- a/source/fe/mapping_q.cc +++ b/source/fe/mapping_q.cc @@ -63,8 +63,17 @@ MappingQ::MappingQ (const unsigned int degree, ((dim==2) ? 4+4*(degree-1) : 8+12*(degree-1)+6*(degree-1)*(degree-1))), - use_mapping_q_on_all_cells (use_mapping_q_on_all_cells - || (dim != spacedim)), + + // see whether we want to use *this* mapping objects on *all* cells, + // or defer to an explicit Q1 mapping on interior cells. if + // degree==1, then we are already that Q1 mapping, so we don't need + // it; if dim!=spacedim, there is also no need for anything because + // we're most likely on a curved manifold + use_mapping_q_on_all_cells (degree==1 + || + use_mapping_q_on_all_cells + || + (dim != spacedim)), feq(degree), q1_mapping (this->use_mapping_q_on_all_cells ? @@ -1028,7 +1037,7 @@ transform_real_to_unit_cell (const typename Triangulation::cell_it try { initial_p_unit - = MappingQ1::transform_real_to_unit_cell(cell, p); + = StaticMappingQ1::mapping.transform_real_to_unit_cell(cell, p); } catch (const typename Mapping::ExcTransformationFailed &) { -- 2.39.5