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

Description

Implements the magnetic Fresnel computation with Nevot-Croce 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::MagneticNevotCroceTransition::backwardsSubmatrices ( const MatrixFlux coeff_i,
const MatrixFlux coeff_i1,
double  sigma 
)

Definition at line 70 of file TransitionMagneticNevot.cpp.

72 {
73  SpinMatrix roughness_sum = SpinMatrix::One();
74  SpinMatrix roughness_diff = SpinMatrix::One();
75  if (sigma != 0.) {
76  const auto ret = computeRoughnessMatrices(coeff_i, coeff_i1, sigma);
77  roughness_sum = std::get<0>(ret);
78  roughness_diff = std::get<1>(ret);
79  }
80 
81  const auto P = SpinMatrix(coeff_i.computeInverseP() * coeff_i1.computeP());
82  const auto mp = 0.5 * (SpinMatrix::One() + P) * roughness_diff;
83  const auto mm = 0.5 * (SpinMatrix::One() - P) * roughness_sum;
84 
85  return {mp, mm};
86 }
SpinMatrix computeP() const
Definition: MatrixFlux.cpp:124
SpinMatrix computeInverseP() const
Definition: MatrixFlux.cpp:132
static SpinMatrix One()
Definition: SpinMatrix.cpp:36

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

Here is the call graph for this function: