Skip to content

Commit

Permalink
- fixed dumped number of zero crossings and updated test cases
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23185 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Nov 4, 2014
1 parent f6e5763 commit 0ca1076
Showing 1 changed file with 13 additions and 43 deletions.
56 changes: 13 additions & 43 deletions Compiler/BackEnd/BackendDump.mo
Expand Up @@ -288,8 +288,8 @@ algorithm
dumpVariables(aliasVars, "AliasVariables");
dumpEquationArray(removedEqs, "Simple Equations");
dumpEquationArray(initialEqs, "Initial Equations");
dumpZeroCrossingList(zeroCrossingLst, "Zero Crossings (number of relations: " + intString(relationsNumber) + ")");
dumpZeroCrossingList(relationsLst, "Relations (number of relations: " + intString(relationsNumber) + ")");
dumpZeroCrossingList(zeroCrossingLst, "Zero Crossings");
dumpZeroCrossingList(relationsLst, "Relations");
dumpZeroCrossingList(sampleLst, "Samples");
dumpWhenClauseList(whenClauseLst, "When Clauses");
dumpConstraintList(constraints, "Constraints");
Expand Down Expand Up @@ -515,7 +515,6 @@ end setIncidenceMatrix1;
// - dumpEqnsSolved
// - dumpEqSystem
// - dumpEqSystems
// - dumpEquation
// - dumpEquationArray
// - dumpEquationList
// - dumpHashSet
Expand Down Expand Up @@ -619,29 +618,29 @@ algorithm
print("\n");
end dumpStateSets;

public function dumpZeroCrossingList "function dumpZeroCrossingList"
public function dumpZeroCrossingList
input list<BackendDAE.ZeroCrossing> inZeroCrossingList;
input String heading;
algorithm
print("\n" + heading + "\n" + UNDERLINE + "\n");
print("\n" + heading + " (" + intString(listLength(inZeroCrossingList)) + ")\n" + UNDERLINE + "\n");
print(zeroCrossingListString(inZeroCrossingList));
print("\n");
end dumpZeroCrossingList;

protected function dumpWhenClauseList "function dumpWhenClauseList"
protected function dumpWhenClauseList
input list<BackendDAE.WhenClause> inWhenClauseList;
input String heading;
algorithm
print("\n" + heading + "\n" + UNDERLINE + "\n");
print("\n" + heading + " (" + intString(listLength(inWhenClauseList)) + ")\n" + UNDERLINE + "\n");
print(whenClauseListString(inWhenClauseList));
print("\n");
end dumpWhenClauseList;

protected function dumpConstraintList "function dumpConstraintArray"
protected function dumpConstraintList
input list<DAE.Constraint> inConstraintArray;
input String heading;
algorithm
print("\n" + heading + "\n" + UNDERLINE + "\n");
print("\n" + heading + " (" + intString(listLength(inConstraintArray)) + ")\n" + UNDERLINE + "\n");
dumpConstraints(inConstraintArray, 0);
print("\n");
end dumpConstraintList;
Expand Down Expand Up @@ -677,37 +676,8 @@ algorithm
printSparsityPattern(pattern);
end dumpSparsityPattern;

public function dumpEquation "author: Frenkel TUD"
input BackendDAE.Equation inEquation;
algorithm
_:=
match (inEquation)
local
String s1,s2,res;
DAE.Exp e1,e2;
DAE.ComponentRef cr;
BackendDAE.WhenEquation w;
case (BackendDAE.EQUATION(exp = e1,scalar = e2))
equation
ExpressionDump.dumpExp(e1);
print("=\n");
ExpressionDump.dumpExp(e2);
then
();
case (BackendDAE.RESIDUAL_EQUATION(exp = e1))
equation
ExpressionDump.dumpExp(e1);
print("\n");
then
();
case (_)
then
();
end match;
end dumpEquation;

public function dumpTearing
" author: Frenkel TUD
public function dumpTearing "
author: Frenkel TUD
Dump tearing vars and residual equations."
input list<list<Integer>> inResEqn;
input list<list<Integer>> inTearVar;
Expand Down Expand Up @@ -743,9 +713,9 @@ public function dumpBackendDAEEqnList
input String header;
input Boolean printExpTree;
algorithm
print(header + "\n");
dumpBackendDAEEqnList2(inBackendDAEEqnList,printExpTree);
print("===================\n");
print(header + "\n");
dumpBackendDAEEqnList2(inBackendDAEEqnList,printExpTree);
print("===================\n");
end dumpBackendDAEEqnList;

protected function dumpBackendDAEEqnList2
Expand Down

0 comments on commit 0ca1076

Please sign in to comment.