@@ -182,29 +182,29 @@ void LBDataRestartReader::determinePhasesToMigrate() {
182
182
183
183
auto const this_node = theContext ()->getNode ();
184
184
runInEpochCollective (" LBDataRestartReader::updateLocations" , [&]{
185
- for (PhaseType curr = 0 ; curr < num_phases_ - 1 ; ++curr ) {
186
- if (history_.count (curr ) && history_.count (curr + 1 )) {
187
- local_changed_distro[curr ] = *history_[curr ] != *history_[curr + 1 ];
188
- if (local_changed_distro[curr ]) {
185
+ for (PhaseType i = 0 ; i < num_phases_ - 1 ; ++i ) {
186
+ if (history_.count (i ) && history_.count (i+ 1 )) {
187
+ local_changed_distro[i ] = *history_[i ] != *history_[i+ 1 ];
188
+ if (local_changed_distro[i ]) {
189
189
std::set<ElementIDStruct> departing, arriving;
190
190
191
191
std::set_difference (
192
- history_[curr + 1 ]->begin (), history_[curr + 1 ]->end (),
193
- history_[curr ]->begin (), history_[curr ]->end (),
192
+ history_[i+ 1 ]->begin (), history_[i+ 1 ]->end (),
193
+ history_[i ]->begin (), history_[i ]->end (),
194
194
std::inserter (arriving, arriving.begin ())
195
195
);
196
196
197
197
std::set_difference (
198
- history_[curr ]->begin (), history_[curr ]->end (),
199
- history_[curr + 1 ]->begin (), history_[curr + 1 ]->end (),
198
+ history_[i ]->begin (), history_[i ]->end (),
199
+ history_[i+ 1 ]->begin (), history_[i+ 1 ]->end (),
200
200
std::inserter (departing, departing.begin ())
201
201
);
202
202
203
203
for (auto && d : departing) {
204
- proxy_[d.getHomeNode ()].send <DepartMsg, &LBDataRestartReader::departing>(this_node, curr + 1 , d);
204
+ proxy_[d.getHomeNode ()].send <DepartMsg, &LBDataRestartReader::departing>(this_node, i+ 1 , d);
205
205
}
206
206
for (auto && a : arriving) {
207
- proxy_[a.getHomeNode ()].send <ArriveMsg, &LBDataRestartReader::arriving>(this_node, curr + 1 , a);
207
+ proxy_[a.getHomeNode ()].send <ArriveMsg, &LBDataRestartReader::arriving>(this_node, i+ 1 , a);
208
208
}
209
209
}
210
210
}
0 commit comments