Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21559 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Jul 17, 2014
1 parent 589e0a4 commit 40385fa
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions Compiler/BackEnd/SimCode.mo
Expand Up @@ -456,15 +456,15 @@ uniontype SimEqSystem
record SES_LINEAR
Integer index;
Boolean partOfMixed;

list<SimVar> vars;
list<DAE.Exp> beqs;
list<tuple<Integer, Integer, SimEqSystem>> simJac;
/* solver linear tearing system */
list<SimEqSystem> residual;
Option<JacobianMatrix> jacobianMatrix;


list<DAE.ElementSource> sources;
Integer indexLinearSystem;
end SES_LINEAR;
Expand Down
22 changes: 11 additions & 11 deletions Compiler/BackEnd/SimCodeUtil.mo
Expand Up @@ -1554,7 +1554,7 @@ algorithm
(LinearMatrices,uniqueEqIndex) = createJacobianLinearCode(symJacs, modelInfo, uniqueEqIndex);
LinearMatrices = jacG::LinearMatrices;

// collect jacobian equation only for equantion info file
// collect jacobian equation only for equantion info file
jacobianEquations = collectAllJacobianEquations(LinearMatrices, {});

// collect symbolic jacobians in linear loops of the overall jacobians
Expand Down Expand Up @@ -2002,7 +2002,7 @@ algorithm
(eqs, symjacs, countLinearSys, countNonLinSys, countMixedSys, countJacobians) = countandIndexAlgebraicLoopsWork(eqs, {}, inLinearSysIndex, inNonLinSysIndex+1, inMixedSysIndex, inJacobianIndex, {}, {});
(res, symjacs, countLinearSys, countNonLinSys, countMixedSys, countJacobians) = countandIndexAlgebraicLoopsWork(rest, inSymJacs, countLinearSys, countNonLinSys, countMixedSys, countJacobians, SimCode.SES_NONLINEAR(index, eqs, crefs, inNonLinSysIndex, NONE(), linearTearing)::inEqnsAcc, inSymJacsAcc);
then (res, symjacs, countLinearSys, countNonLinSys, countMixedSys, countJacobians);

case(SimCode.SES_NONLINEAR(index, eqs, crefs, _, SOME(symJac), linearTearing)::rest, _, _, _, _, _, _, _)
equation
(eqs, symjacs, countLinearSys, countNonLinSys, countMixedSys, countJacobians) = countandIndexAlgebraicLoopsWork(eqs, {}, inLinearSysIndex, inNonLinSysIndex+1, inMixedSysIndex, inJacobianIndex, {}, {});
Expand Down Expand Up @@ -4074,22 +4074,22 @@ algorithm
Option<SimCode.JacobianMatrix> jacobianMatrix;
list<Integer> otherEqnsInts, otherVarsInts;
list<list<Integer>> otherVarsIntsLst;



/*
BackendDAE.EquationArray eqns1;
BackendDAE.Variables v;
BackendDAE.EqSystem syst;
list<DAE.Exp> beqs;
list<DAE.ElementSource> sources;
BackendVarTransform.VariableReplacements repl;

BackendDAE.IncidenceMatrix m;
list<tuple<Integer, Integer, BackendDAE.Equation>> jac;
list<tuple<Integer, Integer, SimCode.SimEqSystem>> simJac;


// for the linear case we could try just to evaluate all equation
case(true, _, _, _, _, _, BackendDAE.EQSYSTEM(orderedVars=vars, orderedEqs=eqns), BackendDAE.SHARED(knownVars=kv, functionTree=functree), _, _)
equation
Expand Down Expand Up @@ -4130,7 +4130,7 @@ algorithm
*/
case(true, _, _, _, _, _,BackendDAE.EQSYSTEM(orderedVars=vars, orderedEqs=eqns), BackendDAE.SHARED(knownVars=kv, functionTree=_), _, _)
equation
// TODO: Remove when cpp runtime ready for doLinearTearing
// TODO: Remove when cpp runtime ready for doLinearTearing
//false = stringEqual(Config.simCodeTarget(), "Cpp");
// get tearing vars
tvars = List.map1r(tearingVars, BackendVariable.getVarAt, vars);
Expand Down Expand Up @@ -4493,9 +4493,9 @@ algorithm
Integer numJac;
Integer index;
Integer nCandidates;
Integer nStates;
Integer nStates;
list<DAE.ComponentRef> states;
list<DAE.ComponentRef> statescandidates;
list<DAE.ComponentRef> statescandidates;
DAE.ComponentRef crA;
case ({}, _, _, _) then (listReverse(inSetsAccum), listReverse(inSymJacs), iNumJac);
case((set as SimCode.SES_STATESET(index=index, nCandidates=nCandidates, nStates=nStates, states=states, statescandidates=statescandidates, crA=crA, jacobianMatrix=symJac))::sets, _, _, _)
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/Tearing.mo
Expand Up @@ -212,7 +212,7 @@ algorithm
equality(jacType = BackendDAE.JAC_TIME_VARYING());
Debug.fcall(Flags.TEARING_DUMP, print, "\nCase linear in traverseComponents\nUse Flag '+d=tearingdumpV' for more details\n\n");
true = Flags.isSet(Flags.LINEAR_TEARING);
// TODO: Remove when cpp runtime ready for doLinearTearing
// TODO: Remove when cpp runtime ready for doLinearTearing
false = stringEqual(Config.simCodeTarget(), "Cpp");
Debug.fcall(Flags.TEARING_DUMP, print, "Flag 'doLinearTearing' is set\n\n");
Debug.fcall(Flags.TEARING_DUMPVERBOSE, print, "Jacobian:\n" +& BackendDump.dumpJacobianStr(ojac) +& "\n\n");
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenC.tpl
Expand Up @@ -1551,7 +1551,7 @@ template functionInitialLinearSystemsTemp(list<SimEqSystem> allEquations, String
linearSystemData[<%eq.indexLinearSystem%>].setA = NULL;//setLinearMatrixA<%eq.index%>;
linearSystemData[<%eq.indexLinearSystem%>].setb = NULL; //setLinearVectorb<%eq.index%>;
>>
else
else
error(sourceInfo(), ' No jacobian create for linear system <%eq.index%>.')
end match
)
Expand Down
22 changes: 11 additions & 11 deletions Compiler/Template/SimCodeTV.mo
Expand Up @@ -337,21 +337,21 @@ package SimCode
list<DAE.Statement> statements;
end SES_ALGORITHM;

record SES_LINEAR
Integer index;
Boolean partOfMixed;
list<SimVar> vars;
list<DAE.Exp> beqs;
record SES_LINEAR
Integer index;
Boolean partOfMixed;

list<SimVar> vars;
list<DAE.Exp> beqs;
list<tuple<Integer, Integer, SimEqSystem>> simJac;
/* solver linear tearing system */
list<SimEqSystem> residual;
Option<JacobianMatrix> jacobianMatrix;
list<DAE.ElementSource> sources;
Integer indexLinearSystem;
end SES_LINEAR;


list<DAE.ElementSource> sources;
Integer indexLinearSystem;
end SES_LINEAR;

record SES_NONLINEAR
Integer index;
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/c/simulation/solver/linearSolverLapack.c
Expand Up @@ -345,7 +345,7 @@ int solveLapack(DATA *data, int sysNumber)
}

if (success == 1){

/* take the solution */
memcpy(systemData->x, systemData->b, systemData->size*(sizeof(double)));

Expand Down

0 comments on commit 40385fa

Please sign in to comment.