From f89c5aff994a5adbc2c79104c585a09ea456aa8c Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 29 Jun 2012 07:56:57 +0000 Subject: [PATCH] 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 --- deal.II/source/fe/mapping_q.cc | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) 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 || -- 2.39.5