From a9fe2a05c114796ceb7a640e9d68c823dfa4da16 Mon Sep 17 00:00:00 2001 From: Kevin Sawatzky <66632997+nuclearkevin@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:23:29 -0600 Subject: [PATCH] Fix bin index to DoF ID mapping bug in adaptive libMesh meshes (#3206) --- src/mesh.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesh.cpp b/src/mesh.cpp index 0b051e63f62..ca644021070 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -3007,10 +3007,10 @@ void LibMesh::initialize() // contiguous in ID space, so we need to map from bin indices (defined over // active elements) to global dof ids if (adaptive_) { - bin_to_elem_map_.reserve(m_->n_active_local_elem()); - elem_to_bin_map_.resize(m_->n_local_elem(), -1); - for (auto it = m_->active_local_elements_begin(); - it != m_->active_local_elements_end(); it++) { + bin_to_elem_map_.reserve(m_->n_active_elem()); + elem_to_bin_map_.resize(m_->n_elem(), -1); + for (auto it = m_->active_elements_begin(); it != m_->active_elements_end(); + it++) { auto elem = *it; bin_to_elem_map_.push_back(elem->id());