BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SpecularComputation.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Core/Computation/SpecularComputation.h
6 //! @brief Defines class SpecularComputation.
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 
15 #ifndef BORNAGAIN_CORE_COMPUTATION_SPECULARCOMPUTATION_H
16 #define BORNAGAIN_CORE_COMPUTATION_SPECULARCOMPUTATION_H
17 
19 
20 class MultiLayer;
23 
24 //! Performs a single-threaded specular computation with given sample.
25 //!
26 //! Controlled by the multi-threading machinery in Simulation::runSingleSimulation().
27 //!
28 //! @ingroup algorithms_internal
29 
31 {
32  using SpecularElementIter = std::vector<SpecularSimulationElement>::iterator;
33 
34 public:
35  SpecularComputation(const MultiLayer& multilayer, const SimulationOptions& options,
36  ProgressHandler& progress, SpecularElementIter begin_it,
37  SpecularElementIter end_it);
39 
40 private:
41  void runProtected() override;
42 
43  //! these iterators define the span of detector bins this simulation will work on
45  std::unique_ptr<SpecularComputationTerm> m_computation_term;
46 };
47 
48 #endif // BORNAGAIN_CORE_COMPUTATION_SPECULARCOMPUTATION_H
Defines interface IComputation.
Interface for a single-threaded computation with given range of SimulationElements and ProgressHandle...
Definition: IComputation.h:35
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.
Computes the specular scattering.
Performs a single-threaded specular computation with given sample.
SpecularElementIter m_end_it
std::unique_ptr< SpecularComputationTerm > m_computation_term
std::vector< SpecularSimulationElement >::iterator SpecularElementIter
SpecularElementIter m_begin_it
these iterators define the span of detector bins this simulation will work on
void runProtected() override
SpecularComputation(const MultiLayer &multilayer, const SimulationOptions &options, ProgressHandler &progress, SpecularElementIter begin_it, SpecularElementIter end_it)
~SpecularComputation() override
Data stucture containing both input and output of a single image pixel for specular simulation.