BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DepthProbeComputation.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Core/Computation/DepthProbeComputation.cpp
6 //! @brief Implements class DepthProbeComputation.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
19 
20 static_assert(std::is_copy_constructible<DepthProbeComputation>::value == false,
21  "DepthProbeComputation should not be copy constructible");
22 static_assert(std::is_copy_assignable<DepthProbeComputation>::value == false,
23  "DepthProbeComputation should not be copy assignable");
24 
26  const SimulationOptions& options,
27  ProgressHandler& progress,
28  DepthProbeElementIter begin_it,
29  DepthProbeElementIter end_it)
30  : IComputation(multilayer, options, progress)
31  , m_begin_it(begin_it)
32  , m_end_it(end_it)
33  , m_computation_term(m_processed_sample.get())
34 {
35 }
36 
38 
40 {
41  if (!m_progress->alive())
42  return;
44  for (auto it = m_begin_it; it != m_end_it; ++it) {
46  }
47 }
Declares class DepthProbeComputation.
Defines class DepthProbeElement.
Defines class MultiLayer.
Defines class ProgressHandler.
void setProgressHandler(ProgressHandler *p_progress)
void compute(DepthProbeElement &elem) const
std::vector< DepthProbeElement >::iterator DepthProbeElementIter
DepthProbeComputationTerm m_computation_term
DepthProbeElementIter m_begin_it
DepthProbeComputation(const MultiLayer &multilayer, const SimulationOptions &options, ProgressHandler &progress, DepthProbeElementIter begin_it, DepthProbeElementIter end_it)
~DepthProbeComputation() override
DepthProbeElementIter m_end_it
Interface for a single-threaded computation with given range of SimulationElements and ProgressHandle...
Definition: IComputation.h:39
ProgressHandler * m_progress
Definition: IComputation.h:52
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:41
Maintains information about progress of a computation.
Collect the different options for simulation.