From 489b5dee359cda62f312b24112ef998a2781a38e Mon Sep 17 00:00:00 2001 From: guido Date: Thu, 28 Nov 2002 07:36:27 +0000 Subject: [PATCH] Const vector remains const git-svn-id: https://svn.dealii.org/trunk@6789 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/multigrid/mg_dof_tools.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc index 0efff8dd00..5a0ee582fe 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc @@ -377,10 +377,17 @@ template void MGTools::reinit_vector (const MGDoFHandler& mg_dof, MGLevelObject >& v, - const std::vector& selected) + const std::vector& selected_in) { - const unsigned int ncomp = mg_dof.get_fe().n_components(); + // Copy selection vector to + // non-const since we may want to + // do some manipulations. + std::vector selected = selected_in; + const unsigned int ncomp = mg_dof.get_fe().n_components(); + + // If selected is an empty vector, + // all components are selected. if (selected.size() == 0) { selected.resize(ncomp); -- 2.39.5