Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
apply pr suggestions for naming things
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarothwell1 committed Mar 6, 2024
1 parent 3527ef5 commit fe848d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyop2/global_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 = {}
Expand Down
2 changes: 1 addition & 1 deletion pyop2/types/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyop2/types/set.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = {}
Expand Down

0 comments on commit fe848d7

Please sign in to comment.