16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_SIM_COMPUTATION_ICOMPUTATION_H
21 #define BORNAGAIN_SIM_COMPUTATION_ICOMPUTATION_H
Defines and implements interface class ComputationStatus.
Completion status (flag and text) of a numeric computation.
std::string errorMessage() const
Counter for reporting progress (with delay interval) in a threaded computation.
Interface for a single-threaded computation with given range of DiffuseElements and ProgressHandler.
const SimulationOptions & m_options
ProgressHandler * m_progress
const reSample & m_re_sample
IComputation(const reSample &re_sample, const SimulationOptions &options, ProgressHandler &progress)
std::unique_ptr< DelayedProgressCounter > m_progress_counter
void setProgressHandler(ProgressHandler *progress) const
virtual void runProtected()=0
Runs computation. May throw. To be called from run(), which catches exceptions.
void compute()
Calls runProtected(), catches exceptions, sets m_status.
ComputationStatus m_status
std::string errorMessage() const
void stepProgress() const
Our sample model: a stack of layers one below the other.
Maintains information about progress of a computation.
Collect the different options for simulation.SimulationOptions.
Data structure that contains all the necessary data for scattering calculations.