Skip to content

Commit

Permalink
Fix element mapping bug when using MPI.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearkevin committed Nov 25, 2024
1 parent 2d988a6 commit 1ae19dc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 1ae19dc

Please sign in to comment.