97 |
Integrate the function for the timesteps specified. |
Integrate the function for the timesteps specified. |
98 |
|
|
99 |
This method will throw a runtime_error if integration fails. |
This method will throw a runtime_error if integration fails. |
100 |
|
|
101 |
|
@TODO does simulation.processVarStatus work for integrators like IDA??? |
102 |
*/ |
*/ |
103 |
void |
void |
104 |
Integrator::solve(){ |
Integrator::solve(){ |
115 |
int res; |
int res; |
116 |
res = integrator_solve(blsys, 0, samplelist_length(samplelist)-1); |
res = integrator_solve(blsys, 0, samplelist_length(samplelist)-1); |
117 |
|
|
|
// communicate solver variable status back to the instance tree via 'interface_ptr' |
|
|
simulation.processVarStatus(); |
|
|
|
|
118 |
if(!res){ |
if(!res){ |
119 |
throw runtime_error("Failed integration"); |
throw runtime_error("Failed integration"); |
120 |
} |
} |
121 |
|
|
122 |
|
// communicate solver variable status back to the instance tree via 'interface_ptr' |
123 |
|
simulation.processVarStatus(); |
124 |
} |
} |
125 |
|
|
126 |
void |
void |