Skip to content

Commit

Permalink
remove SparseDiffTools as [deps] since it is only used in testing; up…
Browse files Browse the repository at this point in the history
…date test
  • Loading branch information
boriskaus committed Oct 28, 2024
1 parent eed0583 commit e6f8a88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
PETSc_jll = "8fa3689e-f0b9-5420-9873-adf6ccf46f2d"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804"

[compat]
MPI = "0.20"
Expand Down
6 changes: 3 additions & 3 deletions test/old_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ PETSc.initialize(PETSc.petsclibs[1])


function F!(cfx, cx, a)
x = PETSc.unsafe_localarray(Float64,cx, write=false)
fx = PETSc.unsafe_localarray(Float64,cfx,write=true)
x = PETSc.unsafe_localarray(Float64,cx, write=false, read=true)
fx = PETSc.unsafe_localarray(Float64,cfx,write=true, read=true)
fx[1] = x[1]^2 + x[1]*x[2] - 3
fx[2] = x[1]*x[2] + x[2]^2 - 6
Base.finalize(x)
Expand All @@ -83,7 +83,7 @@ PETSc.initialize(PETSc.petsclibs[1])
J = zeros(2,2)
PJ = PETSc.MatSeqDense(J)
function updateJ!(cx, args...)
x = PETSc.unsafe_localarray(Float64,cx, write=false)
x = PETSc.unsafe_localarray(Float64,cx, write=false, read=true)
J[1,1] = 2x[1] + x[2]
J[1,2] = x[1]
J[2,1] = x[2]
Expand Down

0 comments on commit e6f8a88

Please sign in to comment.