BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ComputeFluxMagnetic.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Resample/Specular/ComputeFluxMagnetic.h
6 //! @brief Defines namespace Compute::SpecularMagnetic.
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_RESAMPLE_SPECULAR_COMPUTEFLUXMAGNETIC_H
21 #define BORNAGAIN_RESAMPLE_SPECULAR_COMPUTEFLUXMAGNETIC_H
22 
23 #include "Base/Spin/SpinMatrix.h"
25 #include <heinz/Complex.h>
26 #include <heinz/Vectors3D.h>
27 #include <memory>
28 #include <vector>
29 
30 class IFlux;
31 class SliceStack;
32 using Fluxes = std::vector<std::unique_ptr<const IFlux>>;
33 
34 //! Methods to compute polarized propagation directions and fluxes as function of slice.
35 //!
36 //! Implements the transfer matrix formalism for the calculation of wave
37 //! amplitudes of the coherent wave solution in a sample with magnetization.
38 //! For a description, see internal
39 //! document "Polarized Implementation of the Transfer Matrix Method"
40 
42 
43 //! Computes refraction angle reflection/transmission coefficients
44 //! for given sliced sample and wavevector k
45 Fluxes fluxes(const SliceStack& slices, const R3& k, bool forward);
46 
47 //! Computes the Fresnel R coefficient for the top layer only
48 //! Introduced in order to speed up pure reflectivity computations
49 SpinMatrix topLayerR(const SliceStack& slices, const std::vector<complex_t>& kzs, bool forward);
50 
51 } // namespace Compute::SpecularMagnetic
52 
53 #endif // BORNAGAIN_RESAMPLE_SPECULAR_COMPUTEFLUXMAGNETIC_H
54 #endif // USER_API
std::vector< std::unique_ptr< const IFlux > > Fluxes
Define RoughnessModels enumerator and Python wrapper.
Defines class SpinMatrix.
Interface to access reflection/transmission coefficients. Realized by ScalarFlux and MatrixFlux.
Definition: IFlux.h:30
A stack of Slices.
Definition: SliceStack.h:38
Methods to compute polarized propagation directions and fluxes as function of slice.
Fluxes fluxes(const SliceStack &slices, const R3 &k, bool forward)
Computes refraction angle reflection/transmission coefficients for given sliced sample and wavevector...
SpinMatrix topLayerR(const SliceStack &slices, const std::vector< complex_t > &kzs, bool forward)
Computes the Fresnel R coefficient for the top layer only Introduced in order to speed up pure reflec...