Skip to content

Commit 5e0b0b1

Browse files
authored
Update basictests.jl
1 parent e622fa4 commit 5e0b0b1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

test/basictests.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,20 +408,29 @@ end
408408

409409
@testset "DirectLdiv!" begin
410410
function get_operator(A, u; add_inverse = true)
411+
412+
function f(u, p, t)
413+
println("using FunctionOperator OOP mul")
414+
A * u
415+
end
411416
function f(du, u, p, t)
412-
println("using FunctionOperator mul!")
417+
println("using FunctionOperator IIP mul")
413418
mul!(du, A, u)
414419
end
415420

416421
function fi(du, u, p, t)
417-
println("using FunctionOperator ldiv!")
422+
println("using FunctionOperator OOP div")
423+
A \ u
424+
end
425+
function fi(du, u, p, t)
426+
println("using FunctionOperator IIP div")
418427
ldiv!(du, A, u)
419428
end
420429

421430
if add_inverse
422-
FunctionOperator(f, u, u; isinplace = true, op_inverse = fi)
431+
FunctionOperator(f, u; op_inverse = fi)
423432
else
424-
FunctionOperator(f, u, u; isinplace = true)
433+
FunctionOperator(f, u)
425434
end
426435
end
427436

0 commit comments

Comments
 (0)