From: Wolfgang Bangerth Date: Mon, 13 Feb 2006 22:53:30 +0000 (+0000) Subject: Add checks that show the error triggered by hp/crash_01 X-Git-Tag: v8.0.0~12310 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c4a8d9afdc1f42a902feea2f023b8a1cb3fec2e;p=dealii.git Add checks that show the error triggered by hp/crash_01 git-svn-id: https://svn.dealii.org/trunk@12372 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/hp_dof_handler.cc b/deal.II/deal.II/source/dofs/hp_dof_handler.cc index 8dd1de78ea..5c5492499b 100644 --- a/deal.II/deal.II/source/dofs/hp_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/hp_dof_handler.cc @@ -2067,6 +2067,16 @@ namespace hp if (active_fe2 == invalid_dof_index) active_fe2 = active_fe1; + // at this point, all + // indices should be ok + // (but weren't at one + // point, thus the + // crash_01 testcase) + Assert (active_fe1 < finite_elements->size(), + ExcInternalError()); + Assert (active_fe2 < finite_elements->size(), + ExcInternalError()); + if (active_fe1 == active_fe2) dofs_for_lines += (*finite_elements)[active_fe1].dofs_per_line + 2; else @@ -2087,9 +2097,13 @@ namespace hp levels.back()->quad_dofs = std::vector (dofs_for_quads, invalid_dof_index); - // As we already have the active_fe_indices for the lines, it is probably - // a good idea to directly use those to create the linked list structure - // within the line_dofs field. + // As we already have the + // active_fe_indices for the + // lines, it is probably a + // good idea to directly use + // those to create the linked + // list structure within the + // line_dofs field. for (unsigned int j = 0; j < tria->n_raw_lines(i); ++j) { dofs_for_lines = levels.back()->dof_line_index_offset[j]; @@ -2098,14 +2112,29 @@ namespace hp unsigned int active_fe1 = line_active_fe_indices[j*2], active_fe2 = line_active_fe_indices[j*2+1]; - // Check for boundary lines, where clearly one of the line indices - // is missing. + // Check for boundary + // lines, where clearly + // one of the line + // indices is missing. if (active_fe1 == invalid_dof_index) active_fe1 = active_fe2; if (active_fe2 == invalid_dof_index) active_fe2 = active_fe1; - // Now create prepare linked list, with either 1 or two entries. + // at this point, all + // indices should be ok + // (but weren't at one + // point, thus the + // crash_01 testcase) + Assert (active_fe1 < finite_elements->size(), + ExcInternalError()); + Assert (active_fe2 < finite_elements->size(), + ExcInternalError()); + + // Now create prepare + // linked list, with + // either 1 or two + // entries. levels.back()->line_dofs[dofs_for_lines] = active_fe1; if (active_fe1 == active_fe2) levels.back()->line_dofs[dofs_for_lines + 1] =