Skip to content

Commit 4e2e1db

Browse files
Merge pull request #355 from SciML/s/deriv_simplify
keep the same result, do just 1 simplification
2 parents 2037a92 + 378eb49 commit 4e2e1db

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RecursiveArrayTools = "2.3"
3939
SafeTestsets = "0.0.1"
4040
SpecialFunctions = "0.7, 0.8, 0.9, 0.10"
4141
StaticArrays = "0.10, 0.11, 0.12"
42-
SymbolicUtils = "0.3"
42+
SymbolicUtils = "0.3.2"
4343
TreeViews = "0.3"
4444
UnPack = "0.1, 1.0"
4545
Unitful = "1.1"

src/differentials.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $(SIGNATURES)
3737
TODO
3838
"""
3939
function expand_derivatives(O::Operation,simplify=true)
40-
@. O.args = expand_derivatives(O.args,simplify)
40+
@. O.args = expand_derivatives(O.args,false)
4141

4242
if isa(O.op, Differential)
4343
(D, o) = (O.op, O.args[1])
@@ -48,7 +48,7 @@ function expand_derivatives(O::Operation,simplify=true)
4848
isa(o.op, Variable) && return O
4949

5050
x = sum(1:length(o.args)) do i
51-
derivative(o, i) * expand_derivatives(D(o.args[i]),simplify)
51+
derivative(o, i) * expand_derivatives(D(o.args[i]),false)
5252
end
5353

5454
return simplify ? ModelingToolkit.simplify(x) : x

0 commit comments

Comments
 (0)