Skip to content

Commit

Permalink
Small cleanup in mesh datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
brownbaerchen committed Sep 16, 2024
1 parent 32549d9 commit b228ffd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pySDC/implementations/datatype_classes/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ def __abs__(self):
float: absolute maximum of all mesh values
"""
# take absolute values of the mesh values
local_absval = float(np.amax(np.ndarray.__abs__(self)))
local_absval = float(np.max(np.ndarray.__abs__(self)))

if self.comm is not None:
if self.comm.Get_size() > 1:
global_absval = 0.0
global_absval = max(self.comm.allreduce(sendobj=local_absval, op=MPI.MAX), global_absval)
if self.comm.size > 1:
global_absval = self.comm.allreduce(sendobj=local_absval, op=MPI.MAX)
else:
global_absval = local_absval
else:
Expand Down

0 comments on commit b228ffd

Please sign in to comment.