Skip to content

Commit

Permalink
[Runtime] fix some debug outputs in kinsol solver
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2388
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Apr 23, 2018
1 parent c2ffbc5 commit d4122a2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions SimulationRuntime/c/simulation/solver/kinsolSolver.c
Expand Up @@ -139,7 +139,7 @@ static void nlsKinsolJacSumDense(DlsMat mat);

int checkReturnFlag(int flag)
{
int retVal;
int retVal = flag;
switch(flag)
{
case KIN_SUCCESS:
Expand Down Expand Up @@ -599,7 +599,8 @@ void nlsKinsolJacSumDense(DlsMat mat)
int i,j;
double sum;

for(i=0; i<mat->M; ++i,sum=0.0){
for(i=0; i<mat->M; ++i){
sum = 0.0;
for(j=0; j<mat->N;++j){
sum += fabs(DENSE_ELEM(mat,j,i));
}
Expand Down Expand Up @@ -787,7 +788,7 @@ void nlsKinsolFScaling(DATA* data, NLS_KINSOL_DATA *kinsolData, NONLINEAR_SYSTEM
}

static
int nlsKinsolConfigPrint(NLS_KINSOL_DATA *kinsolData, NONLINEAR_SYSTEM_DATA *nlsData)
void nlsKinsolConfigPrint(NLS_KINSOL_DATA *kinsolData, NONLINEAR_SYSTEM_DATA *nlsData)
{
int retValue;
double fNorm;
Expand Down Expand Up @@ -816,8 +817,6 @@ int nlsKinsolConfigPrint(NLS_KINSOL_DATA *kinsolData, NONLINEAR_SYSTEM_DATA *nls
infoStreamPrint(LOG_NLS_V, 0, "KINSOL linear solver %d", kinsolData->linearSolverMethod);

messageClose(LOG_NLS_V);

return retValue;
}

static
Expand Down

0 comments on commit d4122a2

Please sign in to comment.