Skip to content

Commit

Permalink
- fix some tests, move some to failing
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13661 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 26, 2012
1 parent d322284 commit e1bdd99
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Compiler/BackEnd/SimCodeUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ algorithm

list<SimCode.JacobianMatrix> LinearMatrices;
SimCode.HashTableCrefToSimVar crefToSimVarHT;
Boolean ifcpp;
Boolean ifcpp,hasDivStmts;
BackendDAE.EqSystems systs;
BackendDAE.Shared shared;
BackendDAE.EquationArray removedEqs;
Expand Down Expand Up @@ -1915,7 +1915,6 @@ algorithm
// update indexNonLinear in SES_NONLINEAR and count
(parameterEquations, numberofEqns, numberofNonLinearSys) = indexNonLinSysandCountEqns(parameterEquations, 0, 0);
(allEquations, numberofEqns, numberofNonLinearSys) = indexNonLinSysandCountEqns(allEquations, numberofEqns, numberofNonLinearSys);
modelInfo = addNumEqnsandNonLinear(modelInfo, numberofEqns, numberofNonLinearSys);

// replace div operator with div operator with check of Division by zero
orderedVars = List.map(systs,BackendVariable.daeVars);
Expand All @@ -1933,8 +1932,11 @@ algorithm
(removedEquations,_) = listMap1_2(removedEquations,addDivExpErrorMsgtoSimEqSystem,(vars,varlst2,BackendDAE.ONLY_VARIABLES()));
// add equations with only parameters as division expression
allDivStmts = List.map(divLst,generateParameterDivisionbyZeroTestEqn);
parameterEquations = listAppend(parameterEquations,{SimCode.SES_ALGORITHM(uniqueEqIndex,allDivStmts)});
uniqueEqIndex = uniqueEqIndex+1;
hasDivStmts = listLength(allDivStmts)>0;
parameterEquations = Debug.bcallret2(hasDivStmts, listAppend, parameterEquations,{SimCode.SES_ALGORITHM(uniqueEqIndex,allDivStmts)},parameterEquations);
uniqueEqIndex = Util.if_(hasDivStmts, uniqueEqIndex+1,uniqueEqIndex);
numberofEqns = Util.if_(hasDivStmts, numberofEqns+1,numberofEqns);
modelInfo = addNumEqnsandNonLinear(modelInfo, numberofEqns, numberofNonLinearSys);

// generate jacobian or linear model matrices
LinearMatrices = createJacobianLinearCode(symJacs, modelInfo, uniqueEqIndex);
Expand Down

0 comments on commit e1bdd99

Please sign in to comment.