Skip to content

Commit

Permalink
Added functions to split equations for each state variable
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8440 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Xenofon Floros committed Mar 31, 2011
1 parent 4b55dd7 commit 90e1efd
Show file tree
Hide file tree
Showing 4 changed files with 620 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -2521,7 +2521,7 @@ algorithm
end matchcontinue;
end blockIsDynamic;

protected function markStateEquations "function: markStateEquations
public function markStateEquations "function: markStateEquations
This function goes through all equations and marks the ones that
calculates a state, or is needed in order to calculate a state,
with a non-zero value in the array passed as argument.
Expand Down Expand Up @@ -2695,7 +2695,7 @@ algorithm
end matchcontinue;
end markStateEquation2;

protected function invReachableNodes "function: invReachableNodes
public function invReachableNodes "function: invReachableNodes
Similar to reachable_nodes, but follows edges in backward direction
I.e. what equations/variables needs to be solved to solve this one."
input Integer inInteger1;
Expand Down
24 changes: 12 additions & 12 deletions Compiler/BackEnd/BackendDump.mo
Expand Up @@ -1408,7 +1408,7 @@ algorithm
end matchcontinue;
end dumpComponentsGraphStr2;

protected function dumpList "function: dumpList
public function dumpList "function: dumpList
author: PA

Helper function to dump.
Expand Down Expand Up @@ -1578,10 +1578,10 @@ algorithm
dumpIncidenceMatrix(m);
dumpIncidenceMatrixT(mT);
dumpMatching(v1);
dumpComponentsAddvanced(comps,v2,ode);
dumpComponentsAdvanced(comps,v2,ode);
end bltdump;

public function dumpComponentsAddvanced "function: dumpComponents
public function dumpComponentsAdvanced "function: dumpComponents
author: Frenkel TUD

Prints the blocks of the BLT sorting on stdout.
Expand All @@ -1595,10 +1595,10 @@ algorithm
print("Blocks\n");
print("=======\n");
vars := BackendVariable.daeVars(ode);
dumpComponentsAddvanced2(l, 1,v2,vars);
end dumpComponentsAddvanced;
dumpComponentsAdvanced2(l, 1,v2,vars);
end dumpComponentsAdvanced;

protected function dumpComponentsAddvanced2 "function: dumpComponents2
protected function dumpComponentsAdvanced2 "function: dumpComponents2
author: PA

Helper function to dump_components.
Expand All @@ -1624,16 +1624,16 @@ algorithm
s = Util.stringDelimitList(ls, ", ");
print(s);
print("} ");
dumpComponentsAddvanced3(l,v2,vars);
dumpComponentsAdvanced3(l,v2,vars);
print("\n");
i_1 = i + 1;
dumpComponentsAddvanced2(lst, i_1,v2,vars);
dumpComponentsAdvanced2(lst, i_1,v2,vars);
then
();
end match;
end dumpComponentsAddvanced2;
end dumpComponentsAdvanced2;

protected function dumpComponentsAddvanced3 "function: dumpComponents2
protected function dumpComponentsAdvanced3 "function: dumpComponents2
author: PA

Helper function to dump_components.
Expand Down Expand Up @@ -1679,10 +1679,10 @@ algorithm
print(s);
s = Util.if_(b,"der(","");
print(s);
dumpComponentsAddvanced3(l,v2,vars);
dumpComponentsAdvanced3(l,v2,vars);
then
();
end match;
end dumpComponentsAddvanced3;
end dumpComponentsAdvanced3;

end BackendDump;

0 comments on commit 90e1efd

Please sign in to comment.