@@ -350,26 +350,20 @@ def _get_intersect_slice(self, mfi, starts, stops, icstart, icstop, with_interna
350
350
The slice of the intersection relative to the global array where the data from individual block will go
351
351
"""
352
352
box = mfi .tilebox ()
353
- box_small_end = box .small_end
354
- box_big_end = box .big_end
355
353
if self .include_ghosts :
356
354
nghosts = self .mf .n_grow_vect ()
357
355
if with_internal_ghosts :
358
- box .grow (self .mf .n_grow_vect ())
359
- box_small_end = box .small_end
360
- box_big_end = box .big_end
356
+ box .grow (nghosts )
361
357
else :
362
- # When available, this could be somewhat simplified by using box.grow_low and box.grow_high,
363
- # which would remove the need of the temporary copies of small_end and big_end.
364
358
min_box = self .mf .box_array ().minimal_box ()
365
359
for i in range (self .dim ):
366
- if box_small_end [i ] == min_box .small_end [i ]:
367
- box_small_end [ i ] -= nghosts [i ]
368
- if box_big_end [i ] == min_box .big_end [i ]:
369
- box_big_end [ i ] += nghosts [i ]
360
+ if box . small_end [i ] == min_box .small_end [i ]:
361
+ box . grow_low ( i , nghosts [i ])
362
+ if box . big_end [i ] == min_box .big_end [i ]:
363
+ box . grow_high ( i , nghosts [i ])
370
364
371
- ilo = self ._get_indices (box_small_end , 0 )
372
- ihi = self ._get_indices (box_big_end , 0 )
365
+ ilo = self ._get_indices (box . small_end , 0 )
366
+ ihi = self ._get_indices (box . big_end , 0 )
373
367
374
368
# Add 1 to the upper end to be consistent with the slicing notation
375
369
ihi_p1 = [i + 1 for i in ihi ]
0 commit comments