Skip to content

Commit

Permalink
Simulation return now 1 if simulation is interupted before stopTime i…
Browse files Browse the repository at this point in the history
…s reached.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1621 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Håkan Lundvall committed Mar 24, 2005
1 parent 1109277 commit 4e4b726
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions c_runtime/simulation_runtime.cpp
Expand Up @@ -68,12 +68,13 @@ inline double * initialize_simdata(long numpoints,long nx, long ny)

int main(int argc, char **argv)
{
int status;
double start = 0.0; //default value
double stop = 5;
double step = 0.05;

long info[15];

status = 0;
long ng = 0;
double t;
double tout;
Expand Down Expand Up @@ -130,6 +131,7 @@ int main(int argc, char **argv)
if (idid < 0 ) {
cerr << "Error, simulation stopped at time: " << t << endl;
cerr << "Result written to file." << endl;
status = 1;
}
string * result_file =(string*)getFlagValue("-r",argc,argv);
const char * result_file_cstr;
Expand All @@ -140,7 +142,7 @@ int main(int argc, char **argv)
}
store_result(result_file_cstr,data,actual_points,nx,ny);

return 0;
return status;
}

/* store_result
Expand Down

0 comments on commit 4e4b726

Please sign in to comment.