|
440 | 440 |
|
441 | 441 | # Finds and differentials in an expression, and sets these to 0. |
442 | 442 | function remove_diffs(expr) |
443 | | - if Symbolics._occursin(Symbolics.is_derivative, expr) |
444 | | - return Symbolics.replace(expr, diff_2_zero) |
| 443 | + if hasnode(Symbolics.is_derivative, expr) |
| 444 | + return replacenode(expr, diff_2_zero) |
445 | 445 | else |
446 | 446 | return expr |
447 | 447 | end |
@@ -556,8 +556,8 @@ function nonlinear_convert_differentials_check(rs::ReactionSystem) |
556 | 556 | # If the lhs upper level function is not a differential w.r.t. time. |
557 | 557 | # If the contenct of the differential is not a variable (and nothing more). |
558 | 558 | # If either of this is a case, throws the warning. |
559 | | - if Symbolics._occursin(Symbolics.is_derivative, eq.rhs) || |
560 | | - !Symbolics.istree(eq.lhs) || |
| 559 | + if hasnode(Symbolics.is_derivative, eq.rhs) || |
| 560 | + !Symbolics.is_derivative(eq.lhs) || |
561 | 561 | !isequal(Symbolics.operation(eq.lhs), Differential(get_iv(rs))) || |
562 | 562 | (length(arguments(eq.lhs)) != 1) || |
563 | 563 | !any(isequal(arguments(eq.lhs)[1]), nonspecies(rs)) |
@@ -892,7 +892,7 @@ function to_multivariate_poly(polyeqs::AbstractVector{Symbolics.BasicSymbolic{Re |
892 | 892 |
|
893 | 893 | pvar2sym, sym2term = SymbolicUtils.get_pvar2sym(), SymbolicUtils.get_sym2term() |
894 | 894 | ps = map(polyeqs) do x |
895 | | - if istree(x) && operation(x) == (/) |
| 895 | + if iscall(x) && operation(x) == (/) |
896 | 896 | error("We should not be able to get here, please contact the package authors.") |
897 | 897 | else |
898 | 898 | PolyForm(x, pvar2sym, sym2term).p |
|
0 commit comments