BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SpecularMagneticStrategy_v1.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/LegacyRT/SpecularMagneticStrategy_v1.h
6 //! @brief Defines class SpecularMagneticStrategy_v1.
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_LEGACYRT_SPECULARMAGNETICSTRATEGY_V1_H
21 #define BORNAGAIN_SAMPLE_LEGACYRT_SPECULARMAGNETICSTRATEGY_V1_H
22 
25 #include <memory>
26 #include <vector>
27 
28 class Slice;
29 
30 //! Implements the matrix formalism for the calculation of wave amplitudes of
31 //! the coherent wave solution in a multilayer with magnetization.
32 //! @ingroup algorithms_internal
33 
35 public:
36  // TODO remove once external test code is not needed anmyore
37  // for the moment i need them!
39  using coefficient_pointer_type = std::unique_ptr<const coefficient_type>;
40  using coeffs_t = std::vector<coefficient_pointer_type>;
41 
42  //! Computes refraction angle reflection/transmission coefficients
43  //! for given sliced multilayer and wavevector k
44  ISpecularStrategy::coeffs_t Execute(const std::vector<Slice>& slices, const kvector_t& k) const;
45 
46  ISpecularStrategy::coeffs_t Execute(const std::vector<Slice>& slices,
47  const std::vector<complex_t>& kz) const;
48 
49  virtual std::variant<complex_t, Eigen::Matrix2cd>
50  computeTopLayerR(const std::vector<Slice>& slices,
51  const std::vector<complex_t>& kz) const override;
52 
53 }; // class SpecularMagneticStrategy_v1
54 
55 #endif // BORNAGAIN_SAMPLE_LEGACYRT_SPECULARMAGNETICSTRATEGY_V1_H
56 #endif // USER_API
Defines and implements class ISpecularStrategy.
Defines class MatrixRTCoefficients_v1.
Interface for the Fresnel computations, both in the scalar and magnetic case.
std::vector< std::unique_ptr< const ILayerRTCoefficients > > coeffs_t
Specular reflection and transmission coefficients in a layer in case of 2x2 matrix interactions betwe...
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.
Definition: Slice.h:32
Implements the matrix formalism for the calculation of wave amplitudes of the coherent wave solution ...
virtual std::variant< complex_t, Eigen::Matrix2cd > computeTopLayerR(const std::vector< Slice > &slices, const std::vector< complex_t > &kz) const override
ISpecularStrategy::coeffs_t Execute(const std::vector< Slice > &slices, const kvector_t &k) const
Computes refraction angle reflection/transmission coefficients for given sliced multilayer and waveve...
std::vector< coefficient_pointer_type > coeffs_t
std::unique_ptr< const coefficient_type > coefficient_pointer_type