Skip to content

Commit

Permalink
fixed the generation of the ode taskgraph (for torn systems and compl…
Browse files Browse the repository at this point in the history
…ex equations)

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16500 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Jun 27, 2013
1 parent cf7ee50 commit 445c5d1
Show file tree
Hide file tree
Showing 2 changed files with 413 additions and 241 deletions.
7 changes: 3 additions & 4 deletions Compiler/BackEnd/HpcOmSimCode.mo
Expand Up @@ -130,15 +130,14 @@ algorithm

//Create TaskGraph
HpcOmTaskGraph.createTaskGraph(inBackendDAE,filenamePrefix);

uniqueEqIndex = 1;
ifcpp = stringEqual(Config.simCodeTarget(), "Cpp");
// Debug.fcall(Flags.FAILTRACE, print, "is that Cpp? : " +& Dump.printBoolStr(ifcpp) +& "\n");
cname = Absyn.pathStringNoQual(class_);

// generate initDAE before replacing pre(alias)!
initDAE = Initialization.solveInitialSystem(dlow);

// replace pre(alias) in time-equations
dlow = BackendDAEOptimize.simplifyTimeIndepFuncCalls(dlow);

Expand All @@ -147,7 +146,6 @@ algorithm

// check if the Sytems has states
dlow = BackendDAEUtil.addDummyStateIfNeeded(dlow);

BackendDAE.DAE(systs, shared as BackendDAE.SHARED(removedEqs=removedEqs,
constraints=constrsarr,
classAttrs=clsattrsarra,
Expand Down Expand Up @@ -187,7 +185,8 @@ algorithm

// equation generation for euler, dassl2, rungekutta
(uniqueEqIndex, odeEquations, algebraicEquations, allEquations, tempvars) = SimCodeUtil.createEquationsForSystems(systs, shared, uniqueEqIndex, {}, {}, {}, tempvars);
print("from "+&intString(listLength(allEquations))+&" we have "+&intString(listLength(List.flatten(odeEquations)))+& " ode eqs and "+&intString(listLength(List.flatten(algebraicEquations)))+&" algebraic eqs\n");
//print("from "+&intString(listLength(allEquations))+&" we have "+&intString(listLength(List.flatten(odeEquations)))+& " ode eqs and "+&intString(listLength(List.flatten(algebraicEquations)))+&" algebraic eqs\n");
//HpcOmTaskGraph.createTaskGraphODE(odeEquations,dlow,filenamePrefix);
// modelInfo = SimCodeUtil.addTempVars(tempvars, modelInfo);
//
// // Assertions and crap
Expand Down

0 comments on commit 445c5d1

Please sign in to comment.