Skip to content

Commit 796d908

Browse files
remove Hessian from the default
1 parent 576950d commit 796d908

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ opts = Dict{Symbol,Bool}(
122122
:build_invjac => true,
123123
:build_invW => true,
124124
:build_invW_t => true,
125-
:build_hes => true,
126-
:build_invhes => true,
125+
:build_hes => false,
126+
:build_invhes => false,
127127
:build_dpfuncs => true)
128128
```
129129

src/macros.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ macro ode_def(name,ex,params...)
55
:build_expjac => false,
66
:build_invjac => true,
77
:build_invW => true,
8-
:build_hes => true,
9-
:build_invhes => true,
8+
:build_hes => false,
9+
:build_invhes => false,
1010
:build_dpfuncs => true)
1111
ode_def_opts(name,opts,ex,params...)
1212
end
@@ -44,7 +44,7 @@ macro ode_def_noinvhes(name,ex,params...)
4444
:build_expjac => false,
4545
:build_invjac => true,
4646
:build_invW => true,
47-
:build_hes => true,
47+
:build_hes => false,
4848
:build_invhes => false,
4949
:build_dpfuncs => true)
5050
ode_def_opts(name,opts,ex,params...)

test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ f(Val{:paramjac},t,u,[2.0;2.5;3.0],pJ)
9797
@test pJ == [2.0 -6.0 0
9898
0 0 -3.0]
9999

100+
#=
100101
println("Test Hessians")
101102
H = J
102103
iH = iJ
103104
f(Val{:hes},t,u,H)
104105
@test_throws MethodError f(Val{:invhes},t,u,iH)
105106
@test J == [0.0 0.0
106107
0.0 0.0]
108+
=#
107109

108110
println("Test using new parameters")
109111
g = LotkaVolterra(a=1.0,b=2.0)
@@ -122,7 +124,7 @@ h(t,u,du)
122124
println("Test booleans")
123125
@test has_jac(f) == true
124126
@test has_invjac(f) == true
125-
@test has_hes(f) == true
127+
@test has_hes(f) == false
126128
@test has_invhes(f) == false
127129
@test has_paramderiv(f) == true
128130
@test has_paramjac(f) == true
@@ -148,7 +150,7 @@ end a=>1.5 μ=>1 c=3 d=4
148150
NJ(t,u,du)
149151
@test du == [-3.0;-3*3.0 + erf(2.0*3.0/4)]
150152
@test du == NJ(t,u)
151-
@test_throws MethodError NJ(Val{:jac},t,u,iH)
153+
@test_throws MethodError NJ(Val{:jac},t,u,iJ)
152154
# NJ(Val{:jac},t,u,J) # Currently gives E not defined, will be fixed by the next SymEgine
153155
### FEM Macros
154156

0 commit comments

Comments
 (0)