Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20762 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed May 22, 2014
1 parent 8c8d6c4 commit 419d793
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 69 deletions.
18 changes: 9 additions & 9 deletions Compiler/Template/CodegenC.tpl
Expand Up @@ -2792,13 +2792,13 @@ template functionAlgebraic(list<list<SimEqSystem>> algebraicEquations, String mo
int <%symbolName(modelNamePrefix,"functionAlgebraics")%>(DATA *data)
{
<%varDecls%>
TRACE_PUSH
data->simulationInfo.discreteCall = 0;
<%if Flags.isSet(Flags.PARMODAUTO) then 'PM_functionAlg(<%nrfuncs%>, data, functionAlg_systems);'
else '<%fncalls%>' %>
TRACE_POP
return 0;
}
Expand All @@ -2819,9 +2819,9 @@ template functionAliasEquation(list<SimEqSystem> removedEquations, String modelN
int functionAliasEquations(DATA *data)
{
<%varDecls%>
TRACE_PUSH
data->simulationInfo.discreteCall = 0;
<%removedPart%>
Expand Down Expand Up @@ -2871,9 +2871,9 @@ template functionDAE(list<SimEqSystem> allEquationsPlusWhen, list<SimWhenClause>
int <%symbolName(modelNamePrefix,"functionDAE")%>(DATA *data)
{
<%varDecls%>
TRACE_PUSH
data->simulationInfo.needToIterate = 0;
data->simulationInfo.discreteCall = 1;
<%if Flags.isSet(Flags.PARMODAUTO) then 'PM_functionDAE(<%nrfuncs%>, data, functionDAE_systems);'
Expand Down Expand Up @@ -2931,7 +2931,7 @@ template functionZeroCrossing(list<ZeroCrossing> zeroCrossings, list<SimEqSystem
int <%symbolName(modelNamePrefix,"function_ZeroCrossingsEquations")%>(DATA *data)
{
<%varDecls%>
TRACE_PUSH
data->simulationInfo.callStatistics.functionZeroCrossingsEquations++;
Expand Down Expand Up @@ -3066,7 +3066,7 @@ template functionRelations(list<ZeroCrossing> relations, String modelNamePrefix)
<%varDecls%>
TRACE_PUSH
if(evalforZeroCross)
{
<%relationsCode%>
Expand Down
2 changes: 1 addition & 1 deletion SimulationRuntime/c/simulation/simulation_runtime.cpp
Expand Up @@ -215,7 +215,7 @@ void setGlobalVerboseLevel(int argc, char**argv)
/* print LOG_STATS if LOG_SOLVER if active */
if(useStream[LOG_SOLVER] == 1)
useStream[LOG_STATS] = 1;

/* print LOG_STATS if LOG_STATS_V if active */
if(useStream[LOG_STATS_V] == 1)
useStream[LOG_STATS] = 1;
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/c/simulation/solver/dassl.c
Expand Up @@ -270,9 +270,9 @@ int dassl_step(DATA* simData, SOLVER_INFO* solverInfo)
modelica_real* stateDer = sDataOld->realVars + simData->modelData.nStates;
dasslData->rpar[0] = (double*) (void*) simData;
dasslData->rpar[1] = (double*) (void*) dasslData;

TRACE_PUSH

assertStreamPrint(simData->threadData, 0 != dasslData->rpar, "could not passed to DDASKR");

/* If an event is triggered and processed restart dassl. */
Expand Down
32 changes: 16 additions & 16 deletions SimulationRuntime/c/simulation/solver/events.c
Expand Up @@ -91,7 +91,7 @@ void initSample(DATA* data, double startTime, double stopTime)
} else {
debugStreamPrint(LOG_EVENTS, 0, "first sample-event at t = %g", data->simulationInfo.nextSampleEvent);
}

TRACE_POP
}

Expand All @@ -112,14 +112,14 @@ void checkForSampleEvent(DATA *data, SOLVER_INFO* solverInfo)
double nextTimeStep = solverInfo->currentTime + solverInfo->currentStepSize;

TRACE_PUSH

if ((data->simulationInfo.nextSampleEvent <= nextTimeStep + SAMPLE_EPS) && (data->simulationInfo.nextSampleEvent >= solverInfo->currentTime))
{
solverInfo->currentStepSize = data->simulationInfo.nextSampleEvent - solverInfo->currentTime;
data->simulationInfo.sampleActivated = 1;
infoStreamPrint(LOG_EVENTS_V, 0, "Adjust step-size to %.15g at time %.15g to get next sample event at %.15g", solverInfo->currentStepSize, solverInfo->currentTime, data->simulationInfo.nextSampleEvent );
}

TRACE_POP
}

Expand All @@ -137,7 +137,7 @@ int checkForStateEvent(DATA* data, LIST *eventList)
long i=0;

TRACE_PUSH

debugStreamPrint(LOG_EVENTS, 1, "check state-event zerocrossing at time %g", data->localData[0]->timeValue);

for(i=0; i<data->modelData.nZeroCrossings; i++)
Expand Down Expand Up @@ -167,7 +167,7 @@ int checkForStateEvent(DATA* data, LIST *eventList)
TRACE_POP
return 1;
}

TRACE_POP
return 0;
}
Expand All @@ -189,7 +189,7 @@ int checkForStateEvent(DATA* data, LIST *eventList)
int checkEvents(DATA* data, LIST* eventLst, double *eventTime, SOLVER_INFO* solverInfo)
{
TRACE_PUSH

if (checkForStateEvent(data, solverInfo->eventLst))
{
if (!solverInfo->solverRootFinding)
Expand Down Expand Up @@ -314,7 +314,7 @@ void handleEvents(DATA* data, LIST* eventLst, double *eventTime, SOLVER_INFO* so

solverInfo->sampleEvents++;
}

TRACE_POP
}

Expand All @@ -340,7 +340,7 @@ void findRoot(DATA* data, LIST *eventList, double *eventTime)
double time_right = data->localData[0]->timeValue;

TRACE_PUSH

tmpEventList = allocList(sizeof(long));

assert(states_right);
Expand Down Expand Up @@ -420,7 +420,7 @@ void findRoot(DATA* data, LIST *eventList, double *eventTime)

free(states_left);
free(states_right);

TRACE_POP
}

Expand All @@ -445,9 +445,9 @@ double bisection(DATA* data, double* a, double* b, double* states_a, double* sta
long i=0;

double *backup_gout = (double*) malloc(data->modelData.nZeroCrossings * sizeof(double));

TRACE_PUSH

assert(backup_gout);

for(i=0; i < data->modelData.nZeroCrossings; i++)
Expand Down Expand Up @@ -514,7 +514,7 @@ double bisection(DATA* data, double* a, double* b, double* states_a, double* sta
}
free(backup_gout);
c = (*a + *b) / 2.0;

TRACE_POP
return c;
}
Expand All @@ -531,7 +531,7 @@ double bisection(DATA* data, double* a, double* b, double* states_a, double* sta
int checkZeroCrossings(DATA *data, LIST *tmpEventList, LIST *eventList)
{
LIST_NODE *it;

TRACE_PUSH

listClear(tmpEventList);
Expand All @@ -558,7 +558,7 @@ int checkZeroCrossings(DATA *data, LIST *tmpEventList, LIST *eventList)
TRACE_POP
return 1; /* event in left section */
}

TRACE_POP
return 0; /* event in right section */
}
Expand All @@ -574,13 +574,13 @@ void saveZeroCrossingsAfterEvent(DATA *data)
long i=0;

TRACE_PUSH

infoStreamPrint(LOG_ZEROCROSSINGS, 0, "save all zerocrossings after an event"); /* ??? */

data->callback->function_ZeroCrossings(data, data->simulationInfo.zeroCrossings);
for(i=0; i<data->modelData.nZeroCrossings; i++)
data->simulationInfo.zeroCrossingsPre[i] = data->simulationInfo.zeroCrossings[i];

TRACE_POP
}

Expand Down

0 comments on commit 419d793

Please sign in to comment.