Skip to content

Commit

Permalink
Fix precs in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarsh530 committed Oct 10, 2023
1 parent 923ad7c commit aff4595
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/basictests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ end
@test (@ballocated solve!($cache)) < 200
end

precs = [
NonlinearSolve.DEFAULT_PRECS,
(args...) -> (Diagonal(rand!(similar(u0))), nothing),
]

@testset "[IIP] u0: $(typeof(u0)) precs: $(_nameof(prec)) linsolve: $(_nameof(linsolve))" for u0 in ([
1.0, 1.0],), prec in precs, linsolve in (nothing, KrylovJL_GMRES())
1.0, 1.0],),
prec in [
NonlinearSolve.DEFAULT_PRECS,
(args...) -> (Diagonal(rand!(similar(u0))), nothing),
], linsolve in (nothing, KrylovJL_GMRES())

ad isa AutoZygote && continue
if prec === :Random
prec = (args...) -> (Diagonal(randn!(similar(u0))), nothing)
Expand Down

0 comments on commit aff4595

Please sign in to comment.