From dd44b926b8f809e232b8df8a330fddb8e7f69052 Mon Sep 17 00:00:00 2001 From: Alex Lindsay Date: Wed, 22 May 2024 11:30:07 -0700 Subject: [PATCH] Clear incoming idx vector to local_variable_indices --- src/base/dof_map.C | 2 ++ 1 file changed, 2 insertions(+) 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.