From: guido Date: Thu, 28 Nov 2002 07:36:27 +0000 (+0000) Subject: Const vector remains const X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489b5dee359cda62f312b24112ef998a2781a38e;p=dealii-svn.git Const vector remains const git-svn-id: https://svn.dealii.org/trunk@6789 0785d39b-7218-0410-832d-ea1e28bc413d --- 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);