BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Performs a single-threaded depth probe computation with given sample.
Controlled by the multi-threading machinery in ISimulation::runSingleSimulation().
Definition at line 33 of file DepthProbeComputation.h.
Public Member Functions | |
DepthProbeComputation (const reSample &re_sample, const SimulationOptions &options, ProgressHandler &progress, DepthProbeElementIter begin_it, DepthProbeElementIter end_it) | |
~DepthProbeComputation () 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 Types | |
using | DepthProbeElementIter = std::vector< DepthProbeElement >::iterator |
Private Member Functions | |
void | runProtected () override |
Runs computation. May throw. To be called from run(), which catches exceptions. More... | |
Private Attributes | |
DepthProbeElementIter | m_begin_it |
DepthProbeElementIter | m_end_it |
std::unique_ptr< DelayedProgressCounter > | m_progress_counter |
|
private |
Definition at line 34 of file DepthProbeComputation.h.
DepthProbeComputation::DepthProbeComputation | ( | const reSample & | re_sample, |
const SimulationOptions & | options, | ||
ProgressHandler & | progress, | ||
DepthProbeElementIter | begin_it, | ||
DepthProbeElementIter | end_it | ||
) |
Definition at line 23 of file DepthProbeComputation.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 |
Runs computation. May throw. To be called from run(), which catches exceptions.
Implements IComputation.
Definition at line 36 of file DepthProbeComputation.cpp.
References ASSERT, Compute::SpecularMagnetic::fluxes(), reSample::fluxesIn(), DepthProbeElement::getKi(), DepthProbeElement::getZPositions(), DepthProbeElement::isCalculated(), m_begin_it, m_end_it, IComputation::m_re_sample, reSample::numberOfSlices(), TMath::R(), DepthProbeElement::setIntensities(), IAxis::size(), reSample::sliceBottomZ(), reSample::sliceTopZ(), 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 runProtected(), DWBAComputation::runProtected(), and SpecularComputation::runProtected().
|
private |
Definition at line 45 of file DepthProbeComputation.h.
Referenced by runProtected().
|
private |
Definition at line 45 of file DepthProbeComputation.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 DWBAComputation::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 runProtected(), DWBAComputation::runProtected(), and SpecularComputation::runProtected().
|
protectedinherited |
Definition at line 56 of file IComputation.h.
Referenced by IComputation::compute(), IComputation::errorMessage(), and IComputation::isCompleted().