Skip to content

Commit 3c88997

Browse files
setup test for Travis
1 parent 02ed45d commit 3c88997

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/bigsystem.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using ModelingToolkit, LinearAlgebra
1+
using ModelingToolkit, LinearAlgebra, SparseArrays
22

33
# Define the constants for the PDE
44
const α₂ = 1.0
@@ -45,6 +45,13 @@ end
4545

4646
f(du,u,nothing,0.0)
4747

48-
ModelingToolkit.build_function(du,u,multithread=true);
49-
jac = ModelingToolkit.jacobian(vec(du),vec(u),simplify=false)
50-
ModelingToolkit.build_function(vec(jac),u,multithread=true);
48+
multithreadedf = eval(ModelingToolkit.build_function(du,u,multithread=true)[2])
49+
_du = rand(N,N,3)
50+
_u = rand(N,N,3)
51+
multithreadedf(_du,_u)
52+
53+
jac = sparse(ModelingToolkit.jacobian(vec(du),vec(u),simplify=false))
54+
multithreadedjac = eval(ModelingToolkit.build_function(vec(jac),u,multithread=true)[2])
55+
56+
#_jac = similar(jac,Float64)
57+
#multithreadedjac(_jac,_u)

0 commit comments

Comments
 (0)