BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Interface for a single-threaded computation with given range of SimulationElements and ProgressHandler. More...
Public Member Functions | |
IComputation (const MultiLayer &sample, const SimulationOptions &options, ProgressHandler &progress, bool forcePolarized=false) | |
virtual | ~IComputation () |
std::string | errorMessage () const |
bool | isCompleted () const |
void | run () |
Protected Attributes | |
std::unique_ptr< ProcessedSample > | m_processed_sample |
ProgressHandler * | m_progress |
SimulationOptions | m_sim_options |
ComputationStatus | m_status |
Private Member Functions | |
virtual void | runProtected ()=0 |
Interface for a single-threaded computation with given range of SimulationElements and ProgressHandler.
Controlled by the multi-threading machinery in ISimulation::runSingleSimulation().
Definition at line 39 of file IComputation.h.
IComputation::IComputation | ( | const MultiLayer & | sample, |
const SimulationOptions & | options, | ||
ProgressHandler & | progress, | ||
bool | forcePolarized = false |
||
) |
Definition at line 21 of file IComputation.cpp.
|
virtualdefault |
|
inline |
Definition at line 48 of file IComputation.h.
References ComputationStatus::errorMessage(), and m_status.
|
inline |
Definition at line 47 of file IComputation.h.
References ComputationStatus::isCompleted(), and m_status.
void IComputation::run | ( | ) |
Definition at line 31 of file IComputation.cpp.
References m_status, runProtected(), ComputationStatus::setCompleted(), ComputationStatus::setFailed(), and ComputationStatus::setRunning().
|
privatepure virtual |
Implemented in SpecularComputation, DWBAComputation, and DepthProbeComputation.
Referenced by run().
|
protected |
Definition at line 54 of file IComputation.h.
Referenced by DWBAComputation::DWBAComputation(), SpecularComputation::SpecularComputation(), and SpecularComputation::runProtected().
|
protected |
Definition at line 52 of file IComputation.h.
Referenced by DepthProbeComputation::runProtected(), DWBAComputation::runProtected(), and SpecularComputation::runProtected().
|
protected |
Definition at line 51 of file IComputation.h.
Referenced by DWBAComputation::DWBAComputation().
|
protected |
Definition at line 53 of file IComputation.h.
Referenced by errorMessage(), isCompleted(), and run().