Skip to content

Commit f34afcc

Browse files
committed
Add maxiter arg to find_zero
1 parent fa1e426 commit f34afcc

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/Meshes/interval.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ function IntervalMesh(
296296
RootSolvers.SecantMethod(guess₋, guess₊),
297297
RootSolvers.CompactSolution(),
298298
RootSolvers.ResidualTolerance(FT_solve(tol)),
299+
maxiters = 10_000,
299300
)
300301
if h_bottom_sol.converged !== true
301302
error(
@@ -316,6 +317,7 @@ function IntervalMesh(
316317
RootSolvers.SecantMethod(guess₋, guess₊),
317318
RootSolvers.CompactSolution(),
318319
RootSolvers.ResidualTolerance(FT_solve(tol)),
320+
maxiters = 10_000,
319321
)
320322
if h_top_sol.converged !== true
321323
error(
@@ -410,6 +412,7 @@ function IntervalMesh(
410412
RootSolvers.NewtonsMethodAD(FT_solve(1.0)),
411413
RootSolvers.CompactSolution(),
412414
RootSolvers.ResidualTolerance(FT_solve(tol)),
415+
maxiters = 10_000,
413416
)
414417
if γ_sol.converged !== true
415418
error(

src/Operators/integrals.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function column_integral_indefinite!(
7373
RootSolvers.NewtonsMethodAD(ϕ_prev),
7474
RootSolvers.CompactSolution(),
7575
RootSolvers.RelativeSolutionTolerance(rtol),
76+
maxiters = 10_000,
7677
)
7778
ClimaComms.@assert device converged "unable to integrate through \
7879
z = $z with rtol set to $rtol"

0 commit comments

Comments
 (0)