-
Notifications
You must be signed in to change notification settings - Fork 4
runCalculation()
bool Ctrl::runCalculation();Method of the Ctrl class. Gets called when the user starts the calculation. Handles the transfer of user inputs to the Model, begins the calculation, and outputs the results. The return value signals whether or not the calculation was successful.
runCalculation() has three main tasks. Transfer the user inputs from the UI to the Model class, start the actual calculation, and output the results.
In preparation for the calculation an instance of the Model class is created, if it doesn't already exist. The progress bar and the abort flag are reset. All options set by the user are then transferred and stored in the Model class. This way, the calculation can be independent of the GUI.
A data package is then created, containing all results of the calculation.
Finally, if the calculation was successful, the results are displayed to the user. If the calculation failed, then an error message is displayed. If the user toggled any of the auto export options, the output files are now generated.
- 200