Changeset 20780


Ignore:
Timestamp:
2014-05-23T09:52:40+02:00 (10 years ago)
Author:
lochel
Message:
  • remove unnecessary if(ACTIVE_STREAM(..)) statements
Location:
trunk/SimulationRuntime/c
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/SimulationRuntime/c/optimization/DataManagement/MoveData.c

    r20645 r20780  
    5050 * author: Vitalij Ruge
    5151 */
    52 int pickUpModelData(DATA* data, SOLVER_INFO* solverInfo){
     52int pickUpModelData(DATA* data, SOLVER_INFO* solverInfo)
     53{
    5354  const int nReal = data->modelData.nVariablesReal;
    5455  int i, j;
  • trunk/SimulationRuntime/c/simulation/simulation_input_xml.cpp

    r19410 r20780  
    398398  read_value(mi.md["OPENMODELICAHOME"], &simulationInfo->OPENMODELICAHOME);
    399399  infoStreamPrint(LOG_SIMULATION, 0, "OPENMODELICAHOME: %s", simulationInfo->OPENMODELICAHOME);
    400   if (ACTIVE_STREAM(LOG_SIMULATION)) messageClose(LOG_SIMULATION);
     400  messageClose(LOG_SIMULATION);
    401401
    402402  modelica_integer nxchk, nychk, npchk;
     
    428428    || nystrchk != modelData->nVariablesString)
    429429  {
    430     if (ACTIVE_WARNING_STREAM(LOG_SIMULATION)) {
     430    if (ACTIVE_WARNING_STREAM(LOG_SIMULATION))
     431    {
    431432      warningStreamPrint(LOG_SIMULATION, 1, "Error, input data file does not match model.");
    432433      warningStreamPrint(LOG_SIMULATION, 0, "nx in setup file: %ld from model code: %d", nxchk, (int)modelData->nStates);
     
    466467    debugStreamPrint(LOG_DEBUG, 0, "real %s: mapAlias[%s] = %ld", debugName, info.name, j); \
    467468  } \
    468   if (ACTIVE_STREAM(LOG_DEBUG)) messageClose(LOG_DEBUG);
     469  messageClose(LOG_DEBUG);
    469470
    470471  READ_VARIABLES(modelData->realVarsData,mi.rSta,REAL_ATTRIBUTE,"real states",0,modelData->nStates,mapAlias);
     
    529530                modelData->realAlias[i].aliasType ? ((modelData->realAlias[i].aliasType==2) ? "time" : "real parameters") : "real variables");
    530531  }
    531   if (ACTIVE_STREAM(LOG_DEBUG)) messageClose(LOG_DEBUG);
     532  messageClose(LOG_DEBUG);
    532533
    533534  /*
     
    577578                modelData->integerAlias[i].aliasType?"integer parameters":"integer variables");
    578579  }
    579   if (ACTIVE_STREAM(LOG_DEBUG)) messageClose(LOG_DEBUG);
     580  messageClose(LOG_DEBUG);
    580581
    581582  /*
     
    625626                modelData->booleanAlias[i].aliasType ? "boolean parameters" : "boolean variables");
    626627  }
    627   if (ACTIVE_STREAM(LOG_DEBUG)) messageClose(LOG_DEBUG);
     628  messageClose(LOG_DEBUG);
    628629
    629630  /*
     
    673674                modelData->stringAlias[i].aliasType ? "string parameters" : "string variables");
    674675  }
    675   if (ACTIVE_STREAM(LOG_DEBUG)) messageClose(LOG_DEBUG);
     676  messageClose(LOG_DEBUG);
    676677
    677678  XML_ParserFree(parser);
  • trunk/SimulationRuntime/c/simulation/solver/events.c

    r20762 r20780  
    384384  listClear(eventList);
    385385
    386   if(ACTIVE_STREAM(LOG_EVENTS)) {
    387     if(listLen(tmpEventList) > 0) {
     386  if(ACTIVE_STREAM(LOG_EVENTS))
     387  {
     388    if(listLen(tmpEventList) > 0)
     389    {
    388390      debugStreamPrint(LOG_EVENTS, 0, "found events: ");
    389     } else {
     391    }
     392    else
     393    {
    390394      debugStreamPrint(LOG_EVENTS, 0, "found event: ");
    391395    }
    392396  }
    393   while(listLen(tmpEventList) > 0) {
     397  while(listLen(tmpEventList) > 0)
     398  {
    394399    event_id = *((long*)listFirstData(tmpEventList));
    395400    listPopFront(tmpEventList);
  • trunk/SimulationRuntime/c/simulation/solver/external_input.c

    r20561 r20780  
    103103    }
    104104
    105     if(ACTIVE_STREAM(LOG_SIMULATION)){
     105    if(ACTIVE_STREAM(LOG_SIMULATION))
     106    {
    106107      printf("\nExternal Input");
    107108      printf("\n========================================================");
  • trunk/SimulationRuntime/c/simulation/solver/initialization/initialization.c

    r20766 r20780  
    7474  if(1e-5 < funcValue)
    7575  {
    76     if (ACTIVE_STREAM(LOG_INIT)) {
     76    if (ACTIVE_STREAM(LOG_INIT))
     77    {
    7778      infoStreamPrint(LOG_INIT, 1, "error in initialization. System of initial equations are not consistent\n(least square function value is %g)", funcValue);
    7879      for(i=0; i<initData->nInitResiduals; i++) {
     
    595596  dumpInitialization(data,initData);
    596597  retVal = reportResidualValue(initData);
    597   if (ACTIVE_STREAM(LOG_INIT)) messageClose(LOG_INIT);
     598  messageClose(LOG_INIT);
    598599  freeInitData(initData);
    599600
  • trunk/SimulationRuntime/c/simulation/solver/initialization/method_ipopt.c

    r20143 r20780  
    216216         */
    217217        infoStreamPrint(LOG_INIT, 0, "ipopt using symbolic sparse jacobian G");
    218         if(ACTIVE_STREAM(LOG_INIT)) {
     218        if(ACTIVE_STREAM(LOG_INIT))
     219        {
    219220          infoStreamPrint(LOG_INIT, 0, "sparsity pattern");
    220221          for(i=0; i<n; ++i) {
  • trunk/SimulationRuntime/c/simulation/solver/kinsolSolver.c

    r20310 r20780  
    260260    infoStreamPrint(LOG_NLS, 0, "KINDlsGetNumJacEvals     = %5ld", nje);
    261261    infoStreamPrint(LOG_NLS, 0, "KINDlsGetNumFuncEvals    = %5ld", nfeD);
    262     if (ACTIVE_STREAM(LOG_NLS)) messageClose(LOG_NLS);
     262    messageClose(LOG_NLS);
    263263
    264264    /* free memory */
  • trunk/SimulationRuntime/c/simulation/solver/mixedSearchSolver.c

    r20635 r20780  
    303303  }while(!found_solution);
    304304
    305   if(ACTIVE_STREAM(LOG_NLS)) messageClose(LOG_NLS);
     305  messageClose(LOG_NLS);
    306306  debugStreamPrint(LOG_NLS, 0, "####  Finished mixed equation system in steps %d.\n", stepCount);
    307307  return success;
  • trunk/SimulationRuntime/c/simulation/solver/nonlinearSolverNewton.c

    r20635 r20780  
    381381  }
    382382
    383   if (ACTIVE_STREAM(LOG_NLS)) messageClose(LOG_NLS);
     383  messageClose(LOG_NLS);
    384384
    385385  return success;
  • trunk/SimulationRuntime/c/simulation/solver/perform_simulation.c

    r20762 r20780  
    195195
    196196      saveZeroCrossings(data);
    197       if (ACTIVE_STREAM(LOG_SOLVER)) messageClose(LOG_SOLVER);
     197      messageClose(LOG_SOLVER);
    198198
    199199
     
    210210          sim_result.emit(&sim_result,data);
    211211        handleEvents(data, solverInfo->eventLst, &(solverInfo->currentTime), solverInfo);
    212         if (ACTIVE_STREAM(LOG_EVENTS)) messageClose(LOG_EVENTS);
     212        messageClose(LOG_EVENTS);
    213213        threadData->currentErrorStage = ERROR_SIMULATION;
    214214
  • trunk/SimulationRuntime/c/simulation/solver/stateset.c

    r20143 r20780  
    281281        infoStreamPrint(LOG_DSS, 1, "select new states at time %f", data->localData[0]->timeValue);
    282282        setAMatrix(newEnable, nCandidates, nStates, A, states, statecandidates, data);
    283         if (ACTIVE_STREAM(LOG_DSS)) messageClose(LOG_DSS);
     283        messageClose(LOG_DSS);
    284284      }
    285285      ret = -1;
Note: See TracChangeset for help on using the changeset viewer.