BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MatrixRTCoefficients_v2 Class Reference

Specular reflection and transmission coefficients in a layer in case of magnetic interactions between the scattered particle and the layer. More...

Inheritance diagram for MatrixRTCoefficients_v2:
[legend]
Collaboration diagram for MatrixRTCoefficients_v2:
[legend]

Public Member Functions

 MatrixRTCoefficients_v2 (const MatrixRTCoefficients_v2 &other)
 
 MatrixRTCoefficients_v2 (double kz_sign, Eigen::Vector2cd eigenvalues, kvector_t b)
 
 ~MatrixRTCoefficients_v2 () override
 
MatrixRTCoefficients_v2clone () const override
 
Eigen::Vector2cd getKz () const override
 Returns z-part of the two wavevector eigenmodes. More...
 
Eigen::Matrix2cd getReflectionMatrix () const override
 
virtual complex_t getScalarKz () const
 
virtual complex_t getScalarR () const
 
virtual complex_t getScalarT () const
 Scalar value getters; these throw errors by default as they should only be used when the derived object is really scalar. More...
 
Eigen::Vector2cd R1min () const override
 
Eigen::Vector2cd R1plus () const override
 
Eigen::Vector2cd R2min () const override
 
Eigen::Vector2cd R2plus () const override
 
Eigen::Vector2cd T1min () const override
 
Eigen::Vector2cd T1plus () const override
 The following functions return the transmitted and reflected amplitudes for different incoming beam polarizations and eigenmodes. More...
 
Eigen::Vector2cd T2min () const override
 
Eigen::Vector2cd T2plus () const override
 

Private Attributes

kvector_t m_b
 normalized magnetic field impact (with correction for external mag. field) More...
 
double m_kz_sign
 
Eigen::Vector2cd m_lambda
 wave propagation direction (-1 for direct one, 1 for time reverse) More...
 
Eigen::Vector4cd m_w_min
 boundary values for down-polarization More...
 
Eigen::Vector4cd m_w_plus
 boundary values for up-polarization More...
 
Eigen::Matrix4cd R1
 matrix selecting the reflected part of the first eigenmode More...
 
Eigen::Matrix4cd R2
 matrix selecting the reflected part of the second eigenmode More...
 
Eigen::Matrix4cd T1
 matrix selecting the transmitted part of the first eigenmode More...
 
Eigen::Matrix4cd T2
 matrix selecting the transmitted part of the second eigenmode More...
 

Friends

class SpecularMagneticOriginalStrategy
 
class SpecularMagneticStrategy_v2
 

Detailed Description

Specular reflection and transmission coefficients in a layer in case of magnetic interactions between the scattered particle and the layer.

Definition at line 31 of file MatrixRTCoefficients_v2.h.

Constructor & Destructor Documentation

◆ MatrixRTCoefficients_v2() [1/2]

MatrixRTCoefficients_v2::MatrixRTCoefficients_v2 ( double  kz_sign,
Eigen::Vector2cd  eigenvalues,
kvector_t  b 
)

Definition at line 22 of file MatrixRTCoefficients_v2.cpp.

24  : m_kz_sign(kz_sign), m_lambda(std::move(eigenvalues)), m_b(std::move(b))
25 {
26 }
Eigen::Vector2cd m_lambda
wave propagation direction (-1 for direct one, 1 for time reverse)
kvector_t m_b
normalized magnetic field impact (with correction for external mag. field)

Referenced by clone().

◆ MatrixRTCoefficients_v2() [2/2]

MatrixRTCoefficients_v2::MatrixRTCoefficients_v2 ( const MatrixRTCoefficients_v2 other)
default

◆ ~MatrixRTCoefficients_v2()

MatrixRTCoefficients_v2::~MatrixRTCoefficients_v2 ( )
overridedefault

Member Function Documentation

◆ clone()

MatrixRTCoefficients_v2 * MatrixRTCoefficients_v2::clone ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 32 of file MatrixRTCoefficients_v2.cpp.

33 {
34  return new MatrixRTCoefficients_v2(*this);
35 }
MatrixRTCoefficients_v2(double kz_sign, Eigen::Vector2cd eigenvalues, kvector_t b)

References MatrixRTCoefficients_v2().

Here is the call graph for this function:

◆ getKz()

Eigen::Vector2cd MatrixRTCoefficients_v2::getKz ( ) const
overridevirtual

Returns z-part of the two wavevector eigenmodes.

Implements ILayerRTCoefficients.

Definition at line 97 of file MatrixRTCoefficients_v2.cpp.

