From: Peter Munch Date: Tue, 29 Jun 2021 10:17:28 +0000 (+0200) Subject: CellWeightPolicy: global_cell_index->uint64_t X-Git-Tag: v9.4.0-rc1~1180^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12520%2Fhead;p=dealii.git CellWeightPolicy: global_cell_index->uint64_t --- diff --git a/source/distributed/repartitioning_policy_tools.cc b/source/distributed/repartitioning_policy_tools.cc index 3d51d39f6d..92d39e215c 100644 --- a/source/distributed/repartitioning_policy_tools.cc +++ b/source/distributed/repartitioning_policy_tools.cc @@ -249,12 +249,12 @@ namespace RepartitioningPolicyTools cell, Triangulation::CellStatus::CELL_PERSIST); // determine weight of all the cells locally owned by this process - types::global_cell_index process_local_weight = 0; + uint64_t process_local_weight = 0; for (const auto &weight : weights) process_local_weight += weight; // determine partial sum of weights of this process - types::global_cell_index process_local_weight_offset = 0; + uint64_t process_local_weight_offset = 0; int ierr = MPI_Exscan(&process_local_weight, @@ -266,8 +266,7 @@ namespace RepartitioningPolicyTools AssertThrowMPI(ierr); // total weight of all processes - types::global_cell_index total_weight = - process_local_weight_offset + process_local_weight; + uint64_t total_weight = process_local_weight_offset + process_local_weight; ierr = MPI_Bcast(&total_weight, 1, @@ -278,7 +277,7 @@ namespace RepartitioningPolicyTools // setup partition LinearAlgebra::distributed::Vector partition(partitioner); - for (types::global_cell_index i = 0, weight = process_local_weight_offset; + for (uint64_t i = 0, weight = process_local_weight_offset; i < partition.locally_owned_size(); weight += weights[i], ++i) partition.local_element(i) =