Skip to content

Commit 7903f84

Browse files
finsbergjorgensd
andauthored
Update src/scifem/solvers.py
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
1 parent af784c0 commit 7903f84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scifem/solvers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def solve(self, atol=1e-6, rtol=1e-8, beta=1.0) -> int:
204204
self._post_solve_callback(self)
205205

206206
# Compute norm of update
207-
residual = self.dx.norm(0)
207+
residual = self.dx.norm(PETSc.NormType.NORM_2)
208208
if i == 1:
209209
self.residual_0 = residual
210210
relative_residual = residual / max(self.residual_0, atol)

0 commit comments

Comments
 (0)