Skip to content

Commit 1a0747a

Browse files
committed
fix: Avoid non-converging flow due to large perturbation
1 parent 8264bcf commit 1a0747a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/FlowCalculator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ IterationResult powerIterate(double alpha, Iteration&& iter)
301301
err = iter(iterations, alpha, beta);
302302

303303
// Perturb the system if equilibrium
304-
if (std::abs(err - oldErr) < 1e-15) {
305-
alpha += 1.0e-10;
304+
if (std::abs(err - oldErr) < 1e-17) {
305+
alpha += 1.0e-12;
306306
beta = 1.0 - alpha;
307307
}
308308

0 commit comments

Comments
 (0)