Skip to content

Commit

Permalink
fix: update fdaesolver
Browse files Browse the repository at this point in the history
  • Loading branch information
rzyu45 committed Aug 4, 2024
1 parent 5cec43e commit 091b48d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Solverz/solvers/fdesolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ def fdae_solver(fdae: nFDAE,

sol = nr_method(ae, u0, Opt(ite_tol=opt.ite_tol, stats=True))
u1 = sol.y
ite = sol.stats
stats.ndecomp = stats.ndecomp + ite
stats.nfeval = stats.nfeval + ite + 1
if ite >= 100:
stats.ndecomp = stats.ndecomp + sol.stats.ndecomp
stats.nfeval = stats.nfeval + stats.nfeval
if stats.nstep >= 100:
print(f"FDAE solver broke at time={tt} due to non-convergence")
break

Expand Down

0 comments on commit 091b48d

Please sign in to comment.