BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ScalarFlux.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Resample/Flux/ScalarFlux.h
6 //! @brief Defines class ScalarFlux.
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_RESAMPLE_FLUX_SCALARFLUX_H
21 #define BORNAGAIN_RESAMPLE_FLUX_SCALARFLUX_H
22 
23 #include "Resample/Flux/IFlux.h"
24 #include <heinz/Complex.h>
25 
26 //! Specular reflection and transmission coefficients in a layer in case
27 //! of scalar interactions between the layers and the scattered particle.
28 
29 class ScalarFlux : public IFlux {
30 public:
31  ScalarFlux(complex_t kz, Spinor TR);
32 
33  // The following functions return the transmitted and reflected amplitudes
34  // for different incoming beam polarizations and eigenmodes
35  Spinor T1plus() const override;
36  Spinor R1plus() const override;
37  Spinor T2plus() const override;
38  Spinor R2plus() const override;
39  Spinor T1min() const override;
40  Spinor R1min() const override;
41  Spinor T2min() const override;
42  Spinor R2min() const override;
43 
44  //! Returns z-part of the two wavevector eigenmodes
45  Spinor getKz() const override;
46 
47  complex_t getScalarT() const;
48  complex_t getScalarR() const;
49  complex_t getScalarKz() const { return m_kz; }
50 
51 private:
52  const complex_t m_kz; //!< Signed vertical wavevector component k_z
53 
54  //! Transmission and reflection coefficient
55  //!
56  //! In the manual called A^{-} = m_TR(0) and A^{+} = m_TR(1).
57  //! Values of the transmitted/reflected (=down/up propagating) wavefunction
58  //! at top boundary of the layer (resp. at the bottom of the top air/vacuum layer).
59  const Spinor m_TR;
60 
61  const Spinor m_plus;
62  const Spinor m_min;
63 };
64 
65 #endif // BORNAGAIN_RESAMPLE_FLUX_SCALARFLUX_H
66 #endif // USER_API
Defines and implements class IFlux.
Interface to access reflection/transmission coefficients. Realized by ScalarFlux and MatrixFlux.
Definition: IFlux.h:30
Specular reflection and transmission coefficients in a layer in case of scalar interactions between t...
Definition: ScalarFlux.h:29
Spinor R1plus() const override
Definition: ScalarFlux.cpp:32
Spinor T1plus() const override
The following functions return the transmitted and reflected amplitudes for different incoming beam p...
Definition: ScalarFlux.cpp:27
const complex_t m_kz
Signed vertical wavevector component k_z.
Definition: ScalarFlux.h:52
Spinor T1min() const override
Definition: ScalarFlux.cpp:47
complex_t getScalarKz() const
Definition: ScalarFlux.h:49
ScalarFlux(complex_t kz, Spinor TR)
Definition: ScalarFlux.cpp:19
Spinor R1min() const override
Definition: ScalarFlux.cpp:52
Spinor R2min() const override
Definition: ScalarFlux.cpp:62
const Spinor m_min
Definition: ScalarFlux.h:62
Spinor T2plus() const override
Definition: ScalarFlux.cpp:37
const Spinor m_plus
Definition: ScalarFlux.h:61
Spinor T2min() const override
Definition: ScalarFlux.cpp:57
const Spinor m_TR
Transmission and reflection coefficient.
Definition: ScalarFlux.h:59
complex_t getScalarR() const
Definition: ScalarFlux.cpp:72
complex_t getScalarT() const
Definition: ScalarFlux.cpp:77
Spinor R2plus() const override
Definition: ScalarFlux.cpp:42
Spinor getKz() const override
Returns z-part of the two wavevector eigenmodes.
Definition: ScalarFlux.cpp:67
Definition: Spinor.h:20