98 {
99  return -I * m_kz_sign * m_lambda;
100 }
constexpr complex_t I
Definition: Complex.h:21

References I, m_kz_sign, and m_lambda.

◆ getReflectionMatrix()

Eigen::Matrix2cd MatrixRTCoefficients_v2::getReflectionMatrix ( ) const
overridevirtual

Reimplemented from ILayerRTCoefficients.

Definition at line 102 of file MatrixRTCoefficients_v2.cpp.

103 {
104  Eigen::Matrix2cd R;
105  R.col(0) = R1plus() + R2plus();
106  R.col(1) = R1min() + R2min();
107 
108  return R;
109 }
Eigen::Vector2cd R2min() const override
Eigen::Vector2cd R2plus() const override
Eigen::Vector2cd R1min() const override
Eigen::Vector2cd R1plus() const override

References R1min(), R1plus(), R2min(), and R2plus().

Here is the call graph for this function:

◆ getScalarKz()

virtual complex_t ILayerRTCoefficients::getScalarKz ( ) const
inlinevirtualinherited

Reimplemented in ScalarRTCoefficients.

Definition at line 61 of file ILayerRTCoefficients.h.

62  {
63  throw std::runtime_error("ILayerRTCoefficients::"
64  "getScalarKz(): coefficients are not scalar.");
65  }

◆ getScalarR()

virtual complex_t ILayerRTCoefficients::getScalarR ( ) const
inlinevirtualinherited

Reimplemented in ScalarRTCoefficients.

Definition at line 56 of file ILayerRTCoefficients.h.

57  {
58  throw std::runtime_error("ILayerRTCoefficients::"
59  "getScalarR(): coefficients are not scalar.");
60  }

◆ getScalarT()

virtual complex_t ILayerRTCoefficients::getScalarT ( ) const
inlinevirtualinherited

Scalar value getters; these throw errors by default as they should only be used when the derived object is really scalar.

Reimplemented in ScalarRTCoefficients.

Definition at line 51 of file ILayerRTCoefficients.h.

52  {
53  throw std::runtime_error("ILayerRTCoefficients::"
54  "getScalarT(): coefficients are not scalar.");
55  }

◆ R1min()

Eigen::Vector2cd MatrixRTCoefficients_v2::R1min ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 75 of file MatrixRTCoefficients_v2.cpp.

76 {
77  if (m_lambda(0) == 0.0 && waveVector(T1, m_w_min) == Eigen::Vector2cd::Zero())
78  return {0.0, -0.5};
79  return waveVector(R1, m_w_min);
80 }
Eigen::Matrix4cd R1
matrix selecting the reflected part of the first eigenmode
Eigen::Vector4cd m_w_min
boundary values for down-polarization
Eigen::Matrix4cd T1
matrix selecting the transmitted part of the first eigenmode

References m_lambda, m_w_min, R1, and T1.

Referenced by getReflectionMatrix().

◆ R1plus()

Eigen::Vector2cd MatrixRTCoefficients_v2::R1plus ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 45 of file MatrixRTCoefficients_v2.cpp.

46 {
47  if (m_lambda(0) == 0.0 && waveVector(T1, m_w_plus) == Eigen::Vector2cd::Zero())
48  return {-0.5, 0.0};
49  return waveVector(R1, m_w_plus);
50 }
Eigen::Vector4cd m_w_plus
boundary values for up-polarization

References m_lambda, m_w_plus, R1, and T1.

Referenced by getReflectionMatrix().

◆ R2min()

Eigen::Vector2cd MatrixRTCoefficients_v2::R2min ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 90 of file MatrixRTCoefficients_v2.cpp.

91 {
92  if (m_lambda(1) == 0.0 && waveVector(T2, m_w_min) == Eigen::Vector2cd::Zero())
93  return {0.0, -0.5};
94  return waveVector(R2, m_w_min);
95 }
Eigen::Matrix4cd T2
matrix selecting the transmitted part of the second eigenmode
Eigen::Matrix4cd R2
matrix selecting the reflected part of the second eigenmode

References m_lambda, m_w_min, R2, and T2.

Referenced by getReflectionMatrix().

◆ R2plus()

Eigen::Vector2cd MatrixRTCoefficients_v2::R2plus ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 60 of file MatrixRTCoefficients_v2.cpp.

61 {
62  if (m_lambda(1) == 0.0 && waveVector(T2, m_w_plus) == Eigen::Vector2cd::Zero())
63  return {-0.5, 0.0};
64  return waveVector(R2, m_w_plus);
65 }

References m_lambda, m_w_plus, R2, and T2.

Referenced by getReflectionMatrix().

◆ T1min()

