SubDimension(self, *args, **kwargs)

Symbol defining a convex iteration sub-space derived from a parent Dimension.


Name Type Description Default
name str Name of the dimension. required
parent devito.types.dimension.Dimension The parent Dimension. required
left expr - like Symbolic expression providing the left (lower) bound of the SubDimension. required
right expr - like Symbolic expression providing the right (upper) bound of the SubDimension. required
thickness 2-tuple of 2-tuples The thickness of the left and right regions, respectively. required
local bool True if, in case of domain decomposition, the SubDimension is guaranteed not to span more than one domains, False otherwise. required


SubDimensions should not be created directly in user code; SubDomains should be used instead. Exceptions are rare.

To create a SubDimension, one should use the shortcut methods left, right, middle. For example, to create a SubDimension that spans the entire space of the parent Dimension except for the two extremes:

>>> from devito import Dimension, SubDimension
>>> x = Dimension('x')
>>> xi = SubDimension.middle('xi', x, 1, 1)

For a SubDimension that only spans the three leftmost points of its parent Dimension, instead:

>>> xl = SubDimension.left('xl', x, 3)

SubDimensions created via the left and right shortcuts are, by default, local (i.e., non-distributed) Dimensions, as they are assumed to fit entirely within a single domain. This is the most typical use case (e.g., to set up boundary conditions). To drop this assumption, pass local=False.


Name Description
is_Sub bool(x) -> bool
Back to top