|
54 | 54 | @testset "Trust Region" begin |
55 | 55 | S = Vector{Float64} |
56 | 56 | @testset "aredpred-$(nlp.meta.name) - $S - $TRSolver" for nlp in ( |
57 | | - ADNLPModel(x -> x[1]^2 + 4 * x[2]^2, fill!(S(undef, 2), 1), name = "NLP", matrix_free = true), |
58 | | - ADNLSModel(x -> [x[1]; 2 * x[2]], fill!(S(undef, 2), 1), 2, name = "NLS", matrix_free = true), |
59 | | - ), TRSolver in (TrustRegion, TRONTrustRegion) |
| 57 | + ADNLPModel(x -> x[1]^2 + 4 * x[2]^2, fill!(S(undef, 2), 1), name = "NLP", matrix_free = true), |
| 58 | + ADNLSModel(x -> [x[1]; 2 * x[2]], fill!(S(undef, 2), 1), 2, name = "NLS", matrix_free = true), |
| 59 | + ), |
| 60 | + TRSolver in (TrustRegion, TRONTrustRegion) |
| 61 | + |
60 | 62 | test_aredpred(nlp, TRSolver, S) |
61 | 63 | end |
62 | 64 |
|
63 | 65 | if CUDA.functional() |
64 | 66 | CUDA.allowscalar() do |
65 | 67 | S = CuVector{Float64} |
66 | 68 | @testset "aredpred-$(nlp.meta.name) - $S - $TRSolver" for nlp in ( |
67 | | - ADNLPModel(x -> x[1]^2 + 4 * x[2]^2, fill!(S(undef, 2), 1), name = "NLP", matrix_free = true), |
68 | | - ADNLSModel(x -> [x[1]; 2 * x[2]], fill!(S(undef, 2), 1), 2, name = "NLS", matrix_free = true), |
69 | | - ), TRSolver in (TrustRegion, TRONTrustRegion) |
| 69 | + ADNLPModel( |
| 70 | + x -> x[1]^2 + 4 * x[2]^2, |
| 71 | + fill!(S(undef, 2), 1), |
| 72 | + name = "NLP", |
| 73 | + matrix_free = true, |
| 74 | + ), |
| 75 | + ADNLSModel( |
| 76 | + x -> [x[1]; 2 * x[2]], |
| 77 | + fill!(S(undef, 2), 1), |
| 78 | + 2, |
| 79 | + name = "NLS", |
| 80 | + matrix_free = true, |
| 81 | + ), |
| 82 | + ), |
| 83 | + TRSolver in (TrustRegion, TRONTrustRegion) |
| 84 | + |
70 | 85 | test_aredpred(nlp, TRSolver, S) |
71 | 86 | end |
72 | 87 | end |
|
0 commit comments