From: bangerth Date: Fri, 29 Jun 2012 07:56:57 +0000 (+0000) Subject: Work around a problem where we now got into an if-branch that we X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f89c5aff994a5adbc2c79104c585a09ea456aa8c;p=dealii-svn.git Work around a problem where we now got into an if-branch that we didn't want to get into. git-svn-id: https://svn.dealii.org/trunk@25659 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/fe/mapping_q.cc b/deal.II/source/fe/mapping_q.cc index 4105d61f02..53a95a9790 100644 --- a/deal.II/source/fe/mapping_q.cc +++ b/deal.II/source/fe/mapping_q.cc @@ -1458,20 +1458,36 @@ transform_real_to_unit_cell (const typename Triangulation::cell_it // the inverse mapping doesn't // converge. in that case, use the // center point of the cell as a - // starting point + // starting point if we are to go + // on using the full mapping, or + // just propagate up the exception + // if we had no intention of + // continuing with the full mapping Point initial_p_unit; - bool initial_p_unit_is_valid = false; try { initial_p_unit = MappingQ1::transform_real_to_unit_cell(cell, p); - - initial_p_unit_is_valid = true; } catch (const typename Mapping::ExcTransformationFailed &) { - for (unsigned int d=0; dhas_boundary_lines() + || + use_mapping_q_on_all_cells + || + (dim!=spacedim) ) + { + for (unsigned int d=0; d::cell_it // the mapping used is in fact a Q1 // mapping, so there is nothing we need to // do unless the iteration above failed - if ((initial_p_unit_is_valid == false) - || - cell->has_boundary_lines() + if (cell->has_boundary_lines() || use_mapping_q_on_all_cells ||