Skip to content

Commit 569cd50

Browse files
Update func.jl
1 parent 703e29e commit 569cd50

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

test/func.jl

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,24 @@ K = 12
101101
end
102102

103103
@testset "Batch FunctionOperator" begin
104-
# out of place
104+
u = rand(N,K)
105+
p = nothing
106+
t = 0.0
107+
α = rand()
108+
β = rand()
109+
110+
A = rand(N,N) |> Symmetric
111+
F = lu(A)
112+
Ai = inv(A)
113+
114+
f1(u, p, t) = A * u
115+
f1i(u, p, t) = A \ u
116+
117+
f2(du, u, p, t) = mul!(du, A, u)
118+
f2(du, u, p, t, α, β) = mul!(du, A, u, α, β)
119+
f2i(du, u, p, t) = ldiv!(du, F, u)
120+
f2i(du, u, p, t, α, β) = mul!(du, Ai, u, α, β)
121+
# out of place
105122
op1 = FunctionOperator(f1, u, A*u;
106123

107124
op_inverse=f1i,

0 commit comments

Comments
 (0)