From 2be05c82f1651e6f369ef23eb547a6c586ed22bc Mon Sep 17 00:00:00 2001 From: Wolfgang 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