Skip to content

Commit

Permalink
Fixup 4f9b29c , fixing bug in PointCloud constructor regarding global…
Browse files Browse the repository at this point in the history
… index computation with nb_parts==1
  • Loading branch information
wdeconinck committed Sep 22, 2023
1 parent d02f399 commit 184134b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/atlas/functionspace/PointCloud.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ PointCloud::PointCloud(const Grid& grid, const grid::Partitioner& _partitioner,
idx_t j{0};
gidx_t g{0};
for (auto p : grid.lonlat()) {
if( distribution.partition(g++) == part_ ) {
if( distribution.partition(g) == part_ ) {
gidx(j) = g+1;
ridx(j) = j;
lonlat(j, 0) = p.lon();
lonlat(j, 1) = p.lat();
++j;
}
++g;
}
}
else {
Expand Down

0 comments on commit 184134b

Please sign in to comment.