BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Provides function that performs a single-threaded DWBA computation for a range of DiffuseElements.
Handles progress counter and interrupts, runs loop over DiffuseElements, delegates all further work to DWBATerm.
Controlled by the multi-threading machinery in ISimulation::runSingleSimulation().
Definition at line 41 of file DWBAComputation.h.
Public Member Functions | |
DWBAComputation (const reSample &re_sample, const SimulationOptions &options, ProgressHandler &progress, std::vector< std::unique_ptr< DiffuseElement >>::iterator begin_it, std::vector< std::unique_ptr< DiffuseElement >>::iterator end_it) | |
~DWBAComputation () override | |
void | compute () |
Calls runProtected(), catches exceptions, sets m_status. More... | |
std::string | errorMessage () const |
bool | isCompleted () const |
Protected Member Functions | |
void | setProgressHandler (ProgressHandler *progress) const |
void | stepProgress () const |
Protected Attributes | |
const SimulationOptions & | m_options |
ProgressHandler * | m_progress |
const reSample & | m_re_sample |
ComputationStatus | m_status |
Private Member Functions | |
void | runProtected () override |
Performs a single-threaded DWBA computation for a DiffuseElements in range m_begin_it ... m_end_it. Results are stored in those elements. More... | |
Private Attributes | |
std::vector< std::unique_ptr< DiffuseElement > >::iterator | m_begin_it |
std::vector< std::unique_ptr< DiffuseElement > >::iterator | m_end_it |
const std::vector< std::unique_ptr< const ParticleLayoutContribution > > | m_layout_contribs |
std::unique_ptr< DelayedProgressCounter > | m_progress_counter |
const std::unique_ptr< const RoughMultiLayerContribution > | m_roughness_contrib |
const std::unique_ptr< const GISASSpecularContribution > | m_specular_contrib |
DWBAComputation::DWBAComputation | ( | const reSample & | re_sample, |
const SimulationOptions & | options, | ||
ProgressHandler & | progress, | ||
std::vector< std::unique_ptr< DiffuseElement >>::iterator | begin_it, | ||
std::vector< std::unique_ptr< DiffuseElement >>::iterator | end_it | ||
) |
Definition at line 44 of file DWBAComputation.cpp.
|
overridedefault |
|
inherited |
Calls runProtected(), catches exceptions, sets m_status.
Definition at line 41 of file IComputation.cpp.
References ProgressHandler::alive(), IComputation::m_progress, IComputation::m_status, IComputation::runProtected(), ComputationStatus::setCompleted(), ComputationStatus::setFailed(), IComputation::setProgressHandler(), and ComputationStatus::setRunning().
|
inlineinherited |
Definition at line 47 of file IComputation.h.
References ComputationStatus::errorMessage(), and IComputation::m_status.
|
inlineinherited |
Definition at line 46 of file IComputation.h.
References ComputationStatus::isCompleted(), and IComputation::m_status.
|
overrideprivatevirtual |
Performs a single-threaded DWBA computation for a DiffuseElements in range m_begin_it ... m_end_it. Results are stored in those elements.
Implements IComputation.
Definition at line 66 of file DWBAComputation.cpp.
References ProgressHandler::alive(), reSample::fluxesIn(), reSample::fluxesOut(), m_begin_it, m_end_it, m_layout_contribs, IComputation::m_progress, IComputation::m_re_sample, m_roughness_contrib, m_specular_contrib, and IComputation::stepProgress().
|
protectedinherited |
Definition at line 30 of file IComputation.cpp.
References IComputation::m_progress_counter.
Referenced by IComputation::compute().
|
protectedinherited |
Definition at line 35 of file IComputation.cpp.
References IComputation::m_progress_counter.
Referenced by DepthProbeComputation::runProtected(), runProtected(), and SpecularComputation::runProtected().
|
private |
Definition at line 54 of file DWBAComputation.h.
Referenced by runProtected().
|
private |
Definition at line 54 of file DWBAComputation.h.
Referenced by runProtected().
|
private |
Definition at line 57 of file DWBAComputation.h.
Referenced by runProtected().
|
protectedinherited |
Definition at line 54 of file IComputation.h.
|
protectedinherited |
Definition at line 55 of file IComputation.h.
Referenced by IComputation::compute(), and runProtected().
|
mutableprivateinherited |
Definition at line 62 of file IComputation.h.
Referenced by IComputation::setProgressHandler(), and IComputation::stepProgress().
|
protectedinherited |
Definition at line 53 of file IComputation.h.
Referenced by DepthProbeComputation::runProtected(), runProtected(), and SpecularComputation::runProtected().
|
private |
Definition at line 56 of file DWBAComputation.h.
Referenced by runProtected().
|
private |
Definition at line 55 of file DWBAComputation.h.
Referenced by runProtected().
|
protectedinherited |
Definition at line 56 of file IComputation.h.
Referenced by IComputation::compute(), IComputation::errorMessage(), and IComputation::isCompleted().