Skip to content

Commit

Permalink
- OpenTurns updates.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11321 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Mar 7, 2012
1 parent 3ea6b29 commit 666585e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions SimulationRuntime/OpenTurns/model_name.h
@@ -0,0 +1 @@
#define MODELNAME Model
9 changes: 6 additions & 3 deletions SimulationRuntime/OpenTurns/wrapper.c
Expand Up @@ -85,6 +85,7 @@
/* The name of the wrapper's functions is defined in WRAPPERNAME macro */
/* adrpo: the wrapper name is given by a generated .h file */
#include "wrapper_name.h"
#include "model_name.h"

/*
* This is the declaration of function named 'OpenModelica' into the wrapper.
Expand Down Expand Up @@ -189,7 +190,8 @@ extern "C" {
char systemCommand[5000] = NULL;
char *variableName = NULL;
unsigned long variableType = 0;
char *modelName = NULL;
/* read the model name from the included model_name.h file */
char *modelName = MODELNAME;
char *modelInitFileName = NULL;
char *newModelInitFileName = "OpenTurns_init.xml";
char *errorMsg = 0;
Expand All @@ -198,8 +200,9 @@ extern "C" {
struct WrapperVariableList *varLst = pData->variableList_;
ModelicaMatReader* matReader = NULL;

/* read the model name from the generated .xml file, from <Path>...</Path> */
modelName =

modelInitFileName = (char*)malloc(strlen(modelName)+strlen("_init.xml")+1);
sprintf(modelInitFileName, "%s_init.xml", modelName);

if (!openModelicaHome)
{
Expand Down

0 comments on commit 666585e

Please sign in to comment.