From a12e411ed82c33e088329c539aa2c07552d9b607 Mon Sep 17 00:00:00 2001 From: Edward Caunt Date: Mon, 22 Apr 2024 15:22:17 +0100 Subject: [PATCH] misc: Update inhalo property aliases --- devito/types/dense.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/devito/types/dense.py b/devito/types/dense.py index 69ab530905f..836455b6c36 100644 --- a/devito/types/dense.py +++ b/devito/types/dense.py @@ -243,7 +243,20 @@ def shape_with_halo(self): """ return tuple(j + i + k for i, (j, k) in zip(self.shape, self._size_outhalo)) - _shape_with_outhalo = shape_with_halo + @property + def _shape_with_outhalo(self): + """ + Shape of the domain+outhalo region. The outhalo is the region + surrounding the domain that may be read by an Operator. + + Notes + ----- + In an MPI context, this is the *local* with_halo region shape. + Further, note that the outhalo of inner ranks is typically empty, while + the outhalo of boundary ranks contains a number of elements depending + on the rank position in the decomposed grid (corner, side, ...). + """ + return self.shape_with_halo @cached_property def _shape_with_inhalo(self): @@ -310,8 +323,15 @@ def size_global(self): """ return reduce(mul, self.shape_global) - _offset_inhalo = AbstractFunction._offset_halo - _size_inhalo = AbstractFunction._size_halo + @property + def _offset_inhalo(self): + """Number of points before the first and last inner halo elements.""" + return AbstractFunction._offset_halo + + @property + def _size_inhalo(self): + """Number of points in the inner halo region.""" + return AbstractFunction._size_halo @cached_property def _size_outhalo(self):