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 specular computation with given sample.
Controlled by the multi-threading machinery in ISimulation::runSingleSimulation().
Definition at line 32 of file SpecularComputation.h.
Public Member Functions | |
SpecularComputation (const reSample &re_sample, const SimulationOptions &options, ProgressHandler &progress, SpecularElementIter begin_it, SpecularElementIter end_it) | |
~SpecularComputation () 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 | SpecularElementIter = std::vector< SpecularElement >::iterator |
Private Member Functions | |
void | runProtected () override |
Runs computation. May throw. To be called from run(), which catches exceptions. More... | |
Private Attributes | |
const SpecularElementIter | m_begin_it |
these iterators define the span of detector bins this simulation will work on More... | |
const SpecularElementIter | m_end_it |
std::unique_ptr< DelayedProgressCounter > | m_progress_counter |
|
private |
Definition at line 33 of file SpecularComputation.h.
SpecularComputation::SpecularComputation | ( | const reSample & | re_sample, |
const SimulationOptions & | options, | ||
ProgressHandler & | progress, | ||
SpecularElementIter | begin_it, | ||
SpecularElementIter | end_it | ||
) |
Definition at line 23 of file SpecularComputation.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 35 of file SpecularComputation.cpp.
References PolMatrices::analyzerMatrix(), reSample::averageSlices(), SpecularElement::isCalculated(), m_begin_it, m_end_it, IComputation::m_re_sample, PolMatrices::polarizerMatrix(), reSample::polarizing(), IElement::polMatrices(), SpecularElement::produceKz(), TMath::R(), SpecularElement::setIntensity(), IComputation::stepProgress(), Compute::SpecularScalar::topLayerR(), and Compute::SpecularMagnetic::topLayerR().
|
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(), DWBAComputation::runProtected(), and runProtected().
|
private |
these iterators define the span of detector bins this simulation will work on
Definition at line 45 of file SpecularComputation.h.
Referenced by runProtected().
|
private |
Definition at line 45 of file SpecularComputation.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 DepthProbeComputation::runProtected(), DWBAComputation::runProtected(), and runProtected().
|
protectedinherited |
Definition at line 56 of file IComputation.h.
Referenced by IComputation::compute(), IComputation::errorMessage(), and IComputation::isCompleted().