From 3ce41b8167632e0c4a8572f32d318a3e6dffd2ab Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 13 Feb 2010 15:52:23 +0000 Subject: [PATCH] Make things work correctly. git-svn-id: https://svn.dealii.org/trunk@20593 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/multigrid/mg_tools.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/deal.II/deal.II/source/multigrid/mg_tools.cc b/deal.II/deal.II/source/multigrid/mg_tools.cc index c1ea3c7c70..805bc75597 100644 --- a/deal.II/deal.II/source/multigrid/mg_tools.cc +++ b/deal.II/deal.II/source/multigrid/mg_tools.cc @@ -1150,10 +1150,12 @@ MGTools::make_boundary_list( // field to store the indices std::vector face_dofs; face_dofs.reserve (DoFTools::max_dofs_per_face(dof)); - std::fill (face_dofs.begin (), face_dofs.end (), DoFHandler::invalid_dof_index); + std::fill (face_dofs.begin (), face_dofs.end (), + DoFHandler::invalid_dof_index); - typename MGDoFHandler::cell_iterator cell = dof.begin(), - endc = dof.end(); + typename MGDoFHandler::cell_iterator + cell = dof.begin(), + endc = dof.end(); for (; cell!=endc; ++cell) for (unsigned int face_no = 0; face_no < GeometryInfo::faces_per_cell; ++face_no) @@ -1306,12 +1308,16 @@ make_boundary_list(const MGDoFHandler& dof, std::vector& boundary_indices, const std::vector& component_mask) { + Assert (boundary_indices.size() == dof.get_tria().n_levels(), + ExcDimensionMismatch (boundary_indices.size(), + dof.get_tria().n_levels())); + std::vector > - my_boundary_indices (boundary_indices.size()); + my_boundary_indices (dof.get_tria().n_levels()); make_boundary_list (dof, function_map, my_boundary_indices, component_mask); - for (unsigned int i=0; i