Skip to content

Commit

Permalink
- fixed assert handling during event iteration and event handling
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24060 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Willi Braun committed Jan 16, 2015
1 parent 5105359 commit 02da4b2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions SimulationRuntime/c/openmodelica_types.h
Expand Up @@ -109,6 +109,7 @@ typedef enum {
ERROR_INTEGRATOR,
ERROR_NONLINEARSOLVER,
ERROR_EVENTSEARCH,
ERROR_EVENTHANDLING,
ERROR_OPTIMIZE,
ERROR_MAX
} errorStage;
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/c/simulation/solver/perform_simulation.c
Expand Up @@ -205,7 +205,7 @@ int prefixedName_performSimulation(DATA* data, SOLVER_INFO* solverInfo)
eventType = checkEvents(data, solverInfo->eventLst, &(solverInfo->currentTime), solverInfo);
if(eventType > 0) /* event */
{
threadData->currentErrorStage = ERROR_EVENTSEARCH;
threadData->currentErrorStage = ERROR_EVENTHANDLING;
infoStreamPrint(LOG_EVENTS, 1, "%s event at time=%.12g", eventType == 1 ? "time" : "state", solverInfo->currentTime);
/* prevent emit if noEventEmit flag is used */
if (!(omc_flag[FLAG_NOEVENTEMIT])) /* output left limit */
Expand Down
1 change: 1 addition & 0 deletions SimulationRuntime/c/util/omc_error.c
Expand Up @@ -407,6 +407,7 @@ static inline jmp_buf* getBestJumpBuffer(threadData_t *threadData)
#ifndef OMC_EMCC
return threadData->simulationJumpBuffer;
#endif
case ERROR_EVENTHANDLING:
default:
return threadData->globalJumpBuffer;
}
Expand Down

0 comments on commit 02da4b2

Please sign in to comment.