Skip to content

Commit

Permalink
- use Expression.makeScalarArray for dynamicstate selection equations
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13348 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 12, 2012
1 parent c9e0167 commit 32338ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/IndexReduction.mo
Expand Up @@ -2610,10 +2610,10 @@ algorithm
crlst = List.map(varlst,BackendVariable.varCref);
explst = List.map(crlst,Expression.crefExp);
e1 = listGet(explst,1);
e1 = Util.if_(intGt(rang,1),DAE.ARRAY(DAE.T_REAL_DEFAULT,false,explst),e1);
e1 = Debug.bcallret2(intGt(rang,1), Expression.makeScalarArray, explst, DAE.T_REAL_DEFAULT, e1);
e2 = listGet(explst,1);
explst = List.map(explst,makeder);
e2 = Util.if_(intGt(rang,1),DAE.ARRAY(DAE.T_REAL_DEFAULT,false,explst),DAE.CALL(Absyn.IDENT("der"),{e2},DAE.callAttrBuiltinReal));
e2 = Debug.bcallret2(intGt(rang,1), Expression.makeScalarArray, explst, DAE.T_REAL_DEFAULT, DAE.CALL(Absyn.IDENT("der"),{e2},DAE.callAttrBuiltinReal));
con = DAE.RELATION(contexp,DAE.EQUAL(DAE.T_INTEGER_DEFAULT),DAE.ICONST(index),-1,NONE());
wc = BackendDAE.WHEN_CLAUSE(con,{BackendDAE.REINIT(crset,e1,DAE.emptyElementSource)},NONE());
startvalues = List.map(varlst,BackendVariable.varStartValue);
Expand Down

0 comments on commit 32338ff

Please sign in to comment.