-
-
Notifications
You must be signed in to change notification settings - Fork 46
Format for JuliaFormatter v2 #613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
JuliaFormatter
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 169 to 171 in 8fdee10
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
[JuliaFormatter] reported by reviewdog 🐶
radius_update_schemes=[ |
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 234 to 236 in 8fdee10
u0=[-10.0, -1.0, 1.0, 2.0, 3.0, 4.0, 10.0] | |
p=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | |
sol=solve_oop(newton_fails, u0, p; solver = TrustRegion()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 242 to 251 in 8fdee10
max_trust_radius=[10.0, 100.0, 1000.0] | |
initial_trust_radius=[10.0, 1.0, 0.1] | |
step_threshold=[0.0, 0.01, 0.25] | |
shrink_threshold=[0.25, 0.3, 0.5] | |
expand_threshold=[0.5, 0.8, 0.9] | |
shrink_factor=[0.1, 0.3, 0.5] | |
expand_factor=[1.5, 2.0, 3.0] | |
max_shrink_times=[10, 20, 30] | |
list_of_options=zip( |
[JuliaFormatter] reported by reviewdog 🐶
alg=TrustRegion(; |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve_oop(quadratic_f, [1.0, 1.0], 2.0; solver = alg) |
[JuliaFormatter] reported by reviewdog 🐶
err=maximum(abs, quadratic_f(sol.u, 2.0)) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 272 to 273 in 8fdee10
maxiterations=[2, 3, 4, 5] | |
u0=[1.0, 1.0] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 291 to 293 in 8fdee10
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 349 to 351 in 8fdee10
u0=[-10.0, -1.0, 1.0, 2.0, 3.0, 4.0, 10.0] | |
p=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | |
sol=solve_oop(newton_fails, u0, p; solver = LevenbergMarquardt()) |
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 365 to 367 in 8fdee10
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 378 to 386 in 8fdee10
damping_initial=[0.5, 2.0, 5.0] | |
damping_increase_factor=[1.5, 3.0, 10.0] | |
damping_decrease_factor=Float64[2, 5, 10.0] | |
finite_diff_step_geodesic=[0.02, 0.2, 0.3] | |
α_geodesic=[0.6, 0.8, 0.9] | |
b_uphill=Float64[0, 1, 2] | |
min_damping_D=[1e-12, 1e-9, 1e-4] | |
list_of_options=zip( |
[JuliaFormatter] reported by reviewdog 🐶
alg=LevenbergMarquardt(; |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve_oop(quadratic_f, [1.0, 1.0], 2.0; solver = alg, maxiters = 10000) |
[JuliaFormatter] reported by reviewdog 🐶
err=maximum(abs, quadratic_f(sol.u, 2.0)) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 433 to 434 in 8fdee10
Δ=Tridiagonal(-ones(99), 2*ones(100), -ones(99)) | |
return u+0.1*u .* Δ*u-p |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 438 to 439 in 8fdee10
Δ=Tridiagonal(-ones(99), 2*ones(100), -ones(99)) | |
du.=u+0.1*u .* Δ*u-p |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 444 to 445 in 8fdee10
Δ=Tridiagonal(-ones(99), 2*ones(100), -ones(99)) | |
return v+0.1*(u .* Δ*v+v .* Δ*u) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 450 to 451 in 8fdee10
Δ=Tridiagonal(-ones(99), 2*ones(100), -ones(99)) | |
du.=v+0.1*(u .* Δ*v+v .* Δ*u) |
[JuliaFormatter] reported by reviewdog 🐶
u0=rand(100) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 457 to 459 in 8fdee10
prob=NonlinearProblem(NonlinearFunction{false}(F; jvp = JVP), u0, u0) | |
sol=solve(prob, NewtonRaphson(; linsolve = KrylovJL_GMRES()); abstol = 1e-13) | |
err=maximum(abs, sol.resid) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve( |
[JuliaFormatter] reported by reviewdog 🐶
err=maximum(abs, sol.resid) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/rootfind_tests.jl
Lines 469 to 471 in 8fdee10
prob=NonlinearProblem(NonlinearFunction{true}(F!; jvp = JVP!), u0, u0) | |
sol=solve(prob, NewtonRaphson(; linsolve = KrylovJL_GMRES()); abstol = 1e-13) | |
err=maximum(abs, sol.resid) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve( |
[JuliaFormatter] reported by reviewdog 🐶
err=maximum(abs, sol.resid) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/sparsity_tests.jl
Lines 21 to 27 in 8fdee10
j, | |
1] = alpha * | |
(u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - | |
4u[i, j, 1]) + | |
B + | |
u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + | |
brusselator_f(x, y) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveFirstOrder/test/sparsity_tests.jl
Lines 29 to 32 in 8fdee10
j, | |
2] = alpha * | |
(u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - | |
4u[i, j, 2]) + A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2] |
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
u0s=([1.0, 1.0], @SVector[1.0, 1.0], 1.0) |
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveQuasiNewton/test/core_tests.jl
Lines 72 to 74 in 8fdee10
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveQuasiNewton/test/core_tests.jl
Lines 147 to 149 in 8fdee10
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveQuasiNewton/test/core_tests.jl
Lines 224 to 226 in 8fdee10
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/NonlinearSolveSpectralMethods/src/NonlinearSolveSpectralMethods.jl
Line 37 in 8fdee10
[JuliaFormatter] reported by reviewdog 🐶
fn_1, n, x_n, f_n) -> fn_1 / n^2 |
[JuliaFormatter] reported by reviewdog 🐶
u0s=([1.0, 1.0], @SVector[1.0, 1.0], 1.0) |
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) |
[JuliaFormatter] reported by reviewdog 🐶
u0=[-10.0, -1.0, 1.0, 2.0, 3.0, 4.0, 10.0] | |
p=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | |
sol=solve_oop(newton_fails, u0, p; solver = DFSane()) |
[JuliaFormatter] reported by reviewdog 🐶
σ_min=[1e-10, 1e-5, 1e-4] | |
σ_max=[1e10, 1e5, 1e4] | |
σ_1=[1.0, 0.5, 2.0] | |
M=[10, 1, 100] | |
γ=[1e-4, 1e-3, 1e-5] | |
τ_min=[0.1, 0.2, 0.3] | |
τ_max=[0.5, 0.8, 0.9] | |
nexp=[2, 1, 2] | |
η_strategy=[ | |
(f_1, k, x, F)->f_1/k^2, (f_1, k, x, F)->f_1/k^3, | |
(f_1, k, x, F)->f_1/k^4 |
[JuliaFormatter] reported by reviewdog 🐶
list_of_options=zip(σ_min, σ_max, σ_1, M, γ, τ_min, τ_max, nexp, η_strategy) |
[JuliaFormatter] reported by reviewdog 🐶
alg=DFSane(; |
[JuliaFormatter] reported by reviewdog 🐶
probN=NonlinearProblem{false}(quadratic_f, [1.0, 1.0], 2.0) | |
sol=solve(probN, alg, abstol = 1e-11) |
[JuliaFormatter] reported by reviewdog 🐶
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 10 to 17 in 8fdee10
du[1]=cos(u[2])-u[1] | |
du[2]=sin(u[1]+u[2])+u[2] | |
du[3]=2u[4]+u[3]+1.0 | |
du[4]=u[5]^2+u[4] | |
du[5]=u[3]^2+u[5] | |
du[6]=u[1]+u[2]+u[3]+u[4]+u[5]+2.0u[6]+2.5u[7]+1.5u[8] | |
du[7]=u[1]+u[2]+u[3]+2.0u[4]+u[5]+4.0u[6]-1.5u[7]+1.5u[8] | |
du[8]=u[1]+2.0u[2]+3.0u[3]+5.0u[4]+6.0u[5]+u[6]-u[7]-u[8] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 19 to 20 in 8fdee10
prob=NonlinearProblem(f, zeros(8)) | |
sol=solve(prob, NewtonRaphson()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 22 to 23 in 8fdee10
u0=zeros(2) | |
p=zeros(3) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 26 to 27 in 8fdee10
du[1]=cos(u[2])-u[1] | |
du[2]=sin(u[1]+u[2])+u[2] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 29 to 30 in 8fdee10
explicitfun1(p, sols)=nothing | |
prob1=NonlinearProblem( |
[JuliaFormatter] reported by reviewdog 🐶
sol1=solve(prob1, NewtonRaphson()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 35 to 37 in 8fdee10
du[1]=2u[2]+u[1]+1.0 | |
du[2]=u[3]^2+u[2] | |
du[3]=u[1]^2+u[3] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 39 to 40 in 8fdee10
explicitfun2(p, sols)=nothing | |
prob2=NonlinearProblem( |
[JuliaFormatter] reported by reviewdog 🐶
sol2=solve(prob2, NewtonRaphson()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 45 to 47 in 8fdee10
du[1]=p[1]+2.0u[1]+2.5u[2]+1.5u[3] | |
du[2]=p[2]+4.0u[1]-1.5u[2]+1.5u[3] | |
du[3]=p[3]++u[1]-u[2]-u[3] |
[JuliaFormatter] reported by reviewdog 🐶
prob3=NonlinearProblem( |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 52 to 55 in 8fdee10
p[1]=sols[1][1]+sols[1][2]+sols[2][1]+sols[2][2]+sols[2][3] | |
p[2]=sols[1][1]+sols[1][2]+sols[2][1]+2.0sols[2][2]+sols[2][3] | |
p[3]=sols[1][1]+2.0sols[1][2]+3.0sols[2][1]+5.0sols[2][2]+ | |
6.0sols[2][3] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SCCNonlinearSolve/test/core_tests.jl
Lines 58 to 59 in 8fdee10
sol3=solve(prob3, NewtonRaphson()) | |
manualscc=[sol1; sol2; sol3] |
[JuliaFormatter] reported by reviewdog 🐶
sccprob=SciMLBase.SCCNonlinearProblem([prob1, prob2, prob3], |
[JuliaFormatter] reported by reviewdog 🐶
scc_sol=solve(sccprob, NewtonRaphson()) |
[JuliaFormatter] reported by reviewdog 🐶
scc_sol=solve(sccprob) |
[JuliaFormatter] reported by reviewdog 🐶
vJ, v, u, p) -> begin |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl
Lines 313 to 315 in 8fdee10
v, | |
u, | |
p) -> begin |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl
Lines 323 to 324 in 8fdee10
u, | |
p) -> begin |
[JuliaFormatter] reported by reviewdog 🐶
Jv, v, u, p) -> begin |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl
Lines 364 to 366 in 8fdee10
v, | |
u, | |
p) -> begin |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SciMLJacobianOperators/src/SciMLJacobianOperators.jl
Lines 374 to 375 in 8fdee10
u, | |
p) -> begin |
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
p) -> begin |
[JuliaFormatter] reported by reviewdog 🐶
[JuliaFormatter] reported by reviewdog 🐶
@testset "Termination Condition: $(nameof(typeof(termination_condition))) u0: $(nameof(typeof(u0)))" for termination_condition in | |
TERMINATION_CONDITIONS, |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SimpleNonlinearSolve/test/core/rootfind_tests.jl
Lines 107 to 108 in 8fdee10
@testset "Termination Condition: $(nameof(typeof(termination_condition))) u0: $(nameof(typeof(u0)))" for termination_condition in | |
TERMINATION_CONDITIONS, |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SimpleNonlinearSolve/test/core/rootfind_tests.jl
Lines 140 to 141 in 8fdee10
@testset "Termination Condition: $(nameof(typeof(termination_condition))) u0: $(nameof(typeof(u0)))" for termination_condition in | |
TERMINATION_CONDITIONS, |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SimpleNonlinearSolve/test/core/rootfind_tests.jl
Lines 151 to 152 in 8fdee10
u0=[-10.0, -1.0, 1.0, 2.0, 3.0, 4.0, 10.0] | |
p=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/lib/SimpleNonlinearSolve/test/core/rootfind_tests.jl
Lines 167 to 168 in 8fdee10
prob=NonlinearProblem(quadratic_f, ones(4), 2.0; maxiters = 2) | |
sol=solve(prob, SimpleNewtonRaphson()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/src/NonlinearSolve.jl
Line 71 in 8fdee10
u, p) -> vcat(u .* u .- p, u .* u .- p)), |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 13 to 14 in 8fdee10
@testset "$idx: $(dict["title"]) | alg #$(alg_id)" for (alg_id, alg) in | |
enumerate(alg_ops) |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=(RobustMultiNewton(), FastShortcutNonlinearPolyalg()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 45 to 47 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[] | |
broken_tests[alg_ops[2]]=[] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=( |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 58 to 59 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[1] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=(SimpleHalley(; autodiff = AutoForwardDiff()),) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 67 to 68 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[1, 5, 15, 16, 18] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=( |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 85 to 93 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[11, 21] | |
broken_tests[alg_ops[2]]=[11, 21] | |
broken_tests[alg_ops[3]]=[11, 21] | |
broken_tests[alg_ops[4]]=[8, 11, 21] | |
broken_tests[alg_ops[5]]=[21] | |
broken_tests[alg_ops[6]]=[11, 21] | |
broken_tests[alg_ops[7]]=[3, 15, 16, 21] | |
broken_tests[alg_ops[8]]=[15, 16] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=( |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 107 to 110 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[11, 21] | |
broken_tests[alg_ops[2]]=[11, 21] | |
broken_tests[alg_ops[3]]=[11, 21] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=( |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 121 to 122 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[1, 2, 3, 5, 21] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 124 to 125 in 8fdee10
if VERSION≥v"1.11-" | |
broken_tests[alg_ops[2]]=[1, 2, 3, 5, 6, 11, 21] |
[JuliaFormatter] reported by reviewdog 🐶
broken_tests[alg_ops[2]]=[1, 2, 3, 5, 6, 21] |
[JuliaFormatter] reported by reviewdog 🐶
broken_tests[alg_ops[2]]=[1, 2, 3, 5, 6, 11, 21] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=( |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 145 to 147 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[2]]=[1, 5, 8, 11, 18] | |
broken_tests[alg_ops[4]]=[5, 6, 8, 11] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 149 to 152 in 8fdee10
broken_tests[alg_ops[1]]=[1, 5, 11] | |
broken_tests[alg_ops[3]]=[1, 5, 6, 9, 11] | |
if VERSION≥v"1.11-" | |
broken_tests[alg_ops[5]]=[1, 4, 5, 11] |
[JuliaFormatter] reported by reviewdog 🐶
broken_tests[alg_ops[5]]=[1, 5, 11] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 157 to 159 in 8fdee10
broken_tests[alg_ops[1]]=[1, 5, 11, 15] | |
broken_tests[alg_ops[3]]=[1, 5, 6, 9, 11, 16] | |
broken_tests[alg_ops[5]]=[1, 5, 11] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=( |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 172 to 175 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[1, 2, 4, 5, 11, 18, 22] | |
broken_tests[alg_ops[2]]=[2, 4, 5, 7, 18, 22] | |
broken_tests[alg_ops[3]]=[1, 2, 4, 5, 11, 22] |
[JuliaFormatter] reported by reviewdog 🐶
alg_ops=(PseudoTransient(),) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/23_test_problems_tests.jl
Lines 185 to 186 in 8fdee10
broken_tests=Dict(alg=>Int[] for alg in alg_ops) | |
broken_tests[alg_ops[1]]=[1, 2, 3, 11, 15, 16] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/cuda_tests.jl
Lines 70 to 71 in 8fdee10
for nfn in | |
(Base.Fix1(maximum, abs), Base.Fix2(norm, 2), Base.Fix2(norm, Inf)) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/forward_ad_tests.jl
Line 107 in 8fdee10
compatible(u0, p) || continue |
[JuliaFormatter] reported by reviewdog 🐶
nlls_problems=[prob_oop, prob_iip] |
[JuliaFormatter] reported by reviewdog 🐶
solvers=[] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/least_squares_tests.jl
Lines 20 to 21 in 8fdee10
sol=solve(prob, solver; maxiters = 10000, abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/least_squares_tests.jl
Lines 32 to 33 in 8fdee10
resid=zeros(length(p)) | |
ForwardDiff.jacobian!(J, (resid, θ)->loss_function(resid, θ, p), resid, θ) |
[JuliaFormatter] reported by reviewdog 🐶
jac(θ, p)=ForwardDiff.jacobian(θ->loss_function(θ, p), θ) |
[JuliaFormatter] reported by reviewdog 🐶
probs=[ |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/least_squares_tests.jl
Lines 57 to 58 in 8fdee10
solvers=Any[FastLevenbergMarquardtJL(linsolve) for linsolve in (:cholesky, :qr)] | |
Sys.isapple()||push!(solvers, CMINPACK()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/least_squares_tests.jl
Lines 61 to 62 in 8fdee10
sol=solve(prob, solver; maxiters = 10000, abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
probs=[ |
[JuliaFormatter] reported by reviewdog 🐶
solvers=[] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/least_squares_tests.jl
Lines 95 to 96 in 8fdee10
sol=solve(prob, solver; maxiters = 10000, abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
x_sa=SA[-1.0, -0.5, 0.0, 0.5, 1.0] |
[JuliaFormatter] reported by reviewdog 🐶
const y_target_sa=true_function(x_sa, θ_true) |
[JuliaFormatter] reported by reviewdog 🐶
ŷ=true_function(p, θ) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/least_squares_tests.jl
Lines 113 to 114 in 8fdee10
θ_init_sa=SVector{4}(θ_init) | |
prob_sa=NonlinearLeastSquaresProblem{false}(loss_function_sa, θ_init_sa, x) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(prob_sa, FastLevenbergMarquardtJL()) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 5 to 6 in 8fdee10
du[1]=2-2u[1] | |
du[2]=u[1]-4u[2] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 8 to 9 in 8fdee10
u0=zeros(2) | |
prob_iip=SteadyStateProblem(f_iip, u0) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 26 to 28 in 8fdee10
f_oop(u, p, t)=[2-2u[1], u[1]-4u[2]] | |
u0=zeros(2) | |
prob_oop=SteadyStateProblem(f_oop, u0) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 51 to 52 in 8fdee10
du[1]=2-2u[1] | |
du[2]=u[1]-4u[2] |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 54 to 55 in 8fdee10
u0=zeros(2) | |
prob_iip=NonlinearProblem{true}(f_iip, u0) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 73 to 75 in 8fdee10
f_oop(u, p)=[2-2u[1], u[1]-4u[2]] | |
u0=zeros(2) | |
prob_oop=NonlinearProblem{false}(f_oop, u0) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 92 to 93 in 8fdee10
f_tol(u, p)=u^2-2 | |
prob_tol=NonlinearProblem(f_tol, 1.0) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 106 to 108 in 8fdee10
alg isa CMINPACK&&Sys.isapple()&&continue | |
alg isa PETScSNES&&Sys.iswindows()&&continue | |
sol=solve(prob_tol, alg, abstol = tol) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 112 to 113 in 8fdee10
f_jfnk(u, p)=u^2-2 | |
prob_jfnk=NonlinearProblem(f_jfnk, 1.0) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(prob_jfnk, SIAMFANLEquationsJL(linsolve = :gmres), abstol = tol) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 121 to 122 in 8fdee10
fvec[1]=(x[1]+3)*(x[2]^3-7)+18 | |
fvec[2]=sin(x[2]*exp(x[1])-1) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 125 to 126 in 8fdee10
prob=NonlinearProblem{true}(f!, [0.1; 1.2]) | |
sol=solve(prob, NLsolveJL(autodiff = :central)) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(prob, SIAMFANLEquationsJL()) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(prob, NLsolveJL(autodiff = :forward)) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 136 to 137 in 8fdee10
f_custom_jac!(F, u, p)=(F[1:152]=u .^ 2 .- p) | |
j_custom_jac!(J, u, p)=(J[1:152, 1:152]=diagm(2 .* u)) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 139 to 141 in 8fdee10
init=ones(152) | |
A=ones(152) | |
A[6]=0.8 |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 143 to 144 in 8fdee10
f=NonlinearFunction(f_custom_jac!; jac = j_custom_jac!) | |
p=A |
[JuliaFormatter] reported by reviewdog 🐶
ProbN=NonlinearProblem(f, init, p) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(ProbN, NLsolveJL(); abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve( |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(ProbN, SIAMFANLEquationsJL(; method = :newton); abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(ProbN, SIAMFANLEquationsJL(; method = :pseudotransient); abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(ProbN, PETScSNES(); abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
f(u, p)=u .* u .- 2 |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 171 to 172 in 8fdee10
u0=[1.0, 1.0] | |
probN=NonlinearProblem{false}(f, u0) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(probN, PETScSNES(); abstol = 1e-8) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 177 to 178 in 8fdee10
u0=[1.0f0, 1.0f0] | |
probN=NonlinearProblem{false}(f, u0) |
[JuliaFormatter] reported by reviewdog 🐶
sol=solve(probN, PETScSNES(); abstol = 1e-5) |
[JuliaFormatter] reported by reviewdog 🐶
NonlinearSolve.jl/test/wrappers/rootfind_tests.jl
Lines 183 to 184 in 8fdee10
u0=Float16[1.0, 1.0] | |
probN=NonlinearProblem{false}(f, u0) |
j, | ||
1] = alpha * (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - | ||
4u[i, j, 1]) + | ||
B + | ||
u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + brusselator_f(x, y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
j, | |
1] = alpha * (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - | |
4u[i, j, 1]) + | |
B + | |
u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + brusselator_f(x, y) | |
j, | |
1] = alpha * (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] - | |
4u[i, j, 1]) + | |
B + | |
u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] + brusselator_f(x, y) |
j, | ||
2] = alpha * (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - | ||
4u[i, j, 2]) + A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
j, | |
2] = alpha * (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - | |
4u[i, j, 2]) + A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2] | |
j, | |
2] = alpha * (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] - | |
4u[i, j, 2]) + A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2] |
@@ -33,7 +33,8 @@ function SciMLBase.__solve( | |||
prob.f, autodiff, prob.u0, Constant(prob.p) | |||
) | |||
|
|||
fj_scalar = @closure (Jx, x) -> begin | |||
fj_scalar = @closure (Jx, | |||
x) -> begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
x) -> begin | |
x) -> begin |
cx, | ||
user_ctx) -> begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
cx, | |
user_ctx) -> begin | |
cx, | |
user_ctx) -> begin |
J, | ||
_, | ||
user_ctx) -> begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
J, | |
_, | |
user_ctx) -> begin | |
J, | |
_, | |
user_ctx) -> begin |
Diagonal(randn!(similar(A, size(A, 1)))), LinearAlgebra.I | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Diagonal(randn!(similar(A, size(A, 1)))), LinearAlgebra.I | |
) | |
Diagonal(randn!(similar(A, size(A, 1)))), LinearAlgebra.I | |
) |
@@ -71,15 +72,17 @@ | |||
end | |||
|
|||
@testitem "NewtonRaphson: Iterator Interface" setup=[CoreRootfindTesting] tags=[:core] begin | |||
p = range(0.01, 2, length = 200) | |||
p=range(0.01, 2, length = 200) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
p=range(0.01, 2, length = 200) | |
p = range(0.01, 2, length = 200) |
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | ||
TERMINATION_CONDITIONS | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in | |
TERMINATION_CONDITIONS | |
@testset "TC: $(nameof(typeof(termination_condition)))" for termination_condition in TERMINATION_CONDITIONS |
preconditioners=[ | ||
(u0)->nothing, | ||
u0->((args...)->(Diagonal(rand!(similar(u0))), nothing)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
preconditioners=[ | |
(u0)->nothing, | |
u0->((args...)->(Diagonal(rand!(similar(u0))), nothing)) | |
preconditioners = [ | |
(u0) -> nothing, | |
u0 -> ((args...) -> (Diagonal(rand!(similar(u0))), nothing)) |
Diagonal(randn!(similar(A, size(A, 1)))), LinearAlgebra.I | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
Diagonal(randn!(similar(A, size(A, 1)))), LinearAlgebra.I | |
) | |
Diagonal(randn!(similar(A, size(A, 1)))), LinearAlgebra.I | |
) |
No description provided.