BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
DecouplingApproximationStrategy.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Interference/DecouplingApproximationStrategy.h
6 //! @brief Defines class DecouplingApproximationStrategy.
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_SAMPLE_INTERFERENCE_DECOUPLINGAPPROXIMATIONSTRATEGY_H
21 #define BORNAGAIN_SAMPLE_INTERFERENCE_DECOUPLINGAPPROXIMATIONSTRATEGY_H
22 
24 
25 class SimulationElement;
26 
27 //! Strategy class to compute the total scattering from a particle layout
28 //! in the decoupling approximation.
29 //! @ingroup algorithms_internal
30 
32 public:
33  DecouplingApproximationStrategy(const std::vector<FormFactorCoherentSum>& weighted_formfactors,
34  const IInterferenceFunction* iff, SimulationOptions sim_params,
35  bool polarized);
36 
37 private:
38  double scalarCalculation(const SimulationElement& sim_element) const override;
39  double polarizedCalculation(const SimulationElement& sim_element) const override;
40 
41  std::unique_ptr<IInterferenceFunction> m_iff;
42 };
43 
44 #endif // BORNAGAIN_SAMPLE_INTERFERENCE_DECOUPLINGAPPROXIMATIONSTRATEGY_H
45 #endif // USER_API
Defines interface IInterferenceFunctionStrategy.
Strategy class to compute the total scattering from a particle layout in the decoupling approximation...
double scalarCalculation(const SimulationElement &sim_element) const override
Returns the total incoherent and coherent scattering intensity for given kf and for one particle layo...
DecouplingApproximationStrategy(const std::vector< FormFactorCoherentSum > &weighted_formfactors, const IInterferenceFunction *iff, SimulationOptions sim_params, bool polarized)
double polarizedCalculation(const SimulationElement &sim_element) const override
This is the polarized version.
std::unique_ptr< IInterferenceFunction > m_iff
Base class of all interference function strategy classes.
Abstract base class of interference functions.
Data stucture containing both input and output of a single detector cell.
Collect the different options for simulation.
matrixFFVector_t polarized(const SimulationElement &sim_element, const std::vector< FormFactorCoherentSum > &ff_wrappers)