Skip to content

Commit

Permalink
Added comment why derivative of if expression must be allowed even th…
Browse files Browse the repository at this point in the history
…ough it is non-existent.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@2501 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Aug 30, 2006
1 parent 13b8be1 commit 7015578
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/Derive.mo
Expand Up @@ -540,10 +540,12 @@ algorithm
then
Exp.RELATION(e1_1,rel,e2_1);

// if expression does not have derivative, but present here so linear equations can be
// identified by calculation of jacobian.
case (Exp.IFEXP(expCond = e1,expThen = e2,expElse = e3),tv)
equation
e2_1 = differentiateExp(e2, tv);
e3_1 = differentiateExp(e3, tv);
e3_1 = differentiateExp(e3, tv);
then
Exp.IFEXP(e1,e2_1,e3_1);

Expand Down

0 comments on commit 7015578

Please sign in to comment.