BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
speculartoysimulation.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file gui2/quicksimeditor/speculartoysimulation.h
6 //! @brief Defines class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI2_QUICKSIMEDITOR_SPECULARTOYSIMULATION_H
16 #define BORNAGAIN_GUI2_QUICKSIMEDITOR_SPECULARTOYSIMULATION_H
17 
18 #include "darefl_export.h"
21 #include <memory>
22 #include <vector>
23 
25 
26 namespace gui2 {
27 
28 //! Toy simulation to calculate "specular reflectivity.
29 //! Used by JobManager to run simulation in mylti-threaded mode.
30 
31 class DAREFLCORE_EXPORT SpecularToySimulation {
32 public:
34 
35  SpecularToySimulation(const SimulationInput& input_data);
36 
37  void runSimulation();
38 
39  void setProgressCallback(ModelView::ProgressHandler::callback_t callback);
40 
41  SimulationResult simulationResult() const;
42 
43  static SLDProfile sld_profile(const multislice_t& multislice, int n_points);
44 
45 private:
46  size_t scanPointsCount() const;
47 
51 
52  std::unique_ptr<SpecularScalarTanhStrategy> m_strategy;
53 };
54 
55 } // namespace gui2
56 
57 #endif // BORNAGAIN_GUI2_QUICKSIMEDITOR_SPECULARTOYSIMULATION_H
Maintain information about progress of a computation.
std::function< bool(size_t)> callback_t
Implements an tanh transition function to model roughness in a scaler computation.
Toy simulation to calculate "specular reflectivity.
ModelView::ProgressHandler m_progressHandler
std::unique_ptr< SpecularScalarTanhStrategy > m_strategy
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.
Definition: app_constants.h:20
std::vector< SliceData > multislice_t
Defines class CLASS?
Defines class CLASS?
Represents results of SLD profile calculations.
Represents data to run specular simulations.
Represents results of the simulation.