diff --git a/src/base/dof_map.C b/src/base/dof_map.C index 1fa179648d7..2e3c5162896 100644 --- a/src/base/dof_map.C +++ b/src/base/dof_map.C @@ -1110,6 +1110,8 @@ void DofMap::local_variable_indices(std::vector & idx, const MeshBase & mesh, unsigned int var_num) const { + idx.clear(); + // Count dofs in the *exact* order that distribute_dofs numbered // them, so that we can assume ascending indices and use push_back // instead of find+insert.