From 1361b9623603ac165d218a55aecb39e0103d1016 Mon Sep 17 00:00:00 2001 From: bangerth Date: Wed, 27 Nov 2013 17:19:41 +0000 Subject: [PATCH] Reset a copy object before writing into it. git-svn-id: https://svn.dealii.org/trunk@31814 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/source/dofs/dof_tools_constraints.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deal.II/source/dofs/dof_tools_constraints.cc b/deal.II/source/dofs/dof_tools_constraints.cc index b361c25d72..4ef7047725 100644 --- a/deal.II/source/dofs/dof_tools_constraints.cc +++ b/deal.II/source/dofs/dof_tools_constraints.cc @@ -2221,11 +2221,13 @@ namespace DoFTools copy_data.dofs_per_cell = coarse_fe.dofs_per_cell; copy_data.parameter_dof_indices.resize(copy_data.dofs_per_cell); - // get the global indices of the parameter dofs on this // parameter grid cell cell->get_dof_indices (copy_data.parameter_dof_indices); + // reset the output array to a pristine state + copy_data.global_parameter_representation.clear (); + // loop over all dofs on this cell and check whether they are // interesting for us for (unsigned int local_dof=0; local_dof &weight_mapping, std::vector > &weights) { - unsigned int pos(0); + unsigned int pos = 0; for (unsigned int local_dof=0; local_dof