Skip to content

Commit f3518f4

Browse files
symjac and symtgrad
1 parent 61733e8 commit f3518f4

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia 0.7-beta
1+
julia 0.7-beta2
22
SymEngine 0.2.0
33
DataStructures 0.4.6
44
DiffEqBase 0.14.0

src/maketype.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ function maketype(name,param_dict,origex,funcs,syms,fex;
77
Hex = :(),
88
invHex = :(),
99
params = Symbol[],
10-
pfuncs=Vector{Expr}(0),
11-
d_pfuncs = Vector{Expr}(0),
10+
pfuncs=Vector{Expr}(undef,0),
11+
d_pfuncs = Vector{Expr}(undef,0),
12+
symjac = Matrix{Expr}(undef,0,0),
13+
symtgrad = Vector{Expr}(undef,0),
1214
param_Jex=:(),
1315
f_expr=:(),
1416
tgrad_expr=:(),
@@ -31,6 +33,8 @@ function maketype(name,param_dict,origex,funcs,syms,fex;
3133
pfuncs::Vector{Expr}
3234
d_pfuncs::Vector{Expr}
3335
syms::Vector{Symbol}
36+
symjac::Matrix{Any} # https://github.com/symengine/SymEngine.jl/issues/122
37+
symtgrad::Vector{Any}
3438
tgradex::Expr
3539
Jex::Expr
3640
expJex::Expr
@@ -85,7 +89,7 @@ function maketype(name,param_dict,origex,funcs,syms,fex;
8589
$(Expr(:kw,:params,params))) =
8690
$(name)($f_expr,nothing,
8791
$jac_expr,$tgrad_expr,$invW_expr,$invW_t_expr,$param_jac_expr,
88-
origex,funcs,pfuncs,d_pfuncs,syms,
92+
origex,funcs,pfuncs,d_pfuncs,syms,$symjac,$symtgrad,
8993
tgradex,Jex,expJex,param_Jex,
9094
invJex,invWex,invWex_t,
9195
Hex,invHex,fex,pex,vector_ex,vector_ex_return,params)) |> esc

src/ode_def_opts.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ function ode_def_opts(name::Symbol,opts::Dict{Symbol,Bool},ex::Expr,params...;_M
294294
invjac_expr=invjac_expr,
295295
invW_expr=invW_expr,
296296
invW_t_expr=invW_t_expr,
297-
param_jac_expr=param_jac_expr)
297+
param_jac_expr=param_jac_expr,
298+
symjac = convert.(Expr,symjac),
299+
symtgrad = convert.(Expr,symtgrad))
298300

299301
push!(exprs,typeex)
300302
push!(exprs,constructorex)

0 commit comments

Comments
 (0)