1
+ function __internal_init end
2
+ function __internal_solve! end
3
+
1
4
"""
2
5
AbstractDescentAlgorithm
3
6
@@ -10,15 +13,15 @@ in which case we use the normal form equations ``JᵀJ δu = Jᵀ fu``. Note tha
10
13
factorization is often the faster choice, but it is not as numerically stable as the least
11
14
squares solver.
12
15
13
- ### `SciMLBase.init ` specification
16
+ ### `__internal_init ` specification
14
17
15
18
```julia
16
- SciMLBase.init (prob::NonlinearProblem{uType, iip}, alg::AbstractDescentAlgorithm, J, fu, u;
19
+ __internal_init (prob::NonlinearProblem{uType, iip}, alg::AbstractDescentAlgorithm, J, fu, u;
17
20
pre_inverted::Val{INV} = Val(false), linsolve_kwargs = (;), abstol = nothing,
18
21
reltol = nothing, alias_J::Bool = true, shared::Val{N} = Val(1),
19
22
kwargs...) where {INV, N, uType, iip} --> AbstractDescentCache
20
23
21
- SciMLBase.init (prob::NonlinearLeastSquaresProblem{uType, iip},
24
+ __internal_init (prob::NonlinearLeastSquaresProblem{uType, iip},
22
25
alg::AbstractDescentAlgorithm, J, fu, u; pre_inverted::Val{INV} = Val(false),
23
26
linsolve_kwargs = (;), abstol = nothing, reltol = nothing, alias_J::Bool = true,
24
27
shared::Val{N} = Val(1), kwargs...) where {INV, N, uType, iip} --> AbstractDescentCache
@@ -59,10 +62,10 @@ get_linear_solver(alg::AbstractDescentAlgorithm) = __getproperty(alg, Val(:linso
59
62
60
63
Abstract Type for all Descent Caches.
61
64
62
- ### `SciMLBase.solve !` specification
65
+ ### `__internal_solve !` specification
63
66
64
67
```julia
65
- δu, success, intermediates = SciMLBase.solve !(cache::AbstractDescentCache, J, fu, u,
68
+ δu, success, intermediates = __internal_solve !(cache::AbstractDescentCache, J, fu, u,
66
69
idx::Val; skip_solve::Bool = false, kwargs...)
67
70
```
68
71
@@ -112,10 +115,10 @@ end
112
115
113
116
Abstract Type for all Line Search Algorithms used in NonlinearSolve.jl.
114
117
115
- ### `SciMLBase.init ` specification
118
+ ### `__internal_init ` specification
116
119
117
120
```julia
118
- SciMLBase.init (prob::AbstractNonlinearProblem,
121
+ __internal_init (prob::AbstractNonlinearProblem,
119
122
alg::AbstractNonlinearSolveLineSearchAlgorithm, f::F, fu, u, p, args...;
120
123
internalnorm::IN = DEFAULT_NORM,
121
124
kwargs...) where {F, IN} --> AbstractNonlinearSolveLineSearchCache
@@ -128,10 +131,10 @@ abstract type AbstractNonlinearSolveLineSearchAlgorithm end
128
131
129
132
Abstract Type for all Line Search Caches used in NonlinearSolve.jl.
130
133
131
- ### `SciMLBase.solve !` specification
134
+ ### `__internal_solve !` specification
132
135
133
136
```julia
134
- SciMLBase.solve !(cache::AbstractNonlinearSolveLineSearchCache, u, du; kwargs...)
137
+ __internal_solve !(cache::AbstractNonlinearSolveLineSearchCache, u, du; kwargs...)
135
138
```
136
139
137
140
Returns 2 values:
@@ -226,10 +229,10 @@ abstract type AbstractLinearSolverCache <: Function end
226
229
227
230
Abstract Type for Damping Functions in DampedNewton.
228
231
229
- ### `SciMLBase.init ` specification
232
+ ### `__internal_init ` specification
230
233
231
234
```julia
232
- SciMLBase.init (prob::AbstractNonlinearProblem, f::AbstractDampingFunction, initial_damping,
235
+ __internal_init (prob::AbstractNonlinearProblem, f::AbstractDampingFunction, initial_damping,
233
236
J, fu, u, args...; internal_norm = DEFAULT_NORM,
234
237
kwargs...) --> AbstractDampingFunctionCache
235
238
```
@@ -254,10 +257,10 @@ Abstract Type for the Caches created by AbstractDampingFunctions
254
257
- `(cache::AbstractDampingFunctionCache)(::Nothing)`: returns the damping factor. The type
255
258
of the damping factor returned from `solve!` is guaranteed to be the same as this.
256
259
257
- ### `SciMLBase.solve !` specification
260
+ ### `__internal_solve !` specification
258
261
259
262
```julia
260
- SciMLBase.solve !(cache::AbstractDampingFunctionCache, J, fu, args...; kwargs...)
263
+ __internal_solve !(cache::AbstractDampingFunctionCache, J, fu, args...; kwargs...)
261
264
```
262
265
263
266
Returns the damping factor.
@@ -310,10 +313,10 @@ Abstract Type for all Jacobian Initialization Algorithms used in NonlinearSolve.
310
313
- `jacobian_initialized_preinverted(alg)`: whether or not the Jacobian is initialized
311
314
preinverted. Defaults to `false`.
312
315
313
- ### `SciMLBase.init ` specification
316
+ ### `__internal_init ` specification
314
317
315
318
```julia
316
- SciMLBase.init (prob::AbstractNonlinearProblem, alg::AbstractJacobianInitialization,
319
+ __internal_init (prob::AbstractNonlinearProblem, alg::AbstractJacobianInitialization,
317
320
solver, f::F, fu, u, p; linsolve = missing, internalnorm::IN = DEFAULT_NORM,
318
321
kwargs...)
319
322
```
@@ -345,10 +348,10 @@ Abstract Type for all Approximate Jacobian Update Rules used in NonlinearSolve.j
345
348
346
349
- `store_inverse_jacobian(alg)`: Return `INV`
347
350
348
- ### `SciMLBase.init ` specification
351
+ ### `__internal_init ` specification
349
352
350
353
```julia
351
- SciMLBase.init (prob::AbstractNonlinearProblem,
354
+ __internal_init (prob::AbstractNonlinearProblem,
352
355
alg::AbstractApproximateJacobianUpdateRule, J, fu, u, du, args...;
353
356
internalnorm::F = DEFAULT_NORM,
354
357
kwargs...) where {F} --> AbstractApproximateJacobianUpdateRuleCache{INV}
@@ -367,10 +370,10 @@ Abstract Type for all Approximate Jacobian Update Rule Caches used in NonlinearS
367
370
368
371
- `store_inverse_jacobian(alg)`: Return `INV`
369
372
370
- ### `SciMLBase.solve !` specification
373
+ ### `__internal_solve !` specification
371
374
372
375
```julia
373
- SciMLBase.solve !(cache::AbstractApproximateJacobianUpdateRuleCache, J, fu, u, du;
376
+ __internal_solve !(cache::AbstractApproximateJacobianUpdateRuleCache, J, fu, u, du;
374
377
kwargs...) --> J / J⁻¹
375
378
```
376
379
"""
@@ -383,17 +386,17 @@ store_inverse_jacobian(::AbstractApproximateJacobianUpdateRuleCache{INV}) where
383
386
384
387
Condition for resetting the Jacobian in Quasi-Newton's methods.
385
388
386
- ### `SciMLBase.init ` specification
389
+ ### `__internal_init ` specification
387
390
388
391
```julia
389
- SciMLBase.init (alg::AbstractResetCondition, J, fu, u, du, args...;
392
+ __internal_init (alg::AbstractResetCondition, J, fu, u, du, args...;
390
393
kwargs...) --> ResetCache
391
394
```
392
395
393
- ### `SciMLBase.solve !` specification
396
+ ### `__internal_solve !` specification
394
397
395
398
```julia
396
- SciMLBase.solve !(cache::ResetCache, J, fu, u, du) --> Bool
399
+ __internal_solve !(cache::ResetCache, J, fu, u, du) --> Bool
397
400
```
398
401
"""
399
402
abstract type AbstractResetCondition end
@@ -403,10 +406,10 @@ abstract type AbstractResetCondition end
403
406
404
407
Abstract Type for all Trust Region Methods used in NonlinearSolve.jl.
405
408
406
- ### `SciMLBase.init ` specification
409
+ ### `__internal_init ` specification
407
410
408
411
```julia
409
- SciMLBase.init (prob::AbstractNonlinearProblem, alg::AbstractTrustRegionMethod,
412
+ __internal_init (prob::AbstractNonlinearProblem, alg::AbstractTrustRegionMethod,
410
413
f::F, fu, u, p, args...; internalnorm::IF = DEFAULT_NORM,
411
414
kwargs...) where {F, IF} --> AbstractTrustRegionMethodCache
412
415
```
@@ -423,10 +426,10 @@ Abstract Type for all Trust Region Method Caches used in NonlinearSolve.jl.
423
426
- `last_step_accepted(cache)`: whether or not the last step was accepted. Defaults to
424
427
`cache.last_step_accepted`. Should if overloaded if the field is not present.
425
428
426
- ### `SciMLBase.solve !` specification
429
+ ### `__internal_solve !` specification
427
430
428
431
```julia
429
- SciMLBase.solve !(cache::AbstractTrustRegionMethodCache, J, fu, u, δu, descent_stats)
432
+ __internal_solve !(cache::AbstractTrustRegionMethodCache, J, fu, u, δu, descent_stats)
430
433
```
431
434
432
435
Returns `last_step_accepted`, updated `u_cache` and `fu_cache`. If the last step was
0 commit comments