From: Peter Munch Date: Sat, 7 Nov 2020 17:22:50 +0000 (+0100) Subject: Fix compute_shared_memory_contiguous_indices X-Git-Tag: v9.3.0-rc1~920^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11154%2Fhead;p=dealii.git Fix compute_shared_memory_contiguous_indices --- diff --git a/include/deal.II/matrix_free/matrix_free.templates.h b/include/deal.II/matrix_free/matrix_free.templates.h index 311f8b8a74..03f224613c 100644 --- a/include/deal.II/matrix_free/matrix_free.templates.h +++ b/include/deal.II/matrix_free/matrix_free.templates.h @@ -1553,8 +1553,9 @@ MatrixFree::initialize_indices( const auto cell_iterator = get_cell_iterator(cell, v, di_index); // determine global cell index - const unsigned int local_dof_index = - di.dof_indices_contiguous[2][index]; + const unsigned int local_cell_index = + di.dof_indices_contiguous[2][index] / + this->get_dofs_per_cell(di_index); const types::global_cell_index global_cell_index = (additional_data.mg_level == numbers::invalid_unsigned_int) ? @@ -1567,7 +1568,8 @@ MatrixFree::initialize_indices( if (cell < n_cell_batches()) { // locally-owned cell - cells_locally_owned.emplace_back(index, global_cell_index); + cells_locally_owned.emplace_back(local_cell_index, + global_cell_index); } else { @@ -1595,8 +1597,7 @@ MatrixFree::initialize_indices( } // write back result - cells[cell * n_lanes + v] = { - sm_rank, local_dof_index / this->get_dofs_per_cell(di_index)}; + cells[cell * n_lanes + v] = {sm_rank, local_cell_index}; } std::sort(cells_locally_owned.begin(),