Skip to content

Commit

Permalink
Sanity check for external objects (#11409)
Browse files Browse the repository at this point in the history
* Sanity check for external objects

  - Print warning if external object is NULL after initialization
  • Loading branch information
AnHeuermann committed Oct 20, 2023
1 parent 3dcd8a0 commit 096dd04
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -793,6 +793,14 @@ int initialization(DATA *data, threadData_t *threadData, const char* pInitMethod
throwStreamPrint(threadData, "unsupported option -iim");
}

/* External object sanity check
* At this point all external objects should be initialized (bound parameters or initial system) */
for(int i=0; i<data->modelData->nExtObjs; i++) {
if (data->simulationInfo->extObjs[i] == NULL) {
warningStreamPrint(LOG_STDOUT, 0, "External object %i is NULL, did a external constructor fail?", i);
}
}

/* check for unsolved (nonlinear|linear|mixed) systems
* This is a workaround and should be removed as soon as possible.
*/
Expand Down

0 comments on commit 096dd04

Please sign in to comment.