BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ISpecularStrategy.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Specular/ISpecularStrategy.h
6 //! @brief Defines and implements class ISpecularStrategy.
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_MULTILAYER_ISPECULARSTRATEGY_H
16 #define BORNAGAIN_CORE_MULTILAYER_ISPECULARSTRATEGY_H
17 
18 #include "Base/Types/Complex.h"
19 #include "Base/Vector/Vectors3D.h"
20 #include <memory>
21 #include <vector>
22 
24 class Slice;
25 
26 //! Interface for the Fresnel computations, both in the scalar and magnetic case
27 //!
28 //! Inherited by SpecularScalarStrategy, SpecularMagneticOldStrategy,
29 //! SpecularMagneticStrategy, SpecularMagneticNewStrategy
30 
31 //! @ingroup algorithms_internal
32 
34 {
35 public:
36  ISpecularStrategy() = default;
37  virtual ~ISpecularStrategy() = default;
38  ISpecularStrategy(const ISpecularStrategy& other) = delete;
39 
40  using coeffs_t = std::vector<std::unique_ptr<const ILayerRTCoefficients>>;
41 
42  virtual coeffs_t Execute(const std::vector<Slice>& slices, const kvector_t& k) const = 0;
43 
44  virtual coeffs_t Execute(const std::vector<Slice>& slices,
45  const std::vector<complex_t>& kz) const = 0;
46 };
47 
48 #endif // BORNAGAIN_CORE_MULTILAYER_ISPECULARSTRATEGY_H
Defines complex_t, and a few elementary functions.
Defines basic vectors in R^3 and C^3.
Interface to access reflection/transmission coefficients.
Interface for the Fresnel computations, both in the scalar and magnetic case.
virtual ~ISpecularStrategy()=default
virtual coeffs_t Execute(const std::vector< Slice > &slices, const kvector_t &k) const =0
virtual coeffs_t Execute(const std::vector< Slice > &slices, const std::vector< complex_t > &kz) const =0
ISpecularStrategy(const ISpecularStrategy &other)=delete
ISpecularStrategy()=default
std::vector< std::unique_ptr< const ILayerRTCoefficients > > coeffs_t
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.
Definition: Slice.h:28