Skip to content

Commit

Permalink
- dump id for matrix row
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11861 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed May 7, 2012
1 parent 02a26d2 commit bca6824
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Compiler/BackEnd/XMLDump.mo
Expand Up @@ -2309,19 +2309,24 @@ protected
BackendDAE.IncidenceMatrix m;
algorithm
(_,m,_) := BackendDAEUtil.getIncidenceMatrixfromOption(syst,shared,BackendDAE.NORMAL());
List.map1_0(arrayList(m),dumpIncidenceMatrix2,inOffset);
_ := Util.arrayFold(m,dumpIncidenceMatrix2,(inOffset,1));
outOffset := inOffset + arrayLength(m);
end dumpIncidenceMatrixWork;

protected function dumpIncidenceMatrix2 "
Help function to dumpMatrix
"
input list<Integer> row;
input Integer offset;
input tuple<Integer,Integer> inTpl;
output tuple<Integer,Integer> outTpl;
protected
Integer offset,c;
algorithm
dumpStrOpenTag(MathMLMatrixrow);
(offset,c) := inTpl;
dumpStrOpenTagAttr(MathMLMatrixrow,"id",intString(c));
List.map1_0(row,dumpMatrixIntegerRow,offset);
dumpStrCloseTag(MathMLMatrixrow);
outTpl := ((offset,c+1));
end dumpIncidenceMatrix2;


Expand Down

0 comments on commit bca6824

Please sign in to comment.