Skip to content

Commit

Permalink
Merge pull request #1748 from devitocodes/faster-glb-to-loc
Browse files Browse the repository at this point in the history
mpi: Speedup index_glb_to_loc
  • Loading branch information
FabioLuporini committed Sep 5, 2021
2 parents 18c842a + 7cfa884 commit a5acfcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devito/data/decomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def index_glb_to_loc(self, *args, rel=True):
if glb_idx < 0:
glb_idx = self.glb_max + glb_idx + 1
# -> Do the actual conversion
if glb_idx in self.loc_abs_numb:
if self.loc_abs_min <= glb_idx <= self.loc_abs_max:
return glb_idx - base
elif self.glb_min <= glb_idx <= self.glb_max:
return None
Expand Down

0 comments on commit a5acfcb

Please sign in to comment.