Skip to content

Commit

Permalink
simplify adjacency row for tearing
Browse files Browse the repository at this point in the history
 - important for symEuler



git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25723 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Apr 23, 2015
1 parent d17bcea commit f628fa0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -5101,6 +5101,14 @@ algorithm
else
equation
f = Differentiate.differentiateExpSolve(e, cr, functions);
f = match(f)
local DAE.Exp one;
/* der(f(x)) = c/y => c*x = y*lhs */
case DAE.BINARY(one,DAE.DIV(), DAE.CREF()) /*Note: 1/x => ln(x) => Expression.solve will solve it */
guard Expression.isConst(one) and not Expression.isZero(one)
then one;
else f;
end match;
then (f,false);
end matchcontinue;
end tryToSolveOrDerive;
Expand Down

0 comments on commit f628fa0

Please sign in to comment.