BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SpecularMagneticNewStrategy.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Specular/SpecularMagneticNewStrategy.h
6 //! @brief Defines class SpecularMagneticNewStrategy.
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_CORE_MULTILAYER_SPECULARMAGNETICNEWSTRATEGY_H
16 #define BORNAGAIN_CORE_MULTILAYER_SPECULARMAGNETICNEWSTRATEGY_H
17 
20 #include <memory>
21 #include <vector>
22 
23 class Slice;
24 
25 //! Implements the magnetic Fresnel computation with Nevot-Croce roughness
26 //!
27 //! Implements the transfer matrix formalism for the calculation of wave
28 //! amplitudes of the coherent wave solution in a multilayer with magnetization.
29 //! For a description, see internal
30 //! document "Polarized Implementation of the Transfer Matrix Method"
31 //!
32 //! @ingroup algorithms_internal
34 {
35 public:
36  //! Computes refraction angle reflection/transmission coefficients
37  //! for given sliced multilayer and wavevector k
38  ISpecularStrategy::coeffs_t Execute(const std::vector<Slice>& slices, const kvector_t& k) const;
39 
40  //! Computes refraction angle reflection/transmission coefficients
41  //! for given sliced multilayer and a set of kz projections corresponding to each slice
42  ISpecularStrategy::coeffs_t Execute(const std::vector<Slice>& slices,
43  const std::vector<complex_t>& kz) const;
44 
45 private:
46  std::vector<MatrixRTCoefficients_v3> computeTR(const std::vector<Slice>& slices,
47  const std::vector<complex_t>& kzs) const;
48 
49  virtual std::pair<Eigen::Matrix2cd, Eigen::Matrix2cd>
51  const MatrixRTCoefficients_v3& coeff_i1, double sigma) const = 0;
52 
53  void calculateUpwards(std::vector<MatrixRTCoefficients_v3>& coeff,
54  const std::vector<Slice>& slices) const;
55 };
56 
57 #endif // BORNAGAIN_CORE_MULTILAYER_SPECULARMAGNETICNEWSTRATEGY_H
Defines and implements class ISpecularStrategy.
Defines class MatrixRTCoefficients_v3.
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 magnetic interactions between...
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.
Definition: Slice.h:28
Implements the magnetic Fresnel computation with Nevot-Croce roughness.
virtual std::pair< Eigen::Matrix2cd, Eigen::Matrix2cd > computeBackwardsSubmatrices(const MatrixRTCoefficients_v3 &coeff_i, const MatrixRTCoefficients_v3 &coeff_i1, double sigma) const =0
void calculateUpwards(std::vector< MatrixRTCoefficients_v3 > &coeff, const std::vector< Slice > &slices) const
std::vector< MatrixRTCoefficients_v3 > computeTR(const std::vector< Slice > &slices, const std::vector< complex_t > &kzs) const
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...