Eigen::Vector2cd MatrixRTCoefficients_v2::T1min ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 67 of file MatrixRTCoefficients_v2.cpp.

68 {
69  const Eigen::Vector2cd result = waveVector(T1, m_w_min);
70  if (m_lambda(0) == 0.0 && result == Eigen::Vector2cd::Zero())
71  return {0.0, 0.5};
72  return result;
73 }

References m_lambda, m_w_min, and T1.

Referenced by SpecularMagneticStrategy_v2::findNormalizationCoefficients().

◆ T1plus()

Eigen::Vector2cd MatrixRTCoefficients_v2::T1plus ( ) const
overridevirtual

The following functions return the transmitted and reflected amplitudes for different incoming beam polarizations and eigenmodes.

Implements ILayerRTCoefficients.

Definition at line 37 of file MatrixRTCoefficients_v2.cpp.

38 {
39  const Eigen::Vector2cd result = waveVector(T1, m_w_plus);
40  if (m_lambda(0) == 0.0 && result == Eigen::Vector2cd::Zero())
41  return {0.5, 0.0};
42  return result;
43 }

References m_lambda, m_w_plus, and T1.

Referenced by SpecularMagneticStrategy_v2::findNormalizationCoefficients().

◆ T2min()

Eigen::Vector2cd MatrixRTCoefficients_v2::T2min ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 82 of file MatrixRTCoefficients_v2.cpp.

83 {
84  const Eigen::Vector2cd result = waveVector(T2, m_w_min);
85  if (m_lambda(1) == 0.0 && result == Eigen::Vector2cd::Zero())
86  return {0.0, 0.5};
87  return result;
88 }

References m_lambda, m_w_min, and T2.

Referenced by SpecularMagneticStrategy_v2::findNormalizationCoefficients().

◆ T2plus()

Eigen::Vector2cd MatrixRTCoefficients_v2::T2plus ( ) const
overridevirtual

Implements ILayerRTCoefficients.

Definition at line 52 of file MatrixRTCoefficients_v2.cpp.

53 {
54  const Eigen::Vector2cd result = waveVector(T2, m_w_plus);
55  if (m_lambda(1) == 0.0 && result == Eigen::Vector2cd::Zero())
56  return {0.5, 0.0};
57  return result;
58 }

References m_lambda, m_w_plus, and T2.

Referenced by SpecularMagneticStrategy_v2::findNormalizationCoefficients().

Friends And Related Function Documentation

◆ SpecularMagneticOriginalStrategy

friend class SpecularMagneticOriginalStrategy
friend

Definition at line 34 of file MatrixRTCoefficients_v2.h.

◆ SpecularMagneticStrategy_v2

friend class SpecularMagneticStrategy_v2
friend

Definition at line 33 of file MatrixRTCoefficients_v2.h.

Member Data Documentation

◆ m_b

kvector_t MatrixRTCoefficients_v2::m_b
private

normalized magnetic field impact (with correction for external mag. field)

Definition at line 60 of file MatrixRTCoefficients_v2.h.

Referenced by SpecularMagneticStrategy_v2::calculateTR(), and SpecularMagneticStrategy_v2::nullifyBottomReflection().

◆ m_kz_sign

double MatrixRTCoefficients_v2::m_kz_sign
private

Definition at line 58 of file MatrixRTCoefficients_v2.h.

Referenced by getKz().

◆ m_lambda

Eigen::Vector2cd MatrixRTCoefficients_v2::m_lambda
private

wave propagation direction (-1 for direct one, 1 for time reverse)

eigenvalues for wave propagation

Definition at line 59 of file MatrixRTCoefficients_v2.h.

Referenced by SpecularMagneticStrategy_v2::calculateTR(), SpecularMagneticStrategy_v2::calculateZeroFieldTR(), getKz(), SpecularMagneticStrategy_v2::nullifyBottomReflection(), R1min(), R1plus(), R2min(), R2plus(), T1min(), T1plus(), T2min(), and T2plus().

◆ m_w_min

Eigen::Vector4cd MatrixRTCoefficients_v2::m_w_min
private

◆ m_w_plus

Eigen::Vector4cd MatrixRTCoefficients_v2::m_w_plus
private

◆ R1

Eigen::Matrix4cd MatrixRTCoefficients_v2::R1
private

◆ R2

Eigen::Matrix4cd MatrixRTCoefficients_v2::R2
private

◆ T1

Eigen::Matrix4cd MatrixRTCoefficients_v2::T1
private

◆ T2

Eigen::Matrix4cd MatrixRTCoefficients_v2::T2
private

The documentation for this class was generated from the following files: