]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add an assertion that promptly triggers, and remove the underlying bug.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Sep 2002 16:05:55 +0000 (16:05 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 17 Sep 2002 16:05:55 +0000 (16:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@6441 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_system.cc

index 006eeb96999caad5ccab067043f74dc96455409d..348b3332a0a2d584685112d4437a1aafbb43246e 100644 (file)
@@ -1397,18 +1397,26 @@ void FESystem<dim>::build_interface_constraints ()
                   }
                 else
                                                    // on one of the four sub-quads
-                  {   
+                  {
                                                      // for the
                                                      // meaning of all
                                                      // this, see the
                                                      // 2d part
                     const unsigned int index_in_quad
-                      = (m-5*this->dofs_per_vertex-12*this->dofs_per_line) % this->dofs_per_line;
+                      = (m-5*this->dofs_per_vertex-12*this->dofs_per_line) %
+                      this->dofs_per_quad;
+                    Assert (index_in_quad < this->dofs_per_quad,
+                            ExcInternalError());
                     const unsigned int sub_quad
-                      = (m-5*this->dofs_per_vertex-12*this->dofs_per_line) / this->dofs_per_line;
+                      = ((m-5*this->dofs_per_vertex-12*this->dofs_per_line) /
+                         this->dofs_per_quad);
                     Assert (sub_quad < 4, ExcInternalError());
 
-                    const unsigned int tmp1 = 4*this->dofs_per_vertex+4*this->dofs_per_line+index_in_quad;
+                    const unsigned int tmp1 = 4*this->dofs_per_vertex +
+                                              4*this->dofs_per_line +
+                                              index_in_quad;
+                    Assert (tmp1 < this->face_system_to_base_table.size(),
+                            ExcInternalError());
                     m_index.first = this->face_system_to_base_table[tmp1].first;
 
                     Assert (this->face_system_to_base_table[tmp1].second >=

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.