Skip to contents

JacobianReuse(max_age, max_residual_ratio) is the policy of the first order solvers for reusing a Jacobian over accepted steps (a modified Newton method): the Jacobian is refreshed when it has served max_age accepted steps, when the residual norm fails to drop below max_residual_ratio times the previous one, or when a step fails with the stale Jacobian. max_age = 0 (or 1) recomputes it at every step. The default of the solvers (jacobian_reuse = NULL) reuses Jacobians only for problems with at least 16 unknowns; BoundedTrustRegion() applies it.

Usage

JacobianReuse(max_age = 10L, max_residual_ratio = 0.1)

EisenstatWalkerForcing2(
  eta_0 = 0.5,
  eta_max = 0.9,
  gamma = 0.9,
  alpha = 2,
  safeguard = TRUE,
  safeguard_threshold = 0.1
)

Arguments

max_age

The number of accepted steps a Jacobian may serve.

max_residual_ratio

The required residual reduction factor.

eta_0, eta_max, gamma, alpha, safeguard, safeguard_threshold

Settings of the forcing term.

Value

A JacobianReuse or EisenstatWalkerForcing2 object.

Details

EisenstatWalkerForcing2(eta_0, eta_max, gamma, alpha, safeguard, safeguard_threshold) is choice 2 of Eisenstat and Walker (1996) for the relative tolerance of the inner linear solves of a Newton Krylov method, eta_k = gamma * (|r_k| / |r_(k-1)|)^alpha, safeguarded by gamma * eta_(k-1)^alpha when that exceeds safeguard_threshold and clamped to [0, eta_max]. The linear systems of the R solvers are solved directly, to full accuracy, so the forcing term records the tolerance sequence without loosening any solve.

Examples

JacobianReuse(max_age = 5)
#> JacobianReuse(max_age = 5, max_residual_ratio = 0.1)
EisenstatWalkerForcing2(eta_0 = 0.1)
#> $eta_0
#> [1] 0.1
#> 
#> $eta_max
#> [1] 0.9
#> 
#> $gamma
#> [1] 0.9
#> 
#> $alpha
#> [1] 2
#> 
#> $safeguard
#> [1] TRUE
#> 
#> $safeguard_threshold
#> [1] 0.1
#> 
#> attr(,"class")
#> [1] "EisenstatWalkerForcing2"