Skip to content

Commit ef0d80d

Browse files
committed
fix DealIIVector amax
The vector binding to pyMOR was missing taking the absolute values of the contained vector before computing and returning the max+index
1 parent c698adb commit ef0d80d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pymor_dealii/pymor/vectorarray.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ def dofs(self, dof_indices):
7575
return np.array([self.impl[i] for i in dof_indices])
7676

7777
def amax(self):
78-
max_ind = np.argmax(self.impl)
79-
return max_ind, self.impl[max_ind]
78+
A = np.abs(self.to_numpy())
79+
max_ind = np.argmax(A)
80+
return max_ind, A[max_ind]
8081

8182
def __add__(self, other):
8283
return DealIIVector(self.impl + other.impl)

0 commit comments

Comments
 (0)