Skip to content

Commit 1708ab2

Browse files
Small cleanup in mesh datatype (#484)
1 parent f1b8fbd commit 1708ab2

File tree

1 file changed

+3
-4
lines changed
  • pySDC/implementations/datatype_classes

1 file changed

+3
-4
lines changed

pySDC/implementations/datatype_classes/mesh.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ def __abs__(self):
7070
float: absolute maximum of all mesh values
7171
"""
7272
# take absolute values of the mesh values
73-
local_absval = float(np.amax(np.ndarray.__abs__(self)))
73+
local_absval = float(np.max(np.ndarray.__abs__(self)))
7474

7575
if self.comm is not None:
76-
if self.comm.Get_size() > 1:
77-
global_absval = 0.0
78-
global_absval = max(self.comm.allreduce(sendobj=local_absval, op=MPI.MAX), global_absval)
76+
if self.comm.size > 1:
77+
global_absval = self.comm.allreduce(sendobj=local_absval, op=MPI.MAX)
7978
else:
8079
global_absval = local_absval
8180
else:

0 commit comments

Comments
 (0)