BornAgain  1.18.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 scattering at grazing incidence
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), m_begin_it(begin_it), m_end_it(end_it),
31  m_computation_term(mP_processed_sample.get())
32 {
33 }
34 
36 
38 {
39  if (!mp_progress->alive())
40  return;
42  for (auto it = m_begin_it; it != m_end_it; ++it) {
44  }
45 }
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:35
ProgressHandler * mp_progress
Definition: IComputation.h:48
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:42
Maintains information about progress of a computation.
Collect the different options for simulation.