93 |
|
|
94 |
Integrate the function for the timesteps specified. |
Integrate the function for the timesteps specified. |
95 |
|
|
96 |
This method will throw a runtime_error if integration fails. |
Method will throw a runtime_error if integrator_solve returns error (non zero) |
97 |
|
|
98 |
@TODO does simulation.processVarStatus work for integrators like IDA??? |
@TODO does simulation.processVarStatus work for integrators like IDA??? |
99 |
*/ |
*/ |
112 |
int res; |
int res; |
113 |
res = integrator_solve(blsys, 0, samplelist_length(samplelist)-1); |
res = integrator_solve(blsys, 0, samplelist_length(samplelist)-1); |
114 |
|
|
115 |
if(!res){ |
if(res){ |
116 |
throw runtime_error("Failed integration"); |
stringstream ss; |
117 |
|
ss << "Failed integration (integrator_solve returned " << res << ")"; |
118 |
|
throw runtime_error(ss.str()); |
119 |
} |
} |
120 |
|
|
121 |
// communicate solver variable status back to the instance tree via 'interface_ptr' |
// communicate solver variable status back to the instance tree via 'interface_ptr' |