Skip to content

Commit 873860c

Browse files
author
Willi Braun
committed
- belongs to r19965: adjust also numberOfIntervals
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19975 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent f54776b commit 873860c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

SimulationRuntime/c/simulation/solver/solver_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ int initializeSolverData(DATA* data, SOLVER_INFO* solverInfo)
144144
if ((simInfo->stepSize < MINIMAL_STEP_SIZE) && (simInfo->stopTime > 0)){
145145
warningStreamPrint(LOG_STDOUT, 0, "The step-size %g is too small. Adjust the step-size to %g.", simInfo->stepSize, MINIMAL_STEP_SIZE);
146146
simInfo->stepSize = MINIMAL_STEP_SIZE;
147+
simInfo->numSteps = round((simInfo->stopTime - simInfo->startTime)/simInfo->stepSize);
147148
}
148149

149150
/* initial solverInfo */

0 commit comments

Comments
 (0)