BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
GISASSimulation.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Core/Simulation/GISASSimulation.h
6 //! @brief Defines class GISASSimulation.
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_SIMULATION_GISASSIMULATION_H
16 #define BORNAGAIN_CORE_SIMULATION_GISASSIMULATION_H
17 
20 
21 class MultiLayer;
22 class ISampleBuilder;
23 
24 //! Main class to run a Grazing-Incidence Small-Angle Scattering simulation.
25 //! @ingroup simulation
26 
28 {
29 public:
32 
33  GISASSimulation* clone() const override { return new GISASSimulation(*this); }
34 
35  void accept(INodeVisitor* visitor) const override { visitor->visit(this); }
36 
37  //! Put into a clean state for running a simulation
38  void prepareSimulation() override;
39 
40  //! Returns the results of the simulation in a format that supports unit conversion and export
41  //! to numpy arrays
42  SimulationResult result() const override;
43 
44  //! Sets beam parameters from here (forwarded to Instrument)
45  void setBeamParameters(double wavelength, double alpha_i, double phi_i);
46 
47  //! Returns the total number of the intensity values in the simulation result
48  size_t intensityMapSize() const override;
49 
50 private:
51  GISASSimulation(const GISASSimulation& other);
52 
53  //! Initializes the vector of Simulation elements
54  void initSimulationElementVector() override;
55 
56  void initialize();
57 };
58 
59 #endif // BORNAGAIN_CORE_SIMULATION_GISASSIMULATION_H
Defines class Simulation2D.
Defines class SimulationElement.
Main class to run a Grazing-Incidence Small-Angle Scattering simulation.
void initSimulationElementVector() override
Initializes the vector of Simulation elements.
GISASSimulation * clone() const override
void setBeamParameters(double wavelength, double alpha_i, double phi_i)
Sets beam parameters from here (forwarded to Instrument)
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
size_t intensityMapSize() const override
Returns the total number of the intensity values in the simulation result.
void prepareSimulation() override
Put into a clean state for running a simulation.
SimulationResult result() const override
Returns the results of the simulation in a format that supports unit conversion and export to numpy a...
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
virtual void visit(const BasicLattice *)
Definition: INodeVisitor.h:154
Interface to the class capable to build samples to simulate.
Our sample model: a stack of layers one below the other.
Definition: MultiLayer.h:42
Pure virtual base class of OffSpecularSimulation and GISASSimulation.
Definition: Simulation2D.h:27
Wrapper around OutputData<double> that also provides unit conversions.