Changeset 6eb1528 in OpenModelica
- Timestamp:
- 2021-11-25T13:35:50+01:00 (2 years ago)
- Parents:
- dc7de090
- git-author:
- Per Östlund <perost86@…> (11/25/21 13:33:17)
- git-committer:
- Per Östlund <perost86@…> (11/25/21 13:35:50)
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
OMCompiler/Compiler/NFFrontEnd/NFExpression.mo
rbbbca3c8 r6eb1528 1780 1780 list<Subscript> subs; 1781 1781 algorithm 1782 subs := list(s for s guard not Subscript.isSplitIndex(s) in subscripts); 1783 1784 if listEmpty(subs) then 1785 str := toFlatString(exp); 1782 if Flags.getConfigBool(Flags.MODELICA_OUTPUT) then 1783 subs := list(s for s guard not Subscript.isSplitIndex(s) in subscripts); 1784 1785 if listEmpty(subs) then 1786 str := toFlatString(exp); 1787 else 1788 exp_ty := typeOf(exp); 1789 dims := List.firstN(Type.arrayDims(exp_ty), listLength(subs)); 1790 sub_tyl := list(Dimension.subscriptType(d) for d in dims); 1791 name := Type.subscriptedTypeName(exp_ty, sub_tyl); 1792 1793 strl := {")"}; 1794 1795 for s in subs loop 1796 strl := Subscript.toFlatString(s) :: strl; 1797 strl := "," :: strl; 1798 end for; 1799 1800 strl := toFlatString(exp) :: strl; 1801 strl := "'(" :: strl; 1802 strl := name :: strl; 1803 strl := "'" :: strl; 1804 str := stringAppendList(strl); 1805 end if; 1786 1806 else 1787 exp_ty := typeOf(exp); 1788 dims := List.firstN(Type.arrayDims(exp_ty), listLength(subs)); 1789 sub_tyl := list(Dimension.subscriptType(d) for d in dims); 1790 name := Type.subscriptedTypeName(exp_ty, sub_tyl); 1791 1792 strl := {")"}; 1793 1794 for s in subs loop 1795 strl := Subscript.toFlatString(s) :: strl; 1796 strl := "," :: strl; 1797 end for; 1798 1799 strl := toFlatString(exp) :: strl; 1800 strl := "'(" :: strl; 1801 strl := name :: strl; 1802 strl := "'" :: strl; 1803 str := stringAppendList(strl); 1807 str := toFlatString(exp) + Subscript.toFlatStringList(subscripts); 1804 1808 end if; 1805 1809 end toFlatSubscriptedString; -
OMCompiler/Compiler/NFFrontEnd/NFFlatModel.mo
r7c3ddb9c r6eb1528 512 512 types := match exp 513 513 case Expression.SUBSCRIPTED_EXP() 514 guard Flags.getConfigBool(Flags.MODELICA_OUTPUT) 514 515 algorithm 515 516 types := collectSubscriptedFlatType(exp.exp, exp.subscripts, exp.ty, types); -
testsuite/openmodelica/flatmodelica/DoublePendulum.mos
rea1a004 r6eb1528 3 3 4 4 loadModel(Modelica, {"3.2.3"});getErrorString(); 5 setCommandLineOptions("-d=newInst -f ");5 setCommandLineOptions("-d=newInst -f -m"); 6 6 writeFile("DoublePendulum.mo", OpenModelica.Scripting.instantiateModel(Modelica.Mechanics.MultiBody.Examples.Elementary.DoublePendulum));getErrorString(); 7 7 clear(); -
testsuite/openmodelica/flatmodelica/Makefile
r74e94c8 r6eb1528 10 10 11 11 TESTFILES = DoublePendulum.mos \ 12 Tables.mos 12 Tables.mos \ 13 SD.mo 13 14 14 15 -
testsuite/openmodelica/flatmodelica/Tables.mos
r221b299 r6eb1528 4 4 loadModel(ModelicaServices, {"3.2.3+maint.om"});getErrorString(); 5 5 loadModel(ModelicaTest, {"3.2.3"});getErrorString(); 6 setCommandLineOptions("-d=newInst -f ");6 setCommandLineOptions("-d=newInst -f -m"); 7 7 writeFile("Tables.mo", OpenModelica.Scripting.instantiateModel(ModelicaTest.Tables.CombiTable1D.Test33));getErrorString(); 8 8 clear();
Note: See TracChangeset
for help on using the changeset viewer.