Skip to content

Commit

Permalink
Put serial case back in for DataSet
Browse files Browse the repository at this point in the history
  • Loading branch information
emmarothwell1 committed Jan 25, 2024
1 parent 2b1e79f commit 26f2e51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyop2/types/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,12 @@ def lgmap(self):
indices for this :class:`DataSet`.
"""
lgmap = PETSc.LGMap()
lgmap.create(indices=self.halo.local_to_global_numbering,
bsize=self.cdim, comm=self.comm)
if self.comm.size == 1 and self.halo is None:
lgmap.create(indices=np.arange(self.size, dtype=dtypes.IntType),
bsize=self.cdim, comm=self.comm)
else:
lgmap.create(indices=self.halo.local_to_global_numbering,
bsize=self.cdim, comm=self.comm)
return lgmap

@utils.cached_property
Expand Down

0 comments on commit 26f2e51

Please sign in to comment.