Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit bf59c08

Browse files
Willi BraunOpenModelica-Hudson
authored andcommitted
[Backend] fix differentiation of the SteamPipe model
Belonging to [master]: - #2190 - OpenModelica/OpenModelica-testsuite#853
1 parent 4c05be3 commit bf59c08

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Compiler/BackEnd/Differentiate.mo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,10 @@ algorithm
13651365
cr = ComponentReference.crefPrefixDer(cr);
13661366
cr = createDifferentiatedCrefName(cr, inDiffwrtCref, matrixName);
13671367
res = Expression.makeCrefExp(cr, tp);
1368+
1369+
b = ComponentReference.crefEqual(DAE.CREF_IDENT("$",DAE.T_REAL_DEFAULT,{}), inDiffwrtCref);
1370+
(zero,_) = Expression.makeZeroExpression(Expression.arrayDimension(tp));
1371+
res = if b then zero else res;
13681372
then
13691373
(res, inFunctionTree);
13701374

0 commit comments

Comments
 (0)