From e62bd2e21b0e856b31d4282e1258daf2adf7de65 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 17 Sep 2002 16:05:55 +0000 Subject: [PATCH] Add an assertion that promptly triggers, and remove the underlying bug. git-svn-id: https://svn.dealii.org/trunk@6441 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_system.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_system.cc b/deal.II/deal.II/source/fe/fe_system.cc index 006eeb9699..348b3332a0 100644 --- a/deal.II/deal.II/source/fe/fe_system.cc +++ b/deal.II/deal.II/source/fe/fe_system.cc @@ -1397,18 +1397,26 @@ void FESystem::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 >= -- 2.39.5