diff --git a/devito/types/array.py b/devito/types/array.py index 34237f01bf..62c1b62f49 100644 --- a/devito/types/array.py +++ b/devito/types/array.py @@ -368,6 +368,8 @@ def __args_setup__(cls, *args, **kwargs): raise ValueError("Component type must be subclass of AbstractFunction") if len({i.__padding_dtype__ for i in components}) != 1: raise ValueError("Components must have the same padding dtype") + if len({i.properties for i in components}) != 1: + raise ValueError("Components must have the same properties") return args, kwargs @@ -441,12 +443,13 @@ def initvalue(self): # Overrides defaulting to self.c0's behaviour - for i in ['_mem_internal_eager', '_mem_internal_lazy', '_mem_local', + for i in ('_mem_internal_eager', '_mem_internal_lazy', '_mem_local', '_mem_mapped', '_mem_host', '_mem_stack', '_mem_constant', '_mem_shared', '__padding_dtype__', '_size_domain', '_size_halo', '_size_owned', '_size_padding', '_size_nopad', '_size_nodomain', '_offset_domain', '_offset_halo', '_offset_owned', '_dist_dimensions', - '_C_get_field', 'grid', 'symbolic_shape']: + '_C_get_field', 'grid', 'symbolic_shape', + *AbstractFunction.__properties__): locals()[i] = property(lambda self, v=i: getattr(self.c0, v)) @property