]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Usually, an FESubfaceValues::reinit(cell,face_no,subface_no) should be
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Fri, 29 Feb 2008 08:41:56 +0000 (08:41 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Fri, 29 Feb 2008 08:41:56 +0000 (08:41 +0000)
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

index 866c10c757ec10d93ee5b80d609d7a8615015e3b..2a94eab2a9c24dc1b3e024e49a76f376d3037aed 100644 (file)
@@ -1783,8 +1783,10 @@ void FESubfaceValues<dim>::reinit (const typename DoFHandler<dim>::cell_iterator
   if (dim==3)
     real_subface_no=GeometryInfo<dim>::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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.