Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit dc49b6e

Browse files
ptaeuberOpenModelica-Hudson
authored andcommitted
Initialization and simulation success messages on stdout
ticket:4486
1 parent e988ea4 commit dc49b6e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

SimulationRuntime/c/simulation/solver/initialization/initialization.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
200200
if (data->callback->useHomotopy == 0 || init_lambda_steps < 2){
201201
data->simulationInfo->lambda = 1.0;
202202
data->callback->functionInitialEquations(data, threadData);
203+
infoStreamPrint(LOG_STDOUT, 0, "The initialization finished successfully without homotopy method.");
203204

204205
/* If there is homotopy in the model and global homotopy is activated
205206
and homotopy on first try is deactivated,
@@ -214,14 +215,14 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
214215
infoStreamPrint(LOG_INIT, 0, "Try to solve the initialization problem without homotopy first.");
215216
data->callback->functionInitialEquations(data, threadData);
216217
init_lambda_steps = 0;
217-
infoStreamPrint(LOG_INIT, 0, "Initialization finished without homotopy.");
218+
infoStreamPrint(LOG_STDOUT, 0, "The initialization finished successfully without homotopy method.");
218219

219220
/* catch */
220221
#ifndef OMC_EMCC
221222
MMC_CATCH_INTERNAL(simulationJumpBuffer)
222223
#endif
223224
if(init_lambda_steps > 0)
224-
warningStreamPrint(LOG_ASSERT, 0, "Failed to solve the initial system without homotopy. If homotopy is available the homotopy method is now used.");
225+
warningStreamPrint(LOG_ASSERT, 0, "Failed to solve the initial system without homotopy method. If homotopy is available the homotopy method is used now.");
225226
}
226227

227228
/* If there is homotopy in the model and global homotopy is activated
@@ -276,6 +277,7 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
276277
check_mixed_solutions(data, 0))
277278
break;
278279
}
280+
infoStreamPrint(LOG_STDOUT, 0, "The initialization finished successfully with homotopy method.");
279281
messageClose(LOG_INIT);
280282
}
281283

SimulationRuntime/c/simulation/solver/solver_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ int solver_main(DATA* data, threadData_t *threadData, const char* init_initMetho
789789
{
790790
freeSolverData(data, &solverInfo);
791791
}
792+
infoStreamPrint(LOG_STDOUT, 0, "The simulation finished successfully.");
792793

793794
TRACE_POP
794795
return retVal;

0 commit comments

Comments
 (0)