diff --git a/pyop2/global_kernel.py b/pyop2/global_kernel.py index d49a2a5de..9b2f1df7b 100644 --- a/pyop2/global_kernel.py +++ b/pyop2/global_kernel.py @@ -294,7 +294,7 @@ def __init__(self, local_kernel, arguments, *, subset=False, iteration_region=None, pass_layer_arg=False, - form_signature=None): + signature=None): if self._initialized: return @@ -329,7 +329,7 @@ def __init__(self, local_kernel, arguments, *, self._subset = subset self._iteration_region = iteration_region self._pass_layer_arg = pass_layer_arg - self._form_signature = form_signature + self.signature = signature # Cache for stashing the compiled code self._func_cache = {} diff --git a/pyop2/types/dataset.py b/pyop2/types/dataset.py index 13ad7904f..6af860b4f 100644 --- a/pyop2/types/dataset.py +++ b/pyop2/types/dataset.py @@ -183,7 +183,7 @@ def local_ises(self): def layout_vec(self): """A PETSc Vec compatible with the dof layout of this DataSet.""" vec = PETSc.Vec().create(comm=self.comm) - size = (self.size * self.cdim - self.set.constrained_size, None) + size = ((self.size - self.set.constrained_size) * self.cdim, None) vec.setSizes(size, bsize=self.cdim) vec.setUp() return vec diff --git a/pyop2/types/set.py b/pyop2/types/set.py index 607d5098a..2bfbf962e 100644 --- a/pyop2/types/set.py +++ b/pyop2/types/set.py @@ -64,7 +64,7 @@ def _wrapper_cache_key_(self): @utils.validate_type(('size', (numbers.Integral, tuple, list, np.ndarray), ex.SizeTypeError), ('name', str, ex.NameTypeError)) - def __init__(self, size, name=None, halo=None, comm=None, constrained_nodes=0): + def __init__(self, size, name=None, halo=None, comm=None, constrained_size=0): self.comm = mpi.internal_comm(comm, self) if isinstance(size, numbers.Integral): size = [size] * 3 @@ -75,7 +75,7 @@ def __init__(self, size, name=None, halo=None, comm=None, constrained_nodes=0): self._name = name or "set_#x%x" % id(self) self._halo = halo self._partition_size = 1024 - self._constrained_size = constrained_nodes + self._constrained_size = constrained_size # A cache of objects built on top of this set self._cache = {}