Skip to content

Commit

Permalink
[Backend] fix differentiation of the SteamPipe model
Browse files Browse the repository at this point in the history
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Feb 13, 2018
1 parent 4c05be3 commit bf59c08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Compiler/BackEnd/Differentiate.mo
Expand Up @@ -1365,6 +1365,10 @@ algorithm
cr = ComponentReference.crefPrefixDer(cr);
cr = createDifferentiatedCrefName(cr, inDiffwrtCref, matrixName);
res = Expression.makeCrefExp(cr, tp);

b = ComponentReference.crefEqual(DAE.CREF_IDENT("$",DAE.T_REAL_DEFAULT,{}), inDiffwrtCref);
(zero,_) = Expression.makeZeroExpression(Expression.arrayDimension(tp));
res = if b then zero else res;
then
(res, inFunctionTree);

Expand Down

0 comments on commit bf59c08

Please sign in to comment.