Skip to content

Commit

Permalink
- Fix UTF-8/Tab errors
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13267 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 9, 2012
1 parent 8d7a56f commit 33233fb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fix-bom:
find . -type f \( ! -path '*/.svn/*' -prune \) | while read file;do sed -i '1 s/^\xef\xbb\xbf//' "$$file";done

SOURCE_DIRS=$(SOURCE_DIRS_UTF8) testsuite/flattening/libraries/3rdParty/HumMod
SOURCE_DIRS_UTF8=OM*/ Compiler/ SimulationRuntime/ mosh/ libraries/ testsuite/flattening/libraries/ `bash -c echo testsuite/flattening/libraries/3rdParty/{HumMod,PlanarMechanics,siemens,SiemensPower,ThermoSysPro}` testsuite/openmodelica/modelicaML testsuite/AVM
SOURCE_DIRS_UTF8=OM*/ Compiler/ SimulationRuntime/ mosh/ libraries/ `bash -c echo testsuite/flattening/libraries/3rdParty/{PlanarMechanics,siemens,SiemensPower,ThermoSysPro}` testsuite/openmodelica/modelicaML testsuite/AVM testsuite/simulation

bom-error:
rm -f bom-error.log bom-error.sh
Expand Down
8 changes: 4 additions & 4 deletions SimulationRuntime/c/math-support/nonlinearSystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ int check_nonlinear_solutions(DATA *data)
int i,returnValue = 0;

for(i=0;i<data->modelData.nNonLinearSystems;++i){
if (nonlinsys[i].solved == 0){
returnValue = 1;
break;
}
if (nonlinsys[i].solved == 0){
returnValue = 1;
break;
}
}

return returnValue;
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/c/simulation/solver/dassl.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ int dasrt_step(DATA* simData, SOLVER_INFO* solverInfo)
fflush(stderr);
fflush(stdout);
retVal = continue_DASRT(&dasslData->idid, &simData->simulationInfo.tolerance);
solverInfo->currentTime = solverInfo->currentTime + solverInfo->currentStepSize;
solverInfo->currentTime = solverInfo->currentTime + solverInfo->currentStepSize;
sData->timeValue = solverInfo->currentTime;
functionODE(simData);
INFO1("DASRT can't continue. time = %f", sData->timeValue);
Expand Down
20 changes: 10 additions & 10 deletions SimulationRuntime/c/simulation/solver/solver_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,25 +420,25 @@ int solver_main(DATA* simData, double start, double stop, double step,
checkTermination(simData);
}

/* terminate for some cases:
* - integrator fails
* - non-linear system failed to solve
* - assert was called
*/
/* terminate for some cases:
* - integrator fails
* - non-linear system failed to solve
* - assert was called
*/
if (simData->simulationInfo.simulationSuccess != 0 || retValIntegrator != 0 || check_nonlinear_solutions(simData)) {
simData->simulationInfo.terminal = 1;
update_DAEsystem(simData);
simData->simulationInfo.terminal = 0;

if (simData->simulationInfo.simulationSuccess){
retVal = -1;
INFO1("model terminate | Simulation terminated at time %g",solverInfo.currentTime);
INFO1("model terminate | Simulation terminated at time %g",solverInfo.currentTime);
} else if (retValIntegrator){
retVal = -1 + retValIntegrator;
retVal = -1 + retValIntegrator;
INFO1("model terminate | Integrator failed. | Simulation terminated at time %g",solverInfo.currentTime);
} else if (check_nonlinear_solutions(simData)){
retVal = -2;
INFO1("model terminate | non-linear system solver failed. | Simulation terminated at time %g",solverInfo.currentTime);
retVal = -2;
INFO1("model terminate | non-linear system solver failed. | Simulation terminated at time %g",solverInfo.currentTime);
}
break;
}
Expand Down Expand Up @@ -584,7 +584,7 @@ void checkTermination(DATA* simData)
{
if(terminationAssert || terminationTerminate)
{
simData->simulationInfo.simulationSuccess = -1;
simData->simulationInfo.simulationSuccess = -1;
printInfo(stdout, TermInfo);
fputc(' ', stdout);
}
Expand Down

0 comments on commit 33233fb

Please sign in to comment.