]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reset a copy object before writing into it.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 27 Nov 2013 17:19:41 +0000 (17:19 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 27 Nov 2013 17:19:41 +0000 (17:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@31814 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/dofs/dof_tools_constraints.cc

index b361c25d72777c9c5c27b3ec7160ae7af0fce303..4ef7047725ea716d6d45acdc86e106aedd0662ef 100644 (file)
@@ -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<copy_data.dofs_per_cell; ++local_dof)
@@ -2263,7 +2265,7 @@ namespace DoFTools
                                    const std::vector<types::global_dof_index>             &weight_mapping,
                                     std::vector<std::map<types::global_dof_index, float> > &weights)
       {
-        unsigned int pos(0);
+        unsigned int pos = 0;
         for (unsigned int local_dof=0; local_dof<copy_data.dofs_per_cell; ++local_dof)
           if (coarse_fe.system_to_component_index(local_dof).first
               ==

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.