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

Commit

Permalink
fix daeMode=all by skipping algebraic evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Sep 25, 2017
1 parent e8dfd70 commit 57f1d1a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions SimulationRuntime/c/simulation/solver/perform_simulation.c
Expand Up @@ -67,9 +67,21 @@ static void prefixedName_updateContinuousSystem(DATA *data, threadData_t *thread

externalInputUpdate(data);
data->callback->input_function(data, threadData);
if (!omc_flag[FLAG_DAE_MODE])

if (omc_flag[FLAG_DAE_MODE]) /* dae mode */
{
/* in all mode = 1 (all) nothing to do */
/* in mode = 2 (dynamic) we need to update the algebraic part */
if (compiledInDAEMode == 2)
{
data->callback->functionAlgebraics(data, threadData);
}
}
else /* ode mode */
{
data->callback->functionODE(data, threadData);
data->callback->functionAlgebraics(data, threadData);
data->callback->functionAlgebraics(data, threadData);
}
data->callback->output_function(data, threadData);
data->callback->function_storeDelayed(data, threadData);
storePreValues(data);
Expand Down

0 comments on commit 57f1d1a

Please sign in to comment.