From a7917dad35a3dfb5bcb7bf0565de8a54aeb981fa Mon Sep 17 00:00:00 2001 From: hartmann Date: Fri, 29 Feb 2008 08:41:56 +0000 Subject: [PATCH] Usually, an FESubfaceValues::reinit(cell,face_no,subface_no) should be called only on faces with subfaces, i.e. on faces with children. However, some tests like bits/normal_1 call this function even on faces without children. Make sure that these tests do not break. git-svn-id: https://svn.dealii.org/trunk@15815 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_values.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index 866c10c757..2a94eab2a9 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -1783,8 +1783,10 @@ void FESubfaceValues::reinit (const typename DoFHandler::cell_iterator if (dim==3) real_subface_no=GeometryInfo::standard_to_real_face_vertex( subface_no, cell->face_orientation(face_no), cell->face_flip(face_no), cell->face_rotation(face_no)); - this->present_face_index=cell->face(face_no)->child_index(real_subface_no); - + if (cell->face(face_no)->has_children()) + this->present_face_index=cell->face(face_no)->child_index(real_subface_no); + else + this->present_face_index=cell->face_index(face_no); // set new cell. auto_ptr will take // care that old object gets // destroyed and also that this -- 2.39.5