Skip to content

Commit 0b194df

Browse files
Merge pull request #91 from SciML/extension
Move extension to Symbolics
2 parents b52a345 + 9352330 commit 0b194df

File tree

3 files changed

+1
-75
lines changed

3 files changed

+1
-75
lines changed

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PreallocationTools"
22
uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "0.4.15"
4+
version = "0.4.16"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -10,11 +10,9 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
1010

1111
[weakdeps]
1212
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
13-
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
1413

1514
[extensions]
1615
PreallocationToolsReverseDiffExt = "ReverseDiff"
17-
PreallocationToolsSymbolicsExt = "Symbolics"
1816

1917
[compat]
2018
Adapt = "3.4, 4"

ext/PreallocationToolsSymbolicsExt.jl

Lines changed: 0 additions & 49 deletions
This file was deleted.

test/sparsity_support.jl

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,3 @@ A = Symbolics.jacobian_sparsity(wrap_res_dae_cache!, output, x0)
4848
B = sparse([1 0; 0 1])
4949
@test A == B
5050
@test findnz(A) == findnz(B)
51-
52-
# Test Nesting https://discourse.julialang.org/t/preallocationtools-jl-with-nested-forwarddiff-and-sparsity-pattern-detection-errors/107897
53-
54-
function foo(x, cache)
55-
d = get_tmp(cache, x)
56-
57-
d[:] = x
58-
59-
0.5 * x'*x
60-
end
61-
62-
function residual(r, x, cache)
63-
function foo_wrap(x)
64-
foo(x, cache)
65-
end
66-
67-
r[:] = ForwardDiff.gradient(foo_wrap, x)
68-
end
69-
70-
cache = DiffCache(zeros(2))
71-
pattern = Symbolics.jacobian_sparsity((r, x) -> residual(r, x, cache), zeros(2), zeros(2))
72-
@test pattern == sparse([1 0
73-
0 1])

0 commit comments

Comments
 (0)