Skip to content

Commit

Permalink
- solve linear systems with constant jacobian and variable b-Vector s…
Browse files Browse the repository at this point in the history
…ymbolically with +d=constjac

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25106 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Mar 16, 2015
1 parent 62783d0 commit 02db2b2
Show file tree
Hide file tree
Showing 5 changed files with 423 additions and 30 deletions.
9 changes: 9 additions & 0 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -8157,5 +8157,14 @@ algorithm
end match;
end expInt;

public function makeSingleEquationComp
input Integer eqIdx;
input Integer varIdx;
output BackendDAE.StrongComponent comp;
algorithm
comp := BackendDAE.SINGLEEQUATION(eqIdx,varIdx);
end makeSingleEquationComp;


annotation(__OpenModelica_Interface="backend");
end BackendDAEUtil;
10 changes: 1 addition & 9 deletions Compiler/BackEnd/HpcOmEqSystems.mo
Expand Up @@ -693,7 +693,7 @@ algorithm
true = intLe(listLength(tVarsIn),3);
// apply Cramers Rule to this equation system
(resEqs,_,addEqs,addVars) = applyCramerRule(jacValuesIn,tVarsIn);
comps = List.threadMap(eqIdcsIn,varIdcsIn,makeSingleEquationComp);
comps = List.threadMap(eqIdcsIn,varIdcsIn,BackendDAEUtil.makeSingleEquationComp);
then (comps,resEqs,tVarsIn,addEqs,addVars);
else
equation
Expand All @@ -706,14 +706,6 @@ algorithm
end matchcontinue;
end buildEqSystemComponent;

protected function makeSingleEquationComp
input Integer eqIdx;
input Integer varIdx;
output BackendDAE.StrongComponent comp;
algorithm
comp := BackendDAE.SINGLEEQUATION(eqIdx,varIdx);
end makeSingleEquationComp;


protected function buildLinearJacobian "builds the jacobian out of the given jacobian-entries
author:Waurich TUD 2013-12"
Expand Down

0 comments on commit 02db2b2

Please sign in to comment.