Skip to content

Commit

Permalink
- ansi C. for pleasing MSVC
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16023 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed May 13, 2013
1 parent ec3d002 commit 9cf1f2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SimulationRuntime/c/simulation/solver/nonlinearSolverHybrd.c
Expand Up @@ -646,6 +646,7 @@ int solveHybrd(DATA *data, int sysNumber)
}
else if((solverData->info == 4 || solverData->info == 5) && retries < 6)
{
int scaling = 0;
/* try to disable x-Scaling */

/* set x vector */
Expand All @@ -654,7 +655,7 @@ int solveHybrd(DATA *data, int sysNumber)
else
memcpy(solverData->x, systemData->nlsxExtrapolation, solverData->n*(sizeof(double)));

int scaling = solverData->useXScaling;
scaling = solverData->useXScaling;
if(scaling)
solverData->useXScaling = 0;

Expand Down Expand Up @@ -693,10 +694,11 @@ int solveHybrd(DATA *data, int sysNumber)
}
/* Then try with old values (instead of extrapolating )*/
} else if((solverData->info == 4 || solverData->info == 5) && retries2 < 1) {
int scaling = 0;
/* set x vector */
memcpy(solverData->x, systemData->nlsxOld, solverData->n*(sizeof(double)));

int scaling = solverData->useXScaling;
scaling = solverData->useXScaling;
if(!scaling)
solverData->useXScaling = 1;

Expand Down

0 comments on commit 9cf1f2c

Please sign in to comment.