BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
SpecularComputation.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sim/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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SIM_COMPUTATION_SPECULARCOMPUTATION_H
21 #define BORNAGAIN_SIM_COMPUTATION_SPECULARCOMPUTATION_H
22 
24 #include <vector>
25 
26 class SpecularElement;
27 
28 //! Performs a single-threaded specular computation with given sample.
29 //!
30 //! Controlled by the multi-threading machinery in ISimulation::runSingleSimulation().
31 
33  using SpecularElementIter = std::vector<SpecularElement>::iterator;
34 
35 public:
36  SpecularComputation(const reSample& re_sample, const SimulationOptions& options,
37  ProgressHandler& progress, SpecularElementIter begin_it,
38  SpecularElementIter end_it);
40 
41 private:
42  void runProtected() override;
43 
44  //! these iterators define the span of detector bins this simulation will work on
46 };
47 
48 #endif // BORNAGAIN_SIM_COMPUTATION_SPECULARCOMPUTATION_H
49 #endif // USER_API
Defines interface IComputation.
Interface for a single-threaded computation with given range of DiffuseElements and ProgressHandler.
Definition: IComputation.h:37
Maintains information about progress of a computation.
Collect the different options for simulation.SimulationOptions.
Performs a single-threaded specular computation with given sample.
SpecularComputation(const reSample &re_sample, const SimulationOptions &options, ProgressHandler &progress, SpecularElementIter begin_it, SpecularElementIter end_it)
std::vector< SpecularElement >::iterator SpecularElementIter
void runProtected() override
Runs computation. May throw. To be called from run(), which catches exceptions.
const SpecularElementIter m_begin_it
these iterators define the span of detector bins this simulation will work on
const SpecularElementIter m_end_it
~SpecularComputation() override
Data stucture containing both input and output of a single image pixel for specular simulation.
Data structure that contains all the necessary data for scattering calculations.
Definition: ReSample.h:41