Skip to content

Commit

Permalink
- dump more tearing information
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12063 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jun 15, 2012
1 parent fd49aae commit cf6d6f1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -9380,13 +9380,17 @@ algorithm

case (_,_,_,_,_,_,_,_,_,_,_)
equation
// print("handel torn System\n");
Debug.fcall(Flags.TEARING_DUMP, print,"handle torn System\n");
// solve other equations for other vars
size = listLength(eindex);
eqns = BackendEquation.daeEqns(subsyst);
vars = BackendVariable.daeVars(subsyst);
tvarcrefs = List.map1(tvars,getTVarCrefs,vars);
Debug.fcall(Flags.TEARING_DUMP, print,"TVars:\n");
Debug.fcall(Flags.TEARING_DUMP, BackendDump.debuglst,(tvarcrefs,ComponentReference.printComponentRefStr,"\n","\n"));
(eqns,repl) = solveOtherEquations(othercomps,eqns,vars,ass2,BackendVarTransform.emptyReplacementsSized(size));
// replace other vars in residual equations with there expression, use reverse order from othercomps
Debug.fcall(Flags.TEARING_DUMP, print,"Residual Equations:\n");
eqns = List.fold1(residual,replaceOtherVarinResidualEqns,repl,eqns);
// replace new residual equations in original system
syst = replaceTornEquationsinSystem(eindex,0,eqns,isyst);
Expand Down Expand Up @@ -9641,8 +9645,8 @@ protected
algorithm
eqn := BackendDAEUtil.equationNth(inEqns, c-1);
eqn::_ := BackendVarTransform.replaceEquations({eqn}, inRepl);
// BackendDump.printEquation(eqn);
outEqns := BackendEquation.equationSetnth(inEqns,c-1,eqn);
Debug.fcall(Flags.TEARING_DUMP, BackendDump.printEquation,eqn);
end replaceOtherVarinResidualEqns;

protected function replaceTornEquationsinSystem
Expand Down

0 comments on commit cf6d6f1

Please sign in to comment.