Skip to content

Commit 33500cf

Browse files
format
1 parent 2d01939 commit 33500cf

File tree

7 files changed

+221
-190
lines changed

7 files changed

+221
-190
lines changed

docs/src/solvers/NonlinearSystemSolvers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ is small, or the eigenvalues of the Jacobian are within a few orders of magnitud
2121
then `NLSolveJL`'s `:anderson` can be a good choice.
2222

2323
!!! note
24-
24+
2525
`TrustRegion` and `SimpleTrustRegion` are still in development.
2626

2727
## Full List of Methods
2828

2929
!!! note
30-
30+
3131
For the full details on the capabilities and constructors of the different solvers,
3232
see the Detailed Solver APIs section!
3333

@@ -60,7 +60,7 @@ methods excel at small problems and problems defined with static arrays.
6060
large-scale nonlinear systems of equations.
6161

6262
!!! note
63-
63+
6464
When used with certain types for the states `u` such as a `Number` or `StaticArray`,
6565
these solvers are very efficient and non-allocating. These implementations are thus
6666
well-suited for small systems of equations.

src/NonlinearSolve.jl

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,27 @@ include("ad.jl")
4141

4242
import PrecompileTools
4343

44-
PrecompileTools.@compile_workload begin for T in (Float32, Float64)
45-
prob = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))
44+
PrecompileTools.@compile_workload begin
45+
for T in (Float32, Float64)
46+
prob = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))
4647

47-
precompile_algs = if VERSION >= v"1.7"
48-
(NewtonRaphson(), TrustRegion(), LevenbergMarquardt())
49-
else
50-
(NewtonRaphson(),)
51-
end
48+
precompile_algs = if VERSION >= v"1.7"
49+
(NewtonRaphson(), TrustRegion(), LevenbergMarquardt())
50+
else
51+
(NewtonRaphson(),)
52+
end
5253

53-
for alg in precompile_algs
54-
solve(prob, alg, abstol = T(1e-2))
55-
end
54+
for alg in precompile_algs
55+
solve(prob, alg, abstol = T(1e-2))
56+
end
5657

57-
prob = NonlinearProblem{true}((du, u, p) -> du[1] = u[1] * u[1] - p[1], T[0.1], T[2])
58-
for alg in precompile_algs
59-
solve(prob, alg, abstol = T(1e-2))
58+
prob = NonlinearProblem{true}((du, u, p) -> du[1] = u[1] * u[1] - p[1], T[0.1],
59+
T[2])
60+
for alg in precompile_algs
61+
solve(prob, alg, abstol = T(1e-2))
62+
end
6063
end
61-
end end
64+
end
6265

6366
export RadiusUpdateSchemes
6467

src/jacobian.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,3 @@ function jacobian_autodiff(f, x::AbstractArray, nonlinfun, alg)
144144
jac_prototype = jac_prototype, chunksize = chunk_size),
145145
num_of_chunks)
146146
end
147-
148-

0 commit comments

Comments
 (0)