Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit f3e8081

Browse files
Update test_integration.jl
1 parent f324746 commit f3e8081

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_integration.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ using SparsityDetection
55
using LinearAlgebra, SparseArrays, Test
66

77
fcalls = 0
8+
9+
function f(x)
10+
global fcalls += 1
11+
dx = similar(x)
12+
for i in 2:length(x)-1
13+
dx[i] = x[i-1] - 2x[i] + x[i+1]
14+
end
15+
dx[1] = -2x[1] + x[2]
16+
dx[end] = x[end-1] - 2x[end]
17+
dx
18+
end
19+
820
function f(dx,x)
921
global fcalls += 1
1022
for i in 2:length(x)-1

0 commit comments

Comments
 (0)