BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
DepthProbeComputation.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sim/Computation/DepthProbeComputation.h
6 //! @brief Declares 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 
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_DEPTHPROBECOMPUTATION_H
21 #define BORNAGAIN_SIM_COMPUTATION_DEPTHPROBECOMPUTATION_H
22 
24 #include <vector>
25 
26 class DepthProbeElement;
27 class reSample;
28 
29 //! Performs a single-threaded depth probe computation with given sample.
30 //!
31 //! Controlled by the multi-threading machinery in ISimulation::runSingleSimulation().
32 
34  using DepthProbeElementIter = std::vector<DepthProbeElement>::iterator;
35 
36 public:
37  DepthProbeComputation(const reSample& re_sample, const SimulationOptions& options,
38  ProgressHandler& progress, DepthProbeElementIter begin_it,
39  DepthProbeElementIter end_it);
41 
42 private:
43  void runProtected() override;
44 
46 };
47 
48 #endif // BORNAGAIN_SIM_COMPUTATION_DEPTHPROBECOMPUTATION_H
49 #endif // USER_API
Defines interface IComputation.
Performs a single-threaded depth probe computation with given sample.
std::vector< DepthProbeElement >::iterator DepthProbeElementIter
DepthProbeComputation(const reSample &re_sample, const SimulationOptions &options, ProgressHandler &progress, DepthProbeElementIter begin_it, DepthProbeElementIter end_it)
DepthProbeElementIter m_begin_it
~DepthProbeComputation() override
void runProtected() override
Runs computation. May throw. To be called from run(), which catches exceptions.
DepthProbeElementIter m_end_it
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.
Data structure that contains all the necessary data for scattering calculations.
Definition: ReSample.h:41