BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
Compute::TransitionMagneticTanh Namespace Reference

Description

Implements the magnetic Fresnel computation with the analytical Tanh roughness.

Implements the transfer matrix formalism for the calculation of wave amplitudes of the coherent wave solution in a sample with magnetization. For a description, see internal document "Polarized Implementation of the Transfer Matrix Method"

Functions

std::pair< SpinMatrix, SpinMatrixbackwardsSubmatrices (const MatrixFlux &coeff_i, const MatrixFlux &coeff_i1, double sigma)
 

Function Documentation

◆ backwardsSubmatrices()

std::pair< SpinMatrix, SpinMatrix > Compute::TransitionMagneticTanh::backwardsSubmatrices ( const MatrixFlux coeff_i,
const MatrixFlux coeff_i1,
double  sigma 
)

Definition at line 64 of file TransitionMagneticTanh.cpp.

66 {
69 
70  if (sigma != 0.) {
71  R = computeRoughnessMatrix(coeff_i1, sigma, false)
72  * computeRoughnessMatrix(coeff_i, sigma, true);
73 
74  RInv = computeRoughnessMatrix(coeff_i, sigma, false)
75  * computeRoughnessMatrix(coeff_i1, sigma, true);
76  }
77 
78  const SpinMatrix mproduct = coeff_i.computeInverseP() * coeff_i1.computeP();
79  const SpinMatrix mp = 0.5 * (RInv + mproduct * R);
80  const SpinMatrix mm = 0.5 * (RInv - mproduct * R);
81 
82  return {mp, mm};
83 }
SpinMatrix computeP() const
Definition: MatrixFlux.cpp:124
SpinMatrix computeInverseP() const
Definition: MatrixFlux.cpp:132
static SpinMatrix One()
Definition: SpinMatrix.cpp:36
constexpr Double_t R()
Definition: TMath.h:213

References MatrixFlux::computeInverseP(), MatrixFlux::computeP(), SpinMatrix::One(), and TMath::R().

Here is the call graph for this function: