Skip to content

Commit 1e5cdab

Browse files
committed
- fix typo
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20045 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 1aaf77d commit 1e5cdab

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

SimulationRuntime/c/simulation/solver/model_help.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ void deInitializeDataStruc(DATA *data)
10271027

10281028
void setZCtol(double relativeTol)
10291029
{
1030-
/* lochel: keep tolZS > 0 */
1030+
/* lochel: force tolZC > 0 */
10311031
tolZC = max(TOL_HYSTERESIS_ZEROCROSSINGS*relativeTol, TOL_HYSTERESIS_ZEROCROSSINGS*MINIMAL_STEP_SIZE);
10321032
infoStreamPrint(LOG_EVENTS_V, 0, "Set tolerance for zero-crossing hysteresis to: %e", tolZC);
10331033
}

SimulationRuntime/c/simulation/solver/solver_main.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ int initializeSolverData(DATA* data, SOLVER_INFO* solverInfo)
158158
solverInfo->sampleEvents = 0;
159159

160160
/* set tolerance for ZeroCrossings */
161-
if (simInfo->stepSize < simInfo->tolerance){
162-
setZCtol(simInfo->stepSize);
163-
} else{
164-
setZCtol(simInfo->tolerance);
165-
}
161+
setZCtol(min(simInfo->stepSize, simInfo->tolerance));
166162

167163
if(solverInfo->solverMethod == 2)
168164
{

0 commit comments

Comments
 (0)