@@ -12,7 +12,7 @@ Algorithm 2 from the classical work by Eisenstat and Walker (1996) as described
1212 safeguard_threshold
1313end
1414
15- function EisenstatWalkerForcing2 (; η₀ = 0.5 , ηₘₐₓ = 0.99 , γ = 0.9 , α = 2 , safeguard = true , safeguard_threshold = 0.1 )
15+ function EisenstatWalkerForcing2 (; η₀ = 0.5 , ηₘₐₓ = 0.9 , γ = 0.9 , α = 2 , safeguard = true , safeguard_threshold = 0.1 )
1616 EisenstatWalkerForcing2 (η₀, ηₘₐₓ, γ, α, safeguard, safeguard_threshold)
1717end
1818
@@ -32,6 +32,7 @@ function pre_step_forcing!(cache::EisenstatWalkerForcing2Cache, descend_cache::N
3232 # On the first iteration we initialize η with the default initial value and stop.
3333 if iter == 0
3434 cache. η = cache. p. η₀
35+ @SciMLMessage (" Eisenstat-Walker initial iteration to η=$(cache. η) ." , cache. verbosity, :linear_verbosity )
3536 LinearSolve. update_tolerances! (descend_cache. lincache; reltol= cache. η)
3637 return nothing
3738 end
@@ -56,7 +57,7 @@ function pre_step_forcing!(cache::EisenstatWalkerForcing2Cache, descend_cache::N
5657 # Far away from the root we also need to respect η ∈ [0,1)
5758 cache. η = clamp (cache. η, 0.0 , cache. p. ηₘₐₓ)
5859
59- @SciMLMessage (" Eisenstat-Walker update to η=$(cache. η) ." , cache. verbosity, :linear_verbosity )
60+ @SciMLMessage (" Eisenstat-Walker iter $iter update to η=$(cache. η) ." , cache. verbosity, :linear_verbosity )
6061
6162 # Communicate new relative tolerance to linear solve
6263 LinearSolve. update_tolerances! (descend_cache. lincache; reltol= cache. η)
6970function post_step_forcing! (cache:: EisenstatWalkerForcing2Cache , J, u, fu, δu, iter)
7071 # Cache previous residual norm
7172 cache. rnorm_prev = cache. rnorm
72- # And update the current one
7373 cache. rnorm = cache. internalnorm (fu)
74+
75+ # @SciMLMessage("Eisenstat-Walker sanity check: $(cache.internalnorm(fu + J*δu)) ≤ $(cache.η * cache.internalnorm(fu)).", cache.verbosity, :linear_verbosity)
7476end
7577
7678
0 commit comments