Skip to content

Commit 389e6d1

Browse files
authored
Merge pull request #5221 from matthewturk/issue_5220
BUG: Fix partition_index_2d
2 parents 760c7a7 + 0404677 commit 389e6d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

yt/utilities/parallel_tools/parallel_analysis_interface.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,9 @@ def _finalize_parallel(self):
12241224
pass
12251225

12261226
def partition_index_2d(self, axis):
1227+
center = getattr(self, "center", self.ds.domain_center)
12271228
if not self._distributed:
1228-
return False, self.index.grid_collection(self.center, self.index.grids)
1229+
return False, self.index.grid_collection(center, self.index.grids)
12291230

12301231
xax = self.ds.coordinates.x_axis[axis]
12311232
yax = self.ds.coordinates.y_axis[axis]
@@ -1244,7 +1245,7 @@ def partition_index_2d(self, axis):
12441245
RE[yax] = y[1] * (DRE[yax] - DLE[yax]) + DLE[yax]
12451246
mylog.debug("Dimensions: %s %s", LE, RE)
12461247

1247-
reg = self.ds.region(self.center, LE, RE)
1248+
reg = self.ds.region(center, LE, RE)
12481249
return True, reg
12491250

12501251
def partition_index_3d(self, ds, padding=0.0, rank_ratio=1):

0 commit comments

Comments
 (